The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Checkpoint problem - by amusei - 09-02-2012, 12:40 PM
RE: Checkpoint problem - by Your Computer - 09-02-2012, 12:46 PM
RE: Checkpoint problem - by amusei - 09-02-2012, 12:51 PM



Users browsing this thread: 1 Guest(s)