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
Checkpoints. How do they work?
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#1
Checkpoints. How do they work?

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?

03-11-2011, 09:25 PM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#2
RE: Checkpoints. How do they work?

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.

Creator of The Dark Treasure.
03-11-2011, 09:38 PM
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#3
RE: Checkpoints. How do they work?

How do I connect the collidebox with the checkpoint?

03-11-2011, 09:46 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#4
RE: Checkpoints. How do they work?

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).

03-11-2011, 10:04 PM
Find




Users browsing this thread: 1 Guest(s)