Button combinations
Post Reply
Quote
Re: Button combinations
Posted by dilbert_halflife on Mon Mar 27th at 11:36am 2006


Hi,

I am trying to create a panel with three buttons on it which are set to toggle.

This will give me 8 possible combinations, from none pressed through to all pressed.

What I want is for each combination to trigger a different event. In my test case I used 8 lights, but the the finished one it will enable or disable 7 trigger_teleports with different destinations.

By using login_counter and logic_compare I can turn on the lights acording to the combination of buttons, but I can't get them to turn off properly.

For instance if button1 & button2 are pressed light3 comes on (great! just what I want) however if I unpress either button light3 stays on until both buttons are unpressed. I want them to turn off whenever the combination changes.





Quote
Re: Button combinations
Posted by dilbert_halflife on Tue Mar 28th at 10:22am 2006


I've managed to work this out for myself at last!

I used a math_counter and a logic_case to convert the button combinations into a sequence of lights.

So:

Button 1 pressed: Just Light 1 on

Button 2 pressed: Just Light 2 on

Buttons 1 & 2 pressed: Just Light 3 on etc...

I will replace the lights in my real map with teleporters and I then have coded teleporter destinations!





Quote
Re: Button combinations
Posted by soulpiercer7 on Fri May 26th at 1:10am 2006


that's extremely awsome. You should write a tutorial for it and post it somewhere. I'm pretty sure this would make a great addition to many maps. Good job on your discovery.

if you decide to write the tutorial, email me a link.
soulpiercer7@gmail.com
="text/css"></head><body topmargin=2 leftmargin=2>




Quote
Re: Button combinations
Posted by Immortal D on Fri May 26th at 5:39pm 2006


I am doing something similar with teleport/spawn points. Use a math counter and point_template to assign random destinations. This is to prevent people from spawning into each other when teleporting lol. Funny to see everyone piled together and stuck though.<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>


Don't sweat the petty things and don't pet the sweaty things-D




Post Reply