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
#13
RE: How to unluck a door from another map?

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 Big Grin

Though i have no idea why the text keeps changing place from how i write it to how it's shown soz Smile
04-30-2012, 06:51 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:51 PM



Users browsing this thread: 1 Guest(s)