////////////////////////////
// Run first time starting map
void OnStart()
{
/// This Is For TESTING THE LEVEL.
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 25;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
/////////EVENT FOR THE LEVEL
/////Scary Noises And sound PRESET
AddEntityCollideCallback("Player", "ScriptArea_1", "ScaryEvent_1", true, 1);
///Start Music
AddEntityCollideCallback("Player", "Music_1", "MusicEvent_1", true, 1);
////////// MONSTER BRUTE ACTION
///Monster Scream Event
AddEntityCollideCallback("Player", "ScriptArea_2", "ScaryEvent_2", true, 1);
///Monster Existance Event
AddEntityCollideCallback("Player", "ScriptArea_3", "BruteHunt_1", true, 1);
///Brute Opening Door 1 to 4
AddEntityCollideCallback("Brute_1", "BruteArea_1", "BruteOpenDoor_1", true, 1);
AddEntityCollideCallback("Brute_1", "BruteArea_2", "BruteOpenDoor_2", true, 1);
AddEntityCollideCallback("Brute_1", "BruteArea_3", "BruteOpenDoor_3", true, 1);
AddEntityCollideCallback("Brute_1", "BruteArea_4", "BruteOpenDoor_4", true, 1);
}
///Music No.1
void MusicEvent_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("23_amb02.ogg", true, 1, 2, 1, true);
}
///SCARY DOOR ACTION 'activated by locked door'
void ScaryEvent_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "door_2", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("ScriptArea_2", true);
}
///Monster Scream
void ScaryEvent_2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "BruteEnabled_1.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "door_2", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("ScriptArea_3", true);
}
/// Brute Hunting
void BruteHunt_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute_1", true);
AddEnemyPatrolNode("Brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_5", 4, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_9", 3, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_12", 2, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_14", 5, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_18", 2, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("Brute_1", "PathNodeArea_23", 4, "");
}
//////////// THIS IS NOT WORKING...
///Monster Door Opening Event BruteArea_1
void BruteOpenDoor_1(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("door_2", 1);
}
///Monster Door Opening Event BruteArea_2
void BruteOpenDoor_2(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("door_3", 1);
}
///Monster Door Opening Event BruteArea_3
void BruteOpenDoor_3(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("door_5", 1);
}
///Monster Door Opening Event BruteArea_4
void BruteOpenDoor_4(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("door_6", 1);
}