Zombie logic: Speed code


Zombies now move every other turn.
How it works:
  • Avatar base class includes two new vars: intSpeedTick and intSpeed
  • Avatar base class includes one new function: DoSpeedTick
  • DoSpeedTick is called when a monster tries to move. It checks if intSpeedTick = intSpeed. If true, the monster moves, intSpeedTick is set to 0. If false, intSpeedTick is incremented by one.
Closed Oct 11, 2007 at 8:43 AM by lbooker


lbooker wrote Oct 8, 2007 at 11:49 AM

Okay, zombies are spawned with a variable speed. Some are as fast as the player (speed 0), some slower (speed 1) and some really slow (speed 2).

Also moved some speed code to Walk in the Avatar class so it can affect NPCs as well as Monsters.

wrote Oct 11, 2007 at 8:43 AM

wrote Feb 1, 2013 at 1:56 AM

wrote May 13, 2013 at 5:28 PM