|
Post by yaznee on Oct 12, 2011 15:21:20 GMT
On one part of my map I'm making an XC (climb) part and would like a sequence of events to happen. 6 Buttons1 Fake Door1 env_shake1 boulder1 func_breakableThe idea is, you have to climb and press 6 hidden buttons around the room (in any order), to open what players will think is a door leading to the next part, but what will happen is a boulder will fall from the ceiling and smash the steps, which will lead to an ancient underground temple what I've managed to do so far is, when pressing one button, the env_shake starts the func_breakable breaks then releases the boulder what then smashing the step How can I make it so the env_shake starts , func_breakable breaks and the boulder doesn't fall until all 6 buttons are pressed? This time the buttons don't have to be pressed in a certain order and don't reset. Cheers...
|
|
|
Post by Zeph on Oct 12, 2011 21:31:00 GMT
you need one Logic_Branch per button.
OnPressed -> Logic_Branch_1 -> SetValue -> 1
Then you need one Logic_Branch_Listener
OnAllTrue -> Func_Breakable -> Break
----------------- OR -------------------
Have one Math_Counter Start Value = 0. For each button: OnPressed -> Math_Counter -> Add -> 1 OnPressed -> Self -> disable/lock
Then have a Logic_Case, with keyvalues: Case01 = 1 Case02 = 2, etc
Add the output to the math counter: Outvalue -> Logic_Case -> InValue
Now you can have an output on each OnCase. So: OnCase01 -> Start Rumble. OnCase06 -> Break
etc
|
|
|
Post by yaznee on Oct 13, 2011 18:44:07 GMT
Hey, would you mind going into a little more detail please? I can't for the life of me get this to work lol... For the sake of this example, and till I understand it, let's try it with only two buttons? So I would name both of my buttons (button_1 and button_2) and name the first (Logic_Branch_1 and the second Logic_Branch_2) and finally name the Logic_Branch_Listener (Logic_Branch_listener_1) _________________________________________________________________________________________ Button_1 OutPuts> OnPressed >Logic_Branch_1 >SetValue 1 Button_2 OutPuts> OnPressed >Logic_Branch_2 >SetValue 2? or 1 (I've tried both, both failed) Logic_Branch_listener OutPuts> OnAllTrue > Break_ceiling_1 > Break So now I've added outPuts to each " Logic_Branch_" of OnTrue > Break_ceiling_1 >Break And still no luck Where am I going wrong here? Please help Cheers.
|
|
|
Post by Zeph on Oct 13, 2011 21:17:24 GMT
Branches are either 0 (false) or 1 (true).
Try the math counter one, it's a little more flexible.
Func_Button "button_1" OnPressed -> !self -> lock OnPressed -> "counter" -> Add -> 1
Same for the other buttons.
Math_Counter "counter" OutValue -> "case" -> InValue
Logic_Case "case" Case01 = 1 Case02 = 2 Case03 = 3 Case04 = 4 Case05 = 5 Case06 = 6 OnCase01 -> "shake" -> ...shake? OnCase06 -> "break_ceiling_1" -> break
|
|
|
Post by yaznee on Oct 16, 2011 16:37:46 GMT
GRRRRRRR, This also didn't work, and I followed it exactly like you explained. Any other way?
Cheers...
|
|
|
Post by Zeph on Oct 16, 2011 19:43:43 GMT
Ok, so it's four buttons... Suggest playing before looking at the map (ie compile right away) Attachments:
|
|
|
Post by yaznee on Oct 16, 2011 20:10:45 GMT
Ah, I didn't name the buttons on the case_logic 1,2,3,4,5,6 I only added the outputs. Also on the buttons you added a dely 0.50, whereas I didn't Thanks man
|
|