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

XWE problem: saves decorate but actor dont behave

Recommended Posts

so, I have this monster actor which I downloaded and modifyed for my own project, I edit this in XWE and it does save the code, but when I test the actor in GZDOOM via doombuilder it behaves like if I never modifyed it, infact it behaves exactly like the original WAD I started my work on. the DECORATE entry contains a shitload of code for many other actors I imported. So I need some help figure this pain out.

here is code

//////////////////////
//////Speed Demon///// 
/////By StarScream////
//////////////////////

ACTOR SpeedDemon : cacodemon 30122
{
  obituary "%o was to slow for a SpeedDemon."
  hitobituary "%o was swallowed by a SpeedDemon."
  health 1
  radius 31
  height 56
  mass 400
  speed 25
  painchance 128
  BloodColor "99 50 0"
  seesound "caco/sight"
  painsound "caco/pain"
  deathsound "caco/death"
  activesound "caco/active"
  attacksound "caco/melee"
  MONSTER
  +FLOAT
  +NOGRAVITY
  +DONTHARMSPECIES
  +DONTHURTSPECIES
  +FloatBob
  states
  {
  Spawn:
    PHED A 1 A_Look
    loop
  See:
    PHED A 3 A_Chase
    loop
  Missile:
    PHED B 0 A_Jump(128,14)
    PHED BC 5 A_FaceTarget
    PHED D 1 bright A_HeadAttack
    PHED B 0 A_FaceTarget
    PHED D 1 bright A_HeadAttack
    PHED B 0 A_FaceTarget
    PHED D 1 bright A_HeadAttack
    PHED B 0 A_FaceTarget
    PHED D 1 bright A_HeadAttack
    PHED B 0 A_FaceTarget
    PHED D 1 bright A_HeadAttack
    PHED CB 5 A_FaceTarget
    goto See
    PHED BC 5 A_FaceTarget
    PHED D 0 bright A_HeadAttack
    PHED D 0 bright A_HeadAttack
    PHED D 2 bright A_HeadAttack
    goto See
  Pain:
    PHED E 3
    PHED E 3 A_Pain
    PHED F 6
    goto See
  Death:
    PHED G 0 //ACS_ExecuteAlways(700, 0, 750)
    PHED G 8 A_ChangeFlag(FLOATBOB,0)
    PHED H 8 A_Scream
    PHED IJ 8
    PHED K 8 A_NoBlocking
    PHED L -1 A_SetFloorClip
    stop
  Raise:
    PHED L 8 A_UnSetFloorClip
    PHED KJIHG 8
    goto See
  }
}

Share this post


Link to post

I'm not well versed with DECORATE, but one thing to remember when using inheritance is not to duplicate code.
See the note on top of the page http://zdoom.org/wiki/Classes:Cacodemon .
I replaced the custom sprite reference with the AgathoDemon sprite.
Seems to work, except it moves a bit jittery.

ACTOR SpeedDemon : cacodemon 30122
{
  obituary "%o was too slow for a SpeedDemon."  // too
  hitobituary "%o was swallowed by a SpeedDemon."
  health 1
  // radius 31
  // height 56
  // mass 400
  speed 25
  // painchance 128
  BloodColor "99 50 0"
  // seesound "caco/sight"
  // painsound "caco/pain"
  // deathsound "caco/death"
  // activesound "caco/active"
  // attacksound "caco/melee"
  // MONSTER
  // +FLOAT
  // +NOGRAVITY
  +DONTHARMSPECIES
  +DONTHURTSPECIES
  +FloatBob
  states
  {
  Spawn:
    AGAH A 1 A_Look
    loop
  See:
    AGAH A 3 A_Chase
    loop
  Missile:
    AGAH B 0 A_Jump(128,14)
    AGAH BC 5 A_FaceTarget
    AGAH D 1 bright A_HeadAttack
    AGAH B 0 A_FaceTarget
    AGAH D 1 bright A_HeadAttack
    AGAH B 0 A_FaceTarget
    AGAH D 1 bright A_HeadAttack
    AGAH B 0 A_FaceTarget
    AGAH D 1 bright A_HeadAttack
    AGAH B 0 A_FaceTarget
    AGAH D 1 bright A_HeadAttack
    AGAH CB 5 A_FaceTarget
    goto See
    AGAH BC 5 A_FaceTarget
    AGAH D 0 bright A_HeadAttack
    AGAH D 0 bright A_HeadAttack
    AGAH D 2 bright A_HeadAttack
    goto See
  // Pain:
  //   AGAH E 3
  //   AGAH E 3 A_Pain
  //   AGAH F 6
  //   goto See
  Death:
    AGAH G 0 //ACS_ExecuteAlways(700, 0, 750)
    AGAH G 8 A_ChangeFlag(FLOATBOB,0)
    AGAH H 8 A_Scream
    AGAH IJ 8
    AGAH K 8 A_NoBlocking
    AGAH L -1 A_SetFloorClip
    stop
  Raise:
    AGAH L 8 A_UnSetFloorClip
    AGAH KJIHG 8
    goto See
  }
}


http://files.drdteam.org/index.php/files/get/BQpSXI2C_9/speed-demon.zip

Share this post


Link to post

could it be so, that I add // to the areas you did, and keep the sprites as they are and still have it working?

Share this post


Link to post

If your sprites have a corresponding full set of rotations, then yes, by all means use them.
I used the AgathoDemon just to show a different set of sprites from the standard ones.

The lines marked with // are redundant in your code as they will be inherited from the
original code. Basically, // turns anything behind them into comments and are ignored at
compilation time. Therefore you can either keep them or delete them from your code.

Yes, that should work for you.

I included the example so that you can take it apart with Slade3. :-)

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
×