1

Closed

Zombie logic: Speed code

description

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 9:43 AM by lbooker

comments

lbooker wrote Oct 8, 2007 at 12:49 PM

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 9:43 AM

wrote Feb 1, 2013 at 2:56 AM

wrote May 13, 2013 at 6:28 PM