void OnStart()
{
AddEntityCollideCallback("Player", "Jump_Death", "JumpDeath", false, 1);
AddEntityCollideCallback("Player", "spawn_monster", "monsterspawn", true, 1);
AddEntityCollideCallback("Player", "jump", "jump1", false, 1);
AddEntityCollideCallback("Player", "to_02", "nope", false, 1);
SetupLoadScreen("LoadingText", "water", 0, "screen3.jpg");
}

void nope(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "Nope", 0);
}

void JumpDeath(string &in asParent, string &in asChild, int alState)

{
	PlaySoundAtEntity("", "impact_water_high.snt", "Player", 0, false);
	ChangeMap("01_hub.map", "from_aztec", "", ""); 
    FadeOut(1.0f);
	SetLanternDisabled(true);
}


void to02(string &in asParent, string &in asChild, int alState)
{
ChangeMap("02_aztec.map", "from_01", "", ""); 
} 

// JUMP HINT
void jump1(string &in asParent, string &in asChild, int alState) 
{
AddEffectVoice("jump", "", "Flashbacks", "Jump", false, "", 0, 5);
SetEntityActive("monster1", false);
}
 
 
 
// Monster Chase
void monsterspawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster1", true);
ShowEnemyPlayerPosition("monster1");
AddTimer("monsterpatrol", 2.0f, "MonsterTimer");
AddEffectVoice("run", "", "Flashbacks", "Run", false, "", 0, 5);
}

void MonsterTimer(string &in asTimer)
{
AddEnemyPatrolNode("monster1", "PathNodeArea_1", 1.0f, "");
AddEnemyPatrolNode("monster1", "PathNodeArea_2", 1.0f, "");
AddEnemyPatrolNode("monster1", "PathNodeArea_3", 1.0f, "");
AddEnemyPatrolNode("monster1", "PathNodeArea_4", 1.0f, "");
} 
 
////////////////////////////
// Run when leaving map
void OnLeave()
{

}