Frictional Games Forum (read-only)

Full Version: Checkpoints. How do they work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I didn't find anything with a search and I don't really understand this script.

So this is what I should do to get a checkpoint.
CheckPoint(string& asName,string& asStartPos ,string& asCallback, string &asDeathHintCat, string &asDeathHintEntry);

I understand everything in that one. But I don't really understand what I have to do with this one

MyFunc(string &in asName, int alCount)

I know what to fill in at the name and for count it should be. But I don't understand the count. So if a player dies. How does the game know that he has to load at that point?
Does the player have to collide with the checkpoint first? Or does the game take care of that?
I make a collidebox and put the checkpoint code in it. If the player collides with it, he will spawn at the checkpoint if he dies.
How do I connect the collidebox with the checkpoint?
Create a PlayerStartArea.
Then make a ScriptArea somewhere else that will trigger the checkpoint.
Add a EntityCollideCallback with that script area and put CheckPoint(string& asName,string& asStartPos ,string& asCallback, string &asDeathHintCat, string &asDeathHintEntry); into the function, whereas the StartPos is your new PlayerStartArea.

Quote:I know what to fill in at the name and for count it should be. But I don't understand the count. So if a player dies. How does the game know that he has to load at that point?
The count means the amount of deaths the player already had. That function will always be called when the player dies (like in the main story, where monsters spawned at other spots and after some deaths didn't spawn at all anymore).