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?
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#10
RE: How to unluck a door from another map?

Yes I realized that xD

ok so to make a global variable to work you need to make a global.hps file that you put inside your maps folder.

then inside the global.hps you write this

////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
SetGlobalVarInt("NAMEOFVARIABLE", 0);}

then open your forest.hps and inside OnEnter() you write this:

void OnEnter()
{
if(GetGlobalVarInt("NAMETHEGLOBALVARIABLE") == 1)
{
SetLevelDoorLocked("NAMEOFLEVELDOOR", false);
}

else return;
}

then to make the global variable 1 since it was 0, you add this in the same function in AbandonedHouse.hps as the SetLevelDoorLocked code.

AddGlobalVarInt("NAMEOFTHEGLOBALVAR", 1);

I think I got everything ^^

(This post was last modified: 04-30-2012, 05:36 PM by SilentStriker.)
04-30-2012, 05:36 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 SilentStriker - 04-30-2012, 05:36 PM



Users browsing this thread: 1 Guest(s)