Im so sorry man that failed xD
In the Global.hps
////////////////////////////// Run at the start game
void OnGameStart()
{
SetGlobalVarInt("AbandonedHouseDoorUnluck", 0);
}
In the Forest.hps
void OnStart(){ PlayMusic("ambience_wind_eerie.ogg", true, 0.4f, 0, 0, false);
AddEntityCollideCallback("Player", "ScriptArea_1", "scream", true, 1); SetEntityPlayerLookAtCallback("corpse_male_leg_1", "LookAtScare_1", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "Bugs", true, 1);
AddEntityCollideCallback("Player", "BreakFence", "OldFence", true, 1);
AddEntityCollideCallback("Player", "AreaCaveMonster", "CollideActivateBreath", true, 1); SetEntityPlayerInteractCallback("Cave", "Level_Cave", false);
SetEntityPlayerLookAtCallback("Cave", "CaveText", false); SetEntityPlayerInteractCallback("WindowAbandonedHouse", "Level_AbandonedHouse", false); SetEntityPlayerLookAtCallback("WindowAbandonedHouse", "WindowText", false); if(GetGlobalVarInt("UnluckAbandonedHouseDoor") == 1)
}
SetLevelDoorLocked("Level_AbandonedHouse", false);
{ else return;
}
And in AbandonedHouse.hps
void BreakBlockade(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Blockade", false);
SetEntityActive("BlockadeBroken", true);
CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("Crowbar_2", false);
SetEntityActive("CrowbarBroken", true);
PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false); SetLevelDoorLocked("Level_Forest", false);
GiveSanityBoostSmall();
AddGlobalVarInt("AbandonedHouseDoorUnluck", 1);
}
That should be better
Though i have no idea why the text keeps changing place from how i write it to how it's shown soz