AddState (Actor Block)

From WinWolf3D/WDC

Every actor starts out with no states. This command adds a state of the given state type.

Syntax

AddState statetype spritenumber rotate tics [action]

Valid in

Notes

  • There can be at most one s_stand state.
  • If SpawnStand has been used, an s_stand state must be added.
  • If SpawnPatrol has been used, an s_patrol state must be added.
  • At least one s_shoot, s_chase, and s_die state must be added.
  • The s_die state is required.
  • When the game is a VGA game, the spritenumber is any valid sprite number from the VSWAP. Spritenumbers start at 0. When the game is an EGA game, the sprite number is the EGAGRAPH chunk number.
  • Rotate can be either true or false. If it is true, the engine assumes that the next 7 sprites after the given spritenumber represent the other 7 actor directions.
  • The action is not required by the script parser, but the s_stand does need to be T_Stand, at least one of the s_path states should have T_Path, and at least one of the s_chase states should have T_Chase. It's probably a good idea for s_shoot to have a state with A_Shoot somewhere.