SetActorState can cause ghosts

Discuss all aspects of editing for ZDoom.
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.

SetActorState can cause ghosts

Postby Enjay » Sun Mar 21, 2010 1:08 pm

I'm just flagging this up because it just happened to me and it possibly needs some consideration. I don't think it is a bug but it may be viewed as undesirable behaviour and, perhaps, Graf or Randy may want to treat it as a bug.


Anyway, I was messing with a script that did an enemy some damage and I wanted to make sure that the enemy (which has a very low pain chance) would go into its pain state. So, I used SetActorState to force the enemy into its pain state after damaging it. However, in the course of me messing around, I noticed that the enemy didn't die no matter how often I damaged it. Then I noticed that it had also become immune to "kill monsters" and MDK.

What happened (I think) is that the script killed the enemy but them immediately forced him into his pain state (which then went back to his see state) and the enemy had now become a ghost in the same style as those of an archvile-resurrected crushed body.

So, given that ghosts are generally viewed as being undesirable, I thought that it might be worth flagging up but, like I said, it's probably not a bug as such, more a case of "don't do that". It's something to be aware of though and it might be something that Graf or Randy will want to plug.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: SetActorState can cause ghosts

Postby Gez » Sun Mar 21, 2010 1:35 pm

Enjay wrote:What happened (I think) is that the script killed the enemy but them immediately forced him into his pain state (which then went back to his see state) and the enemy had now become a ghost in the same style as those of an archvile-resurrected crushed body.

Don't think so, unless it passed through walls.
Gez
 
 
 
Joined: 06 Jul 2007

Re: SetActorState can cause ghosts

Postby NeuralStunner » Sun Mar 21, 2010 1:41 pm

If it was killed but setnt back to Pain, it's likely walking around with 0 Health and the +CORPSE flag (among other things).
User avatar
NeuralStunner
Cuddly but Packin'
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293

Re: SetActorState can cause ghosts

Postby Ceeb » Sun Mar 21, 2010 1:49 pm

Enjay wrote:it's probably not a bug as such, more a case of "don't do that".


My money is on that, it's a user problem, not the engine's fault. All it knows is that while the enemy is dead, it can't be killed again, but it's in it's see state. :shrug:
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: SetActorState can cause ghosts

Postby Gez » Sun Mar 21, 2010 2:02 pm

Well, the SetActorState documentation does say "Note that you should refrain from using this function for any actors that use the monster AI, or unpredictable results could occur." :wink:
Gez
 
 
 
Joined: 06 Jul 2007

Re: SetActorState can cause ghosts

Postby Enjay » Sun Mar 21, 2010 2:31 pm

Gez wrote:Don't think so, unless it passed through walls.

Ah, right enough, it was still solid. Presumably it merely has 0 health and therefore can no longer be killed then.

Gez wrote:Well, the SetActorState documentation does say "Note that you should refrain from using this function for any actors that use the monster AI, or unpredictable results could occur." :wink:

Fair enough. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Editing (Archive)

Who is online

Users browsing this forum: slipcase and 1 guest