A_SetTics
Jump to navigation
Jump to search
action native void A_SetTics(int tics)
Usage
Changes the duration of the actor's current state in tics.
Parameters
- int tics
- The new duration of the state.
Examples
A weird, slow imp with a lot of health who becomes faster when hurt.
class WeirdImp : DoomImp { Default { Health 300; } States { See: TROO ABCD 6 { A_SetTics(health / 20); A_Chase(); } loop; } }
This version of the Chaingun fires with randomized duration, each attack state taking randomly between 1 and 2 tics:
class WeirdChaingun : Chaingun { States { Fire: CHGG AB 1 { A_SetTics(random(1,2)); A_FireCGun(); } #### # 0 A_ReFire; goto Ready; } }