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

jump codepointer = broke

Recommended Posts

Only the S_POSS_ATK* frames are important (right down the bottom there), but I copied the whole thing to make it easy for peeps to copy, paste, and test:

// include the usual definitions too
stdinclude("root.edf")

// ZOMBIEMEN!
// Changes: more aggro (attacks more often, shoots more bullets) - mean as a vanilla sergeant. More health.

thingtype Zombieman 
{
  doomednum = 3004
  spawnstate = S_POSS_STND
  spawnhealth = 30
  seestate = S_POSS_RUN0
  seesound = posit1
  attacksound = pistol
  painstate = S_POSS_PAIN
  painchance = 160
  painsound = popain
  missilestate = S_POSS_ATK0
  deathstate = S_POSS_DIE1
  xdeathstate = S_POSS_XDIE1
  deathsound = podth1
  speed = 8
  height = 56.0
  activesound = posact
  cflags = SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ|RANGEHALF
  raisestate = S_POSS_RAISE1
  droptype = AmmoClip
  obituary_normal = "was surprised by the zombie's firepower"
  acs_spawndata { num = 4; modes = doom }
  dehackednum = 2
}

// altered Zombieman routines

frame S_POSS_RUN0	{ cmp = "POSS| *|*| 0|SetCounter(0,0,0)|S_POSS_RUN1"; }
frame S_POSS_RUN1   { cmp = "POSS| *|*| 4|Chase     |@next"; dehackednum = 176 }
frame S_POSS_RUN2   { cmp = "POSS| *|*| 4|Chase     |@next"; dehackednum = 177 }
frame S_POSS_RUN3   { cmp = "POSS| 1|*| 4|Chase     |@next"; dehackednum = 178 }
frame S_POSS_RUN4   { cmp = "POSS| 1|*| 4|Chase     |@next"; dehackednum = 179 }
frame S_POSS_RUN5   { cmp = "POSS| 2|*| 4|Chase     |@next"; dehackednum = 180 }
frame S_POSS_RUN6   { cmp = "POSS| 2|*| 4|Chase     |@next"; dehackednum = 181 }
frame S_POSS_RUN7   { cmp = "POSS| 3|*| 4|Chase     |@next"; dehackednum = 182 }
frame S_POSS_RUN8   { cmp = "POSS| 3|*| 4|Chase     |S_POSS_RUN0"; dehackednum = 183 }

frame S_POSS_ATK0   { cmp = "POSS| 4|*| 3|FaceTarget |S_POSS_ATK1"; }
frame S_POSS_ATK1   { cmp = "POSS| 4|*| 4|FaceTarget |@next"; dehackednum = 184 }
frame S_POSS_ATK2   { cmp = "POSS| 5|*| 6|PosAttack  |@next"; dehackednum = 185 }
frame S_POSS_ATK3   { cmp = "POSS| 4|*| 0|SetCounter(0,1,1)|S_POSS_ATK4"; dehackednum = 186 }
frame S_POSS_ATK4   { cmp = "POSS| 4|*| 1|CounterJump(S_POSS_ATK5,2,2,0)|S_POSS_ATK1"; }
frame S_POSS_ATK5   { cmp = "SPOS| 4|*| 35|Jump(128,SPOS_RUN0)|S_POSS_ATK1"; }
What should happen is the Zombieman should attack three times, then turn into a Sergeant (this is so I can be sure the S_POSS_ATK5 frame is actually being entered) and either attack again OR reenter his movement states, half and half chance. What happens is he attacks until pained. The Jump codepointer simply does not work (in 3.40.20 & SVN r2094 from DRDTeam); RandomJump, fortunately, is just fine.

Compare the following code for further proof (if it works, the zombieman's idle frames will flicker between Imp & zombie frames):
stdinclude("root.edf")

//zombieman

frame S_POSS_STND   { cmp = "POSS| *|*|10|RandomJump|@this|*|175|128"; dehackednum = 174 }
frame S_POSS_STND2  { cmp = "TROO| 1|*|10|RandomJump|@this|*|174|128"; dehackednum = 175 }
&
stdinclude("root.edf")

//zombieman

frame S_POSS_STND   { cmp = "POSS| *|*|10|Jump(S_POSS_STND2,128)|@this|*|175|128"; dehackednum = 174 }
frame S_POSS_STND2  { cmp = "TROO| 1|*|10|Jump(S_POSS_STND,128)|@this"; dehackednum = 175 }
And, as long as I'm complaining, can we have user definable accuracy for custom bullet attacks please? I want the Sergeants to be more accurate & fire more (but less damaging) pellets, but setting their attacks to use the 'never accurate' setting makes them too lethal and they're even more useless than usual with SSG accuracy set.

Share this post


Link to post

A_Jump is for DECORATE states only, it does not allow references to global state names. It is provided for DECORATE compatibility.

If S_SPOS_RUN0 is assigned to the Sergeant's first walking state, then you can do it like this:

A_Jump(128, "Sergeant::See")

Share this post


Link to post
Lance MDR Rocket said:

The docs should probably reflect that. edit: never mind, I see guests can edit the Eternity wiki, so I did it myself.

Are there any other codepointers that are for decorate stuff only?

I believe it is the only one so far which has this restriction. Pointers that are original to Eternity give preference to global state names, and then if one was not found, they'll check the actor's metastate names (which include DECORATE-syntax-defined states).

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  
×