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