Frictional Games Forum (read-only)

Full Version: Problem with checkpoints
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok I know there are a lot of threads about script problems but I searched and I couldn't find a solution to my problem. I'm fairly new to making maps in amnesia (just a couple of days) but I think I'm getting the hang of it.

In the custom story I'm making there is a part where you must run from a monster through a library, get into a room that locks when you enter (and the monster starts hitting the door) and then pass through a gate that is opened with a valve, the problem is that if the player gets killed in the chase he goes back to the checkpoint I placed before the start of the chase script but because the script already happened the monster doesn't appear again.

I wonder if there's some way to make the game load the last autosave instead of just teleporting the player back to the playerstart area. Thanks for your help.
http://wiki.frictionalgames.com/hpl2/amn..._functions Wrote:
Code:
CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!
asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file

Code:
CheckPoint("StartUpCP", "PlayerStartArea_1", "ResetMap", "DeathHint", "DescriptionOne");

So you make a startpoint where you want the player to respawn, set up a asCallback to reset the monster event, even a death note if you want.
Thanks, I think I solved the problem.