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 make a door open ajar?
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#12
RE: How to make a door open ajar?

I have it sorted, thanks again Smile

One more thing though, rather than make a new thread can someone tell me how I can activate a script box within the game? I tried the SetEntityActive command but it seems to activate when the map is loaded.

EDIT:

I tried this script but it wont work, what am I doing wrong?

AddEntityCollideCallback("Player", "ScriptArea_slam", "DoorSlam", true, 1);

void DoorSlam(string &in asParent, string &in asChild, int alState)
                        
                         {
                             if(HasItem("key_tomb_rusty_2") == true)
                            {
                             SetEntityActive("ScriptArea_slam", true);
                             AddLocalVarInt("PushDoorVar", 1);
                             AddPropImpulse("castle_arched01_11", 1, 0, 0, "world");
                             SetSwingDoorClosed("castle_arched01_11", true, false);
                             SetSwingDoorLocked("castle_arched01_11", true, false);
                            }
                            else
                            {
                             SetEntityActive("ScriptArea_slam", false);
                            
                            }
                            
                              
                         }

(This post was last modified: 02-14-2013, 01:25 AM by serbusfish.)
02-14-2013, 01:01 AM
Find


Messages In This Thread
How to make a door open ajar? - by serbusfish - 02-13-2013, 03:42 AM
RE: How to make a door open ajar? - by MulleDK19 - 02-13-2013, 03:43 AM
RE: How to make a door open ajar? - by Adrianis - 02-13-2013, 11:19 AM
RE: How to make a door open ajar? - by Kreekakon - 02-13-2013, 11:56 AM
RE: How to make a door open ajar? - by Adrianis - 02-13-2013, 12:03 PM
RE: How to make a door open ajar? - by Kreekakon - 02-13-2013, 11:27 AM
RE: How to make a door open ajar? - by NaxEla - 02-13-2013, 05:02 PM
RE: How to make a door open ajar? - by serbusfish - 02-13-2013, 08:46 PM
RE: How to make a door open ajar? - by serbusfish - 02-14-2013, 01:01 AM
RE: How to make a door open ajar? - by NaxEla - 02-14-2013, 01:36 AM



Users browsing this thread: 1 Guest(s)