Jump to content

ACS Scripting an event where "dead" enemies are revived


SMG_Man

Recommended Posts

I'm making a map in UDMF, and I want to have a little graveyard with a bunch of dead zombies in it that when the player gets near, the ground shakes and they one by one get back up (like if an arch-vile resurrected them) and start going after the player. I feel like such an event should be possible to do, but I don't know what ACS functions to use specifically for reviving corpses.

Share this post


Link to post

Note, however, that for Thing_Raise to work the actor has to have a "Raise" state. Generally only monsters (with a few exceptions) have that state. Dead monster actors (like DeadZombieMan) don't have that state, which means that you can't turn them into a monster with Thing_Raise. So you either have to place the normal monsters and kill them before using Thing_Raise on them, or create a new actor with a "Raise" state that starts "dead".

Share this post


Link to post
1 hour ago, boris said:

create a new actor with a "Raise" state that starts "dead".

 

This new actor needs to have its internal flags set to "dead". Merely being inert and having a Raise state isn't enough to get resurrrected. In GZDoom / EE that flag is "corpse".

Share this post


Link to post

Since I had troubles making raisable corpses in DECORATE last time I tried, I was thinking I would just place the enemies I want on the map normally and have a script at the level's start run the "Thing_Destroy" special to kill them immediately. It's a little less elegant ig, but it should work right?

Edited by SMG_Man

Share this post


Link to post

Just tried it out and it's pretty simple. I'm not too well versed in ZScript, so there might be a better way to do that:

 

class RaisableZombieMan : ZombieMan
{
    Default
    {
        +CORPSE
        -SHOOTABLE
        -SOLID
    }
    
    States
    {
        Spawn:
            POSS L -1;
            Stop;
        Raise:
            TNT1 A 0 { bCorpse = false; bShootable = true; bSolid = true; }
            Goto Super::Raise;
    }
}

 

Example:

raise.zip

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...