Just tested out ChangeMap() to the same map - It behaves just like a " Quick Map Reload " except with a short fadein/fadeout. It actually doesn't reset the state of the enemy though. Will see if i can find a workaround.
Edit 2: Problem is caused by map state persisting over level load. This can be fixed with the following approach which switched between two maps, however I am unsure if this will still load quickly - DO test it out though!
To elaborate (though i'm not entirely sure it is necessary) i made a map called "test", and a map called "test_throwback". Test was just a simple map involving a plane and a patrolling enemy:
void OnStart() {
SetSanityDrainDisabled(true);
GiveItemFromFile("lantern","lantern.ent");
SetLanternLitCallback("onLit");
for(int i=1; i<=3; i++) AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_"+i,0.1f,"");
}
void OnEnter() {
AddDebugMessage("Currently on Test map!",false);
}
void onLit(bool abLit) {
ClearSavedMaps();
if(abLit) resetMap("test.map","");
}
void resetMap(string &in asMap, string &in asPos) {
SetGlobalVarString("_DESTINATIONMAP",asMap);
SetGlobalVarString("_DESTINATIONPOS",asPos);
DestroyDataCache(); CreateDataCache();
ChangeMap("test_throwback.map","","","");
}
The throwback map was literally just a copy with a different hps file - for the fastest loading times a completely blank map with just 1 start area may be better.
void OnEnter() {
ClearSavedMaps();
ChangeMap(GetGlobalVarString("_DESTINATIONMAP"),GetGlobalVarString("_DESTINATIONPOS"),"","");
AddDebugMessage("Entered Test Throwback map",false);
}
Of course, finding some way to get the game to "forget" the state of the map without transitioning to another blank map first will be tonnes better, as there will be no loading screen - this would actually be exactly what you are looking for. However, as it is I'm not suggesting you solely use this solution as it clearly doesn't meet your requirements, but it could be an effective solution to the problem of the finite number of resets with the "tonne of deactivated grunts" approach.
Edit again:
Graveyard corpse is just a permutation of "enemy_grunt" type - it will follow path nodes but still have the same problems with not being able to add them dynamically. You may be able to simulate path nodes by using a water lurker style enemy + invisible food if the game doesn't allow path nodes to be added to lurkers?