Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
printz

Causing target confusion with prematurely disappearing actors

Recommended Posts

As you may know, if you make a Dehacked modification to cause an attacking object to just disappear without dying, the monsters it had angered will switch target to someone undefined, probably one of their neighbours. You can try this by making projectiles shoot other projectiles that'll hit enemies, or try the MBF Mushroom explosion. Some times I believe I saw monsters attacking the ceiling, especially in vanilla Doom.

What I'm gonna ask is this:

- is this phenomenon safe? Or may it corrupt the Doom system?
- is the result (chosen target) different between Doom, Boom and Eternity (which transitioned actors from structs to classes)?
- Did ZDoom fix it? If so, how can I emulate it?

Share this post


Link to post
printz said:

As you may know, if you make a Dehacked modification to cause an attacking object to just disappear without dying, the monsters it had angered will switch target to someone undefined, probably one of their neighbours. You can try this by making projectiles shoot other projectiles that'll hit enemies, or try the MBF Mushroom explosion. Some times I believe I saw monsters attacking the ceiling, especially in vanilla Doom.

What I'm gonna ask is this:

- is this phenomenon safe? Or may it corrupt the Doom system?
- is the result (chosen target) different between Doom, Boom and Eternity (which transitioned actors from structs to classes)?
- Did ZDoom fix it? If so, how can I emulate it?

They don't actually attack something undefined; they are still attacking the removed monster.

Answers:

  • It is safe in BOOM-based engines (and in ZDoom) due to a reference counting system, which will ensure that "mobj" structures (aka actors) are not freed until they are unreferenced. It was NOT safe in vanilla DOOM, and could crash the game in some circumstances.
  • BOOM and Eternity have identical behavior in this regard.
  • Last time I tested, ZDoom still shared the same behavior. That was well before they changed to a garbage collector, however, so I'm not confident of that now. If it doesn't work that way, then the only way to emulate would be to make the monster really become invisible, invincible, intangible, and glued to the roof, yet not ignored by enemies, instead of being freed. It might be difficult but I'm sure there's a flag combo that can achieve it in ZDoom.

Share this post


Link to post
Quasar said:

They don't actually attack something undefined; they are still attacking the removed monster.

I actually saw imps attack and damage other imps. That can only happen from scratches, so quite likely the imp was having another imp as a target, instead of the removed object.

Share this post


Link to post

Now I understand. The monster confusion in my case isn't a bug at all. It's simply the barrel effect. It's like summoning a kamikaze barrel that hits more than his designated enemy. The collaterals will want to kill the poor soul who attracted the attention of the sentient barrel. It's like the curse "Attract" from Diablo 2.

Share this post


Link to post

printz said:
It's like the curse "Attract" from Diablo 2.


And after all this time, I still know exactly what that means. Sigh :)

Share this post


Link to post
printz said:

I actually saw imps attack and damage other imps. That can only happen from scratches, so quite likely the imp was having another imp as a target, instead of the removed object.

I have to conclude this means you somehow caused the monster being hit by an attack to generate more attack(s) that are blamed on the monster instead of the original attack source.

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
Sign in to follow this  
×