Frictional Games Forum (read-only)
Checkpoint problem - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Checkpoint problem (/thread-18106.html)



Checkpoint problem - amusei - 09-02-2012

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.
Code:
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");
}



RE: Checkpoint problem - Your Computer - 09-02-2012

Checkpoint names have to be unique.


RE: Checkpoint problem - amusei - 09-02-2012

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