Frictional Games Forum (read-only)
[SCRIPT] Adding More Than One Checkpoint spawns back to first one - 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: [SCRIPT] Adding More Than One Checkpoint spawns back to first one (/thread-14404.html)



Adding More Than One Checkpoint spawns back to first one - heyitsrobert97 - 04-01-2012

I need Help to Remove a Checkpoint when I Reach Another Area So that I Can Create Another Checkpoint in the map. When I add the checkpoints with different names when i die it still takes me to the first checkpoint i placed, and on my map you have to progress where the doors behind you lock. and if u spawn behind a locked door you can't get back. Heres Some Of The Script

------------------------------------------------------------------------------------------------

void SetEntityActive(string &in asParent, string &in asChild, int alState)<--CALLBACK WHEN HIT SCRIPT AREA
{
SetEntityActive("roomonegrunt", true);
ShowEnemyPlayerPosition("roomonegrunt");
CheckPoint ("", "respawn1", "", "", ""); <---- THE CHECKPOINT AND I NAMED THE START AREA 'respawn1'
AddUseItemCallback("", "hallkey", "halldoor", "hallkeydoor", true);
SetEntityPlayerInteractCallback("armorguy", "knightspawn", false);
}
...... NEXT PART OF SCRIPT FOR CHECKPOINT ......

void hallmusicscare(string &in asParent, string &in asChild, int alState) <- HIT SCRIPT AREA
{
SetSwingDoorLocked("halldoor", true, true);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
CheckPoint ("", "hallspawn", "", "", ""); <--- CHECKPOINT. START AREA IS CALLED 'hallspawn'
GiveSanityDamage(20.0f, false);
PlayMusic("Music_03.ogg" , true, 10.0f, 2.0f, 0, true);
SetMessage("halldoormessage", "message", 5.0f);
SetEntityPlayerInteractCallback("frontdoor", "frontdoorlock", false);
AddEntityCollideCallback("Player", "pigspawn", "pigscare", true, 1);
SetEntityCallbackFunc("normalkey", "normfunc");
}

THERE IS 2 MORE SCRIPTS BUT EVERYONE JUST GOES BACK TO THE FIRST ONE!
----------------------------------------------------------------------------------------------------------

ANY HELP APPRECIATED!Big Grin




RE: Adding More Than One Checkpoint spawns back to first one - heyitsrobert97 - 04-01-2012

I Have Found Out How To Fix It. on CHECKPOINT
CheckPoint ("checkpoint1", "playerstart_2", "callback", "DeathHintCat", "DeathHintEntry");