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?
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#3
RE: How to unluck a door from another map?

Perhaps you could use global variables. Here's a snippet of code where I'm almost doing the same exact thing:
void OnEnter()
{
    AddTimer("SanityTimer", 0.5f, "UpdateSanity"); //Set up a timer on entry.
    if(GetGlobalVarInt("lockdown") == 1)
    {
        SetSwingDoorLocked("metal_1", false, false);
        AddEntityCollideCallback("Player", "ScriptArea_FinalWave", "FinalWave", true, 1);        
    }
}

Just need to set up a global variable that changes when the user removes the blockade. Upon entering the level with the exit, check and see if the global variable has changed. If it has, unlock the door.

Dark Seclusion Here
04-30-2012, 04:58 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 FragdaddyXXL - 04-30-2012, 04:58 PM



Users browsing this thread: 1 Guest(s)