(01-01-2012, 12:31 AM)Your Computer Wrote: Then i'm going to have to see everything in the script that leads to these CheckPoint functions.
Well here's my whole HPS file, but I'll put the checkpoint functions in bold.
////////////////////////////
// Run first time starting map
void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
}
AddEntityCollideCallback("Player", "monsterchase", "startmonsterchase", true, 1);
AddEntityCollideCallback("Player", "startrunevent", "startrunevent", true, 1);
AddEntityCollideCallback("Player", "spawnmonstertwo", "spawnothermonster", true, 1);
AddEntityCollideCallback("Player", "slamdoor", "slamdoor", true, 1);
AddEntityCollideCallback("Player", "whereisthistakingme", "darkpath", true, 1);
AddEntityCollideCallback("Player", "deadend", "deadendmessage", true, 1);
StopSound("monsterout", 0);
SetLanternDisabled(false);
CheckPoint("CheckPoint", "PlayerStartArea_1", "BadEndingCredits", "DeathHints", "BadEndingDeathHint");
}
void BadEndingCredits(string &in asName, int alCount)
{
StartCredits("", false, "Ending", "MainCreditsBad", 3);
}
void startmonsterchase(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", true);
FadeInSound("monsterout", 0, false);
PlayMusic("run.ogg", true, 0.7, 1, 0, true);
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_12", 0, "");
}
void startrunevent(string &in asParent, string &in asChild, int alState)
{
ShowEnemyPlayerPosition("closetgrunt");
}
void spawnothermonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("closetgrunt", false);
SetEntityActive("grunt", true);
ShowEnemyPlayerPosition("grunt");
}
void slamdoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("lastdoor", true, true);
}
void darkpath(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_darkpath_Name", 2.5f);
}
void deadendmessage(string &in asParent, string &in asChild, int alState)
{
SetMessage("MessageDisplay", "Message_deadend_Name", 2.1f);
AddTimer("lookatmonster", 1.9f, "lookatmonster");
}
void lookatmonster(string &in asTimer)
{
StartPlayerLookAt("grunt", 9.0f, 9.0f, "");
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, true);
StopMusic(2.0f, 0);
SetPlayerActive(false);
CheckPoint("CheckPoint", "PlayerStartArea_1", "TestFunction", "DeathHints", "GoodEnding");
}
void TestFunction(string &in asName, int alCount)
{
ChangeMap("A.C.A - Start.map", "PlayerStartArea_1", "", "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}