Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
RonnieJamesDiner

Issue with SetActorState and Monsters

Question

There is a sequence in one my maps where I have an entire group of monsters raise from the dead (as though being resurrected by an Arch-Vile) simultaneously - for no other reason than I thought it looked neat, and kind of creepy. I ended up achieving the sequence through a very laboured and messy use of invisible, impenetrable, immovable, and silent Arch-Viles that teleport over each and every individual monster corpse for a moment (long enough to raise them), and are then simply removed via ACS. It worked for the intended affect, but would be a massive pain in the arse on any scale larger than a small handful of monsters. 

 

I was hoping to get a little clarity on why one of my first attempts at achieving this didn't work... 

 

I initially tried using SetActorState to achieve this (it seemed like the most straight forward approach), but this wound up giving me a very bizarre issue. I tried combining two very simple scripts - the first script, which was called upon entering the map, killed the TID(1) specific monsters; the second script was...

 

script 1 (void)

{

SetActorState(1, "Raise", TRUE);

}

 

Now, the second script raises the monsters fine, they walk around and attack, and everything appears normal - except the monsters can't be hit by anything. Both hitscan and projectile weapons just pass right through them. They're not affected by splash damage. They walk right through other "Things" like barrels or trees. It's as though they no longer have a hitbox.

 

I noticed that the zdoom wiki page for SetActorState says,

 

"Note that you should refrain from using this function for any actors that use the monster AI, or unpredictable results could occur."

 

I'm just curious if anyone knows why this is? 

 

 

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0
7 hours ago, RonnieJamesDiner said:

I'm just curious if anyone knows why this is? 

 

 

 

This merely plays the resurrection animation but doesn't actually revive the monster. For that a lot more work is needed which the Thing_Raise call performs.

 

Share this post


Link to post
  • 0

boozer.gif.34b687d7c48ca6a52c134cc3a4124d5c.gif

@Nevander @Graf Zahl

 

 

No way...

 

I've seen that before... but I always assumed that it had something to do with literally "raising" (as in, the z-axis) a "thing" (like an actor). I never actually looked at it or read what it did!

 

Oh my GOD! I spent days on this, haha. I searched online (both on and off Doomworld) looking for ways of resurrecting a monster without an Arch-Vile, and not once did Thing_Raise come up, anywhere, in any search for me. I tried that SetActorState method, which of course didn't work (now I know why!! thank you). Then I tried figuring out how to make a custom Arch-Vile that had a massive radius, but could never figure out how to get it resurrect more than one monster at a time. I spent hours playing around with A_RaiseChildren and A_RaiseSiblings, which was catastrophic to say the least, and got me nowhere! I still don't even understand the difference between those two specials. (Though, I did end up creating an interesting Arch-Vile-Icon-of-Sin creature that shot boss cubes which it treated as its children, and every time it resurrected one monster, it resurrected every monster it had spawned, which could probably be an interesting IoS battle). In the end, like I said, I went with the individual, invisible temporary Arch-Viles...

 

I feel really, really dumb. But I've never been more glad to have asked a question. Thank you guys so much!!!

And thanks for the clarification on SetActorState.

Share this post


Link to post
  • 0
2 hours ago, RonnieJamesDiner said:

A_RaiseChildren and A_RaiseSiblings, which was catastrophic to say the least, and got me nowhere! I still don't even understand the difference between those two specials.

`A_RaiseChildren() is for master raising his children (i.e. monsters with Master field set to the caller of `A_RaiseChildren()`).

 

`A_RaiseSiblings()` is for children raising their "family" (i.e. monsters with Master field set to the same value that one which called `A_RaiseSiblings()` has).

 

so, basically the difference is who calls what.

Share this post


Link to post
  • 0
35 minutes ago, ketmar said:

`A_RaiseChildren() is for master raising his children (i.e. monsters with Master field set to the caller of `A_RaiseChildren()`).

 

`A_RaiseSiblings()` is for children raising their "family" (i.e. monsters with Master field set to the same value that one which called `A_RaiseSiblings()` has).

 

so, basically the difference is who calls what.

 

Hmm... just to make sure I'm understanding this correctly. For example, I'll use that hypothetical Arch-Vile Icon of Sin:

 

I could have a special (DECORATE made) Arch-Vile that spawns boss-cubes when he attacks, and every monster spawned from a boss-cube would be considered this AV's "child". So, when he resurrects a monster, it calls A_RaiseChildren, and every boss-cube-spawned corpse would raise.

 

And then, if one of the boss-cubes happened to spawn a separate Arch-Vile (now a child of the main one), that child AV could utilize A_RaiseSiblings to also raise the entire group of boss-cube-spawned corpses?  

Share this post


Link to post
  • 0

yeah. at least this is how it is supposed to work. note that you have to be sure that the Master field is set, because this is what used by the engine to determine parent/child relationship.

 

p.s.: also note that `A_RaiseSiblings()` will not raise a caller. i.e. if your "sibling" is going to die (or already dead), and calls `A_RaiseSiblings()`, it won't raise itself.

Share this post


Link to post
  • 0

Gotcha, that seems like a really cool mechanic with a lot of potential. I think the Arch-Vile thing might be a little too chaotic/frustrating to deal with, but I'm sure there's some interesting things that could be achieved with this!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×