A_CountdownArg

From ZDoom Wiki
Jump to: navigation, search

A_CountdownArg (int arg[, str targstate])


This function counts one of the actor's args down until it reaches 0 and then destroys it.

  • arg: Which argument to decrement, using a zero-based index. The first argument is 0, the second is 1, etc. Only values in the 0–4 range are valid, any other will result in the function doing nothing.
  • targstate: Which state to send the calling actor once the countdown is reached. (The Death state by default.) This only affects non-shootable, non-missile actors.

The method used to destroy the calling actor depends on its actor flags.

  • If it has the MISSILE flag:
    When the countdown is reached, the missile explodes.
  • Otherwise, if it has the SHOOTABLE flag:
    When the countdown is reached, the actor is dealt an amount of damage equal to its health property.
  • In all other cases:
    The actor is placed in its Death state, or in targstate if one is provided.

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox