CancelFade

From ZDoom Wiki
Revision as of 01:49, 1 March 2013 by Deded007 (talk | contribs) (links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

void CancelFade (void);

Usage

If either FadeTo or FadeRange is currently in progress, CancelFade stops it and turns off the palette flash. If neither of these in progress, it does nothing.

Examples

This alarm flashes the screen red and makes an alarm sound.

script 1 (void)
{
    AmbientSound("special/alarm",127);
    FadeTo(255, 0, 0, 0.9, 1.0); 
    Delay(1*35);
    FadeTo(255, 0, 0, 0.9, 1.0); 
    Delay(1*35);
}

The only way to shut it of is to hit a switch which executes script 2.

script 2 (void)
{
    ACS_Terminate(1,0);
    CancelFade();
}