void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "SpawnBrute", true, 1);
AddEntityCollideCallback("brute", "BruteDeSpawn", "DeSpawnBrute", true, 1);
AddEntityCollideCallback("Player", "brutescare", "BruteWalk", true, 1);
}
void SpawnBrute(string &in asParent, string &in asChild, int alState)
{
AddDebugMessage("Scriptarea works", true);
SetEntityActive("brute", true);
PlaySoundAtEntity("", "notice.snt", "brute", 0, false);
PlayMusic("search_brute.ogg", true, 0.8f, 0, 0, true);
SetMessage("SetMessage", "SM_Malo", 0);
AddEnemyPatrolNode("brute", "PathNodeArea_1", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_2", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_3", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_4", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_5", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_6", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_7", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_8", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_9", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_10", 0.1f, "");
AddEnemyPatrolNode("brute", "PathNodeArea_11", 0.1f, "");
}
void DeSpawnBrute(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute", false);
StopMusic(1.0f, 0);
SetMessage("SetMessage", "SM_MaloGone", 0);
}
void BruteWalk(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("bruteoutside", true);
PlaySoundAtEntity("", "notice.snt", "bruteoutside", 0, false);
PlayMusic("search_brute.ogg", true, 0.8f, 0, 0, true);
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_12", 0.1f, "");
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_13", 0.1f, "");
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_14", 0.1f, "");
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_15", 0.1f, "");
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_16", 0.1f, "");
AddEnemyPatrolNode("bruteoutside", "PathNodeArea_17", 0.1f, "");
}
void OnEnter(){
}
void OnLeave(){
}