[Bug?] Actors inheriting from SpectralMonster/AlienSpectre1

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Bug?] Actors inheriting from SpectralMonster/AlienSpectre1

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by StroggVorbis » Thu Nov 15, 2018 9:15 am

Graf Zahl wrote:Why is ZScript not an option? Then you could just make a copy of the original function and change the names.
I'll try that out too, even though I've got bad feelings that I'll be unable to do this all by myself :?

I'll get back to you guys shall I hit a roadblock :)

EDIT: So, probably not the most elegant solution, but for starters I copied everything from alienspectre.txt inside gzdoom.pk3 into a ZScript lump and edited the names of all spectres to specters, same for the codepointer and its corresponding function and it works as intended. I only had to relocate the conversationIDs from the former Decorate lump into mapinfo, as the .zsc wouldn't accept it. And since the actors in my save file already had the same name, it loaded up without problems. But then I realized I could've avoided all of this trouble by simply adding the +spectral flag to all weapons, what a day :P

EDIT 2: Nevermind, +SPECTRAL can only be applied to projectiles, and this has the unintentional side effect of splash damage not hurting the player.

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by StroggVorbis » Thu Nov 15, 2018 9:12 am

Thanks, this did the trick! Although, is it possible to do this in Decorate only through the help of something like A_RearrangePointers? There must be a way to redirect/transfer the AlienSpectre's SendToCommunicator special pointer to its target/killer, i.e. the player :P
If there isn't, I'm fine with that, it's not that I'm lazy, just that I'm in the middle of another playthrough and adding ACS would make my save unusable. :oops:

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by Graf Zahl » Thu Nov 15, 2018 9:02 am

Why is ZScript not an option? Then you could just make a copy of the original function and change the names.

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by TheMightyHeracross » Thu Nov 15, 2018 8:27 am

Ah my mistake. You can't run SendToCommunicator in DECORATE like that because it's not actually being run by the player. For the player to get the communicator message the player themself has to execute the function. Looks like we're gonna need ACS.

This is what I got to work:

Code: Select all

Actor AlienSpecter1 : AlienSpectre1 replaces AlienSpectre1
{
Conversationid 67
-SPECTRAL
States
{
Death:
    AL1P A 6 Bright A_SpectreChunkSmall
    AL1P B 6 Bright A_Scream
    AL1P C 6 Bright A_SpectreChunkSmall
    AL1P DE 6 Bright
    AL1P F 6 Bright A_SpectreChunkSmall
    AL1P G 6 Bright
    AL1P H 6 Bright A_SpectreChunkSmall
    AL1P IJK 6 Bright
    AL1P LM 5 Bright
    AL1P N 5 Bright A_SpectreChunkLarge
    AL1P OPQ 5 Bright
    AL1P R 5 Bright ACS_NamedExecuteAlways("Die", 0, 0, 0, 0)
    Stop
}
}
Then, load this script in LOADACS:

Code: Select all

#library "TEST"
#include "zcommon.acs"

script "Die" (void)
{
	Floor_LowerToLowest(999, 8);
	SetActivator(0, AAPTR_PLAYER1);//This changes the activator to the player, so they can receive Blackbird's message.
   SendToCommunicator(95, 0, 1, 0);
}
To test this, make sure you give yourself the Communicator in the console first! You will not receive log messages without the Communicator item.

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by StroggVorbis » Thu Nov 15, 2018 7:58 am

TheMightyHeracross wrote:

Code: Select all

Floor_LowerToLowest(999, 8)
SendToCommunicator(95, 0, 1, 0)
I tried following your example, but still haven't managed to get it to work.

Like this?

Code: Select all

Actor AlienSpecter1 : AlienSpectre1 replaces AlienSpectre1
{
Conversationid 67
-SPECTRAL
States
{
Death:
    AL1P A 6 Bright A_SpectreChunkSmall
    AL1P B 6 Bright A_Scream
    AL1P C 6 Bright A_SpectreChunkSmall
    AL1P DE 6 Bright
    AL1P F 6 Bright A_SpectreChunkSmall
    AL1P G 6 Bright
    AL1P H 6 Bright A_SpectreChunkSmall
    AL1P IJK 6 Bright
    AL1P LM 5 Bright
    AL1P N 5 Bright A_SpectreChunkLarge
    AL1P OPQ 5 Bright
    AL1P R 5 Bright A_AlienSpectreDeath
    TNT1 A 0 Floor_LowerToLowest(999, 8)
    TNT1 A 0 SendToCommunicator(95, 0, 1, 0)
    Stop
}
}
EDIT: It works if I execute both specials from the console, but it's not called from the monster's death state for some reason. I also tried appending A_CallSpecial to them, even though the wiki states this shouldn't be used directly, as it's taken care of internally. :?

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by StroggVorbis » Thu Nov 15, 2018 7:18 am

Thank you both for the quick responses, I was in the middle of editing my post and after the page got refreshed I'm just seeing them :D

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by TheMightyHeracross » Thu Nov 15, 2018 7:15 am

Ah, the joys of Strife modding! :P

As Blue Shadow said, according to the Wiki page for [wiki]A_AlienSpectreDeath[/wiki], the function has hard-coded behavior which is different for the five AlienSpectres. Because your monster is not one of these five I am assuming that the function is being called, it's checking the actor, but finding that the actor is not one of those five, and therefore is doing nothing.

Fortunately, you can recreate this behavior using action functions. Call these action functions in the monster's DECORATE instead of the hardcoded function:

Code: Select all

Floor_LowerToLowest(999, 8)
SendToCommunicator(95, 0, 1, 0)
See [wiki]SendToCommunicator[/wiki]. Some of the other AlienSpectre death scripts are a bit more complex and you'll probably need some simple ACS.

Re: [Bug?] Actors inheriting from SpectralMonster/AlienSpect

by Blue Shadow » Thu Nov 15, 2018 7:14 am

The function checks for AlienSpectre[1-5] classes specifically to do its thing. So if the caller is none of those classes, it won't do anything.

[Bug?] Actors inheriting from SpectralMonster/AlienSpectre1

by StroggVorbis » Thu Nov 15, 2018 7:01 am

So, I've been trying to replace Strife's AlienSpectres with equivalents that don't possess the SPECTRAL flag, making them susceptible to conventional weaponry.
The only problem I face with this is that A_AlienSpectreDeath doesn't respond to the death of my custom actors, meaning I no longer get log changes or QuestItems.
Is this a bug or do I need to provide an adjusted DIALOGUE lump?
Before anyone asks, yes I did give all of them their original ConversationID. :?

EDIT: I looked at the A_AlienSpectralDeath function and if I understood correctly it checks for the actors by name, this would mean that I'm out of luck without using ZScript, as two actors cannot have the same name.

Top