A_JumpIfNoAmmo

From ZDoom Wiki
Jump to: navigation, search

A_JumpIfNoAmmo (int offset)
A_JumpIfNoAmmo (str "state")


This function can only be used with weapons. It jumps if the carrying player doesn't have enough ammunition for one attack of the currently used attack mode (defaulting to primary fire if called outside of a fire state).

Offset is the number of frames to jump ahead when there is no ammo. State is what state to jump to when you're out of ammo.

Examples

  States
  {
    Fire:
     CISG A 0 A_JumpIfNoAmmo("Reload")
     CISG B 1 BRIGHT A_GunFlash
     TNT1 A 0 A_FireCustomMissile("PistolShellcasingSpawn",0,0,-6,2)
     CISG B 1 A_FireBullets(3,2,-1,9.2,"BULLETHIT",1,0)
     CISG C 2
     CISG D 2
     CISG E 2
     Goto Ready
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox