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

Buggy respawned Heretic imp

Recommended Posts

Hello,

I'm making the Heretic monsters to respawn after a while depending on the monster, but I'm having a problem with the respawned red gargoyles / imps. They seem to turn into gibs (the normal corpse sprite, IMPX L) when they climb a ledge and touch the floor of the higher platform. This "corpse" can be shot, and when it dies, it turns into the falling sprite (IMPX H) and remains so indefinitely, without respawning either.

Also, occasionally if they hit the floor while doing the charge / swoop move, a small gib can be seen to fly out and a gib sound heard. Then imp usually also flies abnormally close to the floor from then on.

Here's the code for the original imp: Classes: Heretic imp, and this is the code for the new imp:

ACTOR NewHereticImp: HereticImp replaces HereticImp
{
  States
  {
  Spawn:
    IMPX A 0 A_UnSetFloorClip
    IMPX A 0 A_SetFloat
    IMPX A 0 A_SetSolid
    IMPX A 0 A_NoGravity
    IMPX ABCB 10 A_Look
    Loop
  Crash:
    IMPX I 7 A_ImpExplode
    IMPX J 7 A_Scream
    IMPX K 7 A_NoBlocking
    IMPX L 7
    Goto RespawnWait
  XCrash:
    IMPX X 7 A_NoBlocking
    IMPX Y 7
    IMPX Z 7
    Goto RespawnWaitX
   RespawnWait:
    IMPX L 1400
    IMPX L 0 A_Respawn
   RespawnWaitX:
    IMPX Z 1400
    IMPX Z 0 A_Respawn
  }
}
As you can see, I've put a bunch of status change functions in the spawn state, hoping they would reset the behavior to normal, but unfortunately they don't make any difference.

EDIT:

Problem solved, I edited the states slightly:
ACTOR NewHereticImp: HereticImp replaces HereticImp
{
  States
  {
  Spawn:
    IMPX A 0 A_UnSetFloorClip
    IMPX A 0 A_SetFloat
    IMPX A 0 A_SetSolid
    IMPX A 0 A_NoGravity
    IMPX ABCB 10 A_Look
    Loop
  Death:
    IMPX G 5 A_ImpDeath
    IMPX H 5
    IMPX I 5 A_ImpExplode
    IMPX J 5 A_Scream
    IMPX K 5 A_NoBlocking
    IMPX L 1400
    IMPX L 0 A_Respawn
  XDeath:
    IMPX S 5 A_ImpXDeath1
    IMPX TU 5
    IMPX V 5 A_Gravity
    IMPX W 5 
    IMPX X 7
    IMPX Y 7
    IMPX Z 1400
    IMPX Z 0 A_Respawn
  Crash:
    Stop
  XCrash:
    Stop
  }
}
With the "crash" states discarded (= "falling-corpse-hits-the-ground" state), the killed imp can now turn into gibs mid-air, but to me it looks at least equally good.

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
×