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

(04-30-2012, 04:58 PM)FragdaddyXXL Wrote: 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.
I wouldn't say right off that that wouldn't work cause im not good with the global variable thing infact i dont know what it actual do Smile


But its 2 diffrent maps

that that in "Forest.map" the door is locked ((blocked from the inside) which is in AbandonedHouse.map)

And in AbandonedHouse.map the door is blocked so when the blockade is removed you can go outside into Forest.map but you can't go inside since the door is still locked :-)
(04-30-2012, 05:01 PM)SilentStriker Wrote: What kind of blockade is it btw? since you can always use the built in PlayerInteractionCallback in the entity and then call SetSwingDoorLocked from there Smile
In the map editor Entities\gameplay\wooden_boards_block (the second last) :-)
(This post was last modified: 04-30-2012, 05:17 PM by z3akx.)
04-30-2012, 05:13 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, 05:13 PM



Users browsing this thread: 1 Guest(s)