From Zandronum Wiki
Jump to navigation Jump to search
Zandronum SkulltagOverlay.png Warning: This feature is Zandronum specific and may not supported by ZDoom and its other child ports!
Documentation may not be accurate, see ACS Functions.

int ResetMap (void)


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:

    addflag MAPRESETS


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