Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with checkpoints
Max504 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#1
Problem with checkpoints

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.
09-08-2011, 02:10 AM
Find
MegaScience Offline
Member

Posts: 213
Threads: 1
Joined: Aug 2011
Reputation: 2
#2
RE: Problem with checkpoints

http://wiki.frictionalgames.com/hpl2/amn..._functions Wrote:
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

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.
09-08-2011, 03:08 AM
Find
Max504 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#3
RE: Problem with checkpoints

Thanks, I think I solved the problem.
09-08-2011, 05:14 AM
Find




Users browsing this thread: 1 Guest(s)