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
Checkpoint problem
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#1
Wink  Checkpoint problem

Hi, guys.

I have a problem with my checkpoints. So far I have created 4 checkpoints. But if the player has already died 2 times every next time he dies he is respawned on the position of the 2nd checkpoint that he was respawned to.

For example: let's say there are 4 rooms. When the player enters each room he gets a checkpoint outside THAT ROOM and then dies(under mysterious circumstances Big Grin). So the player enters the FIRST ROOM-dies and is respawned outside the FIRST ROOM. Then he enters the SECOND ROOM- dies and is respawned outside the SECOND ROOM. And then he enters the THIRD ROOM- dies and is respawned outside the SECOND ROOM. Same for the fourth.

If you understood anything from my petty attempt to explain my problem, here is the script for the 4 Checkpoints. I don't know if the problem is in the script, though.
void OnStart()
{    
AddEntityCollideCallback("Player", "CheckpointArea1", "CreateCheckpoint1", true, 1);
AddEntityCollideCallback("Player", "CheckpointArea2", "CreateCheckpoint2", true, 1);
AddEntityCollideCallback("Player", "CheckpointArea3", "CreateCheckpoint3", true, 1);
AddEntityCollideCallback("Player", "CheckpointArea4", "CreateCheckpoint4", true, 1);
}

void CreateCheckpoint1(string &in asParent, string &in asChild, int alState)
{
    CheckPoint("", "CheckPoint1", "", "DeathHints", "DeathHint1");
}

void CreateCheckpoint2(string &in asParent, string &in asChild, int alState)
{
    CheckPoint("", "CheckPoint2", "", "DeathHints", "DeathHint2");
}

void CreateCheckpoint3(string &in asParent, string &in asChild, int alState)
{
    CheckPoint("", "CheckPoint3", "", "DeathHints", "DeathHint3");
}

void CreateCheckpoint4(string &in asParent, string &in asChild, int alState)
{
    CheckPoint("", "CheckPoint4", "", "DeathHints", "DeathHint4");
}
(This post was last modified: 09-02-2012, 12:53 PM by amusei.)
09-02-2012, 12:40 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Checkpoint problem

Checkpoint names have to be unique.

Tutorials: From Noob to Pro
09-02-2012, 12:46 PM
Website Find
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#3
RE: Checkpoint problem

(09-02-2012, 12:46 PM)Your Computer Wrote: Checkpoint names have to be unique.
Well, that worked. Thanks Smile
09-02-2012, 12:51 PM
Find




Users browsing this thread: 1 Guest(s)