04-30-2012, 06:21 PM
So i'll put it like this?
In the Global.hps
In the Forest.hps
And in AbandonedHouse.hps
If not then i dont get it :/
In the Global.hps
Code:
////////////////////////////// Run at the start gamevoid OnGameStart(){SetGlobalVarInt("AbandonedHouseDoorUnluck", 0);}
In the Forest.hps
Code:
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
Code:
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);}
If not then i dont get it :/
(04-30-2012, 06:21 PM)z3akx Wrote: [ -> ]So i'll put it like this?Wow thats hard as hell to read dont know why it's set it up like that sorry
In the Global.hps
Code:////////////////////////////// Run at the start gamevoid OnGameStart(){SetGlobalVarInt("AbandonedHouseDoorUnluck", 0);}
In the Forest.hps
Code: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
Code: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);}
If not then i dont get it :/