A_Countdown

From ZDoom Wiki
Jump to navigation Jump to search

void A_Countdown ()

Error.gif
Warning: this function should only be used with missile-type actors. Using it with other types is considered undefined behavior, and may result in unwanted side effects.

Usage

Counts ReactionTime down until it reaches 0 and then destroys the calling actor.

Examples

This revenant missile follows the target until its animation has played 25 times, upon which it then explodes.

actor RevenantTracer2 : RevenantTracer
{
    ReactionTime 25

    States
    {
    Spawn:
        FATB AB 2 Bright A_Tracer
        FATB A 0 A_Countdown
        Loop
    }
}