For the checkpoint, what you must do is you have to re-apply all the functions that happen when encountering the monster. I will use my script for example
What this does is before you die the function will run normally as it should the first time through. Now when you die and you respawn at the checkpoint, the script will register that the monster encounter has already happened and doesn't need to do it again unless you declare it in the checkpoint function, that way when you die the script knows that it has to run the function again
Hope this helped
void OnStart
{
AddEntityCollideCallback("Player", "monster_spawn", "monsterspawn", true, 1);
CheckPoint("check01", "PlayerStartArea_2", "CheckPoint01", "", "");
}
void CheckPoint01(string &in asName, int alCount)
{
SetPlayerHealth(RandFloat(80, 95));
AddEntityCollideCallback("Player", "monster_spawn", "monsterspawn", true, 1);
ResetProp("monster_door");
}
void monsterspawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", true);
SetPropHealth("monster_door", 0.0);
ShowEnemyPlayerPosition("servant_grunt_2");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0.0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0.0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0.0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0.0, "");
}