ResetMap

From ZDoom Wiki
Jump to: navigation, search
SkulltagIcon.png Warning: This feature is Skulltag specific, and is not compatible with ZDoom!
To see all of Skulltag's specific features, see Skulltag features.

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();
}