////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
///////////////
////Callbacks
///////////////
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Collide_Area1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Collide_Area2" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_4" , "Collide_Area3" , true , 1);
AddEntityCollideCallback("Player", "InsanityArea_2", "insanity1", true, 1);
AddEntityCollideCallback("Player", "ScriptSpawn01", "ScriptSpawn1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "CollidePlayerTeleport", true, 1);
}
//////////////////////
//////Functions
//////////////////////
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
}
void Collide_Area1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_anim_wall_1" , true);
}
void PickedUpNote(string &in entity)
{
SetEntityActive("servant_grunt_2", true);
SetEntityActive("slime_pile_large_2", true);
SetEntityActive("slime_pile_large_1", true);
SetEntityActive("SlimeDamageArea_1", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_21", 10, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_45", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_47", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_46", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_48", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_49", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_50", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_90", 0, "");
}
void insanity1(string &in entity)
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
PlayMusic("insanity_baby_cry1.ogg", false, 1.0f, 0.5f, 10, false);
}
void PickedUpKey(string &in entity)
{
SetEntityActive("waterlurker_1", true);
}
void ScriptSpawn01(string &in entity)
{
SetEntityActive("ScriptArea_3", true);
}
void CollidePlayerTeleport(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_3");
FadeOut(0);
FadeIn(20);
AddDebugMessage("Teleporting!", false);
}
///////////////////////////////
//PUT CALLBACK HERE
///////////////////////////////
void UltimateTruth(string &in asDoor)
{
SetMessage("One World To Another", "UltimateTruth", 0);
}
I got a problem (again
), the teleport won't work, please help (again)
.
One World To Another [DEMO] coming soon.