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
My Basement settings...
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: My Basement settings...

Instead of having this block on the buttons:
PHP Code: (Select All)
if(GetLocalVarInt("Button1") == && GetLocalVarInt("Button2") == 1) {
    
SetEntityActive("Area"false);
    return;


You can move it to your lever. That will make so the lever will activate the area IF both buttons on the side have already been pressed. For the button scripts, just leave the last line, but remove the "else" keyword.

To move it to the lever, you need to place it within a ConnectionStateChangeCallback. If you only want it to work if you pull the lever either up or down, add another if-statement checking the alState parameter for 1 or -1.

Also, make sure the names of your buttons match in the script. Captials matter! button1 is not the same as Button1.

(This post was last modified: 08-30-2014, 12:39 PM by Mudbill.)
08-30-2014, 12:37 PM
Find


Messages In This Thread
My Basement settings... - by Amnesiaplayer - 08-30-2014, 11:42 AM
RE: My Basement settings... - by Mudbill - 08-30-2014, 12:37 PM
RE: My Basement settings... - by Amnesiaplayer - 08-30-2014, 12:49 PM



Users browsing this thread: 1 Guest(s)