Button combinations

Button combinations

Re: Button combinations Posted by dilbert_halflife on Mon Mar 27th 2006 at 11:36am
Posted 2006-03-27 11:36am
8 posts 21 snarkmarks Registered: Apr 20th 2005 Occupation: Company Director, Games Programmer Location: UK
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.
Re: Button combinations Posted by dilbert_halflife on Tue Mar 28th 2006 at 10:22am
Posted 2006-03-28 10:22am
8 posts 21 snarkmarks Registered: Apr 20th 2005 Occupation: Company Director, Games Programmer Location: UK
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!
Re: Button combinations Posted by soulpiercer7 on Fri May 26th 2006 at 1:10am
soulpiercer7
1 post
Posted 2006-05-26 1:10am
1 post 0 snarkmarks Registered: May 26th 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>
Re: Button combinations Posted by Immortal D on Fri May 26th 2006 at 5:39pm
Immortal D
7 posts
Posted 2006-05-26 5:39pm
7 posts 1 snarkmarks Registered: May 26th 2006
<span style="color: lightblue;"><span style="color: violet;">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.</span></span><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