Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help How to unluck a door from another map?
z3akx Offline
Junior Member

Posts: 15
Threads: 4
Joined: Dec 2011
Reputation: 0
#11
RE: How to unluck a door from another map?

So i'll put it like this? Big Grin

In the Global.hps

////////////////////////////// Run at the start gamevoid 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);}


If not then i dont get it :/
(04-30-2012, 06:21 PM)z3akx Wrote: So i'll put it like this? Big Grin

In the Global.hps

////////////////////////////// Run at the start gamevoid 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);}


If not then i dont get it :/
Wow thats hard as hell to read dont know why it's set it up like that sorry Smile
(This post was last modified: 04-30-2012, 06:22 PM by z3akx.)
04-30-2012, 06:21 PM
Find


Messages In This Thread
How to unluck a door from another map? - by z3akx - 04-30-2012, 03:54 PM
RE: How to unluck a door from another map? - by z3akx - 04-30-2012, 06:21 PM



Users browsing this thread: 1 Guest(s)