ResetMap

Revision as of 16:31, 21 August 2016 by DrinkyBird (talk | contribs) (Created page with "{{Template:ACSWarning}} int '''ResetMap ''' (void) ==Usage== Resets the map like in Survival after a mission start or fail. Everything will be restored as it was when the ma...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int ResetMap (void)

Usage

Resets the map like in Survival after a mission start or fail. Everything will be restored as it was when the map first started. The map will be reset after the tic ends, any commands stated immediately after ResetMap will be executed before the map actually is reset.

Note: In order to use this function, the MapResets flag must be set for the gamemode in question. It is set by default in Survival, (T)LMS, Invasion and Duel. For other modes, including possession which actually does not do map resets, the flag must be set via the GAMEMODE lump. This is because storing original stats for actors requires extra memory and CPU cycles from the server.

Example GAMEMODE lump:

Cooperative 
{
    addflag MAPRESETS
}

Examples

Script 5 DEATH
{
    PrintBold(s: "You've died! Restarting map.");
    Delay(90);
    ResetMap();
}