button reset / trigger relay help Created 15 years ago2008-11-07 18:04:28 UTC by Tetsu0 Tetsu0

Created 15 years ago2008-11-07 18:04:28 UTC by Tetsu0 Tetsu0

Posted 15 years ago2008-11-07 18:04:38 UTC Post #258239
Hey guys. I've been trying to figure this out for the past hour or so and it's really bugging me and i can't seem to make this work at all.

Here's the thing;

There's a room with a door and Three buttons in it. In order to open the door, you must press the 3 buttons in the correct order. The order is 1, 3, 2. Now if you press button 2 first, it's supossed to do nothing. Same with button 3.
Now if you press button 1, then button 2, both of the buttons reset themselves.
And when you press buttons 1 2 3 in the correct order, the door opens.

Now i have the correct order thing working but i can't seem to get the buttons to reset themselves. Here's what i have for the layout.
Button 1
Name: 1
Target: but3_change
Delay before reset: 0
-Flags-
[x] Dont move
[x] Toggle
Button 2
Name: 2
Target: reset
Delay before reset: 0
-Flags-
[x] Dont move
[x] Toggle
Button 3
Name: 3
Target: reset
Delay before reset: 0
-Flags-
[x] Dont move
[x] Toggle

Now the but3_change entity is a trigger_changetarget telling button3 to change target from "reset" to "but2_change" which in-turn tells button2 to change target from "reset" to "door_open" which opens the door. Yay.

All that works flawlessly if done in the correct order, but my reset multimanager doesnt seem to reset the buttons properly.

When "reset" is triggered it triggers trigger_relays called"reset2" and "reset3". I have the trigger state set to "off" and when triggered they just seem to toggle the buttons. And if i hit button 2 first, then button 3, both just blink forever.

I'm boggled by this.

I've tried different trigger states (off, on, toggle), i've tried "delay before reset: -1" for the buttons, and that didnt seem to work. Anyone have any ideas?
Tetsu0 Tetsu0Positive Chaos
Posted 15 years ago2008-11-08 00:16:18 UTC Post #258250
+func_button
. Name "b1"
. Target "b1ok"
. Delay before reset "0"
. Don't move

+func_button
. Name "b2"
. Target "reset"
. Delay before reset "0"
. Don't move

+func_button
. Name "b3"
. Target "reset"
. Delay before reset "0"
. Don't move

+trigger_changetarget
. Name "b1ok"
. Target "b1"
. New Target "reset"

+trigger_changetarget
. Name "b1ok"
. Target "b2"
. New Target "b2ok"

+trigger_changetarget
. Name "b2ok"
. Target "b2"
. New Target "reset"

+trigger_changetarget
. Name "b2ok"
. Target "b3"
. New Target "b3ok"

+multi_manager
. Name (targetname) "b3ok"
. 0 "reset"
. 0 "a_door"

+func_door
. Name "a_door"
. ...

+trigger_changetarget
. Name "reset"
. Target "b1"
. New Target "b1ok"

+trigger_changetarget
. Name "reset"
. Target "b2"
. New Target "reset"

+trigger_changetarget
. Name "reset"
. Target "b3"
. New Target "reset"

Untested, but it should work.
b1 = button 1
b2 = button 3
b3 = button 2
Oskar Potatis Oskar Potatis🦔
Posted 15 years ago2008-11-08 00:18:45 UTC Post #258251
that's almost what I have, but I'll check it out when I get home. Thanks for the response
Tetsu0 Tetsu0Positive Chaos
You must be logged in to post a response.