PDA

View Full Version : The Ever Popular Buttons and Lifts Topic


RelFexive
05-11-2002, 05:21 PM
OK, so here's the deal:

I have a func_door that goes up and down to act as a lift. It's controlled by two func_usable 'buttons' tied to trigger_multiple boxes aimed at the 'buttons' and targetted on the lift.

Each 'button' is in fact two brushes overlaying each other, one set to "always_on" and one to "start_off" (each with a different texture), so that when you press the 'button' it switches between the two brushes to show it has been activated.

The thing is, how do you make the 'button' switch back automatically to the off state once it is pressed? In other words, the 'button' starts off black and turns green when you press it, but at the moment it stays green until you press it again; how do you make it switch back after a few seconds to the original, black look?

And secondly, how do you make the lift stay in the up position until either button is pressed again?

This question applies to making doors stay open and close only when a button is pressed too.

Manquesa
05-11-2002, 11:33 PM
did you trying adding a wait value for the button, Key: wait, Value: (time) where (time) is the amount of time in seconds to wait before returning to it's original position.

RelFexive
05-14-2002, 06:01 PM
Yes, but it did not work.

Adding 'wait' seems to stop the button working completely somehow.

At the moment it just switches from one brush being active to the other, so every time you 'press' the button (using the linked trigger_multiple) it switches from black to green or from green to black, activating the lift as it does so.

What I want it to do is start off black, switch to green when it is 'pressed' and switch back to black after a few seconds.

Anyone got any ideas?

Manquesa
05-14-2002, 08:39 PM
Well I don't understand why the button doesn't return to it's original postion after being pressed, that should be the natural characteristic of the button without having to set any additional options.

But as far as your other question about making the lift stay up once it goes up. According to the entity info menu of the func_door, setting a wait value of -1 will make it so it will never return, which should be exactly what you're talking about.

RelFexive
05-14-2002, 08:45 PM
The buttons aren't buttons precisely, just func_usable brushes.

I have to admit that I'm not really sure how/why the two brushes swap position, one vanishing while the other becomes visible. I just got it from a post on this forum somewhere. I reposted it in the "func_usable" - gah! thread....

I'll have to give that 'wait -1' thing a go and let you know if it works....

Manquesa
05-14-2002, 08:59 PM
oh I didn't realize that, try changing them to func_buttons, they work very much like buttons in real life. For what you're doing this is what I would try. Make a brush for the off button and make it a func_button entity. Then make a brush for the on button placed in a manner where the func_button brush overlaps the on button brush so you can't see it in it's normal position. Don't make that second on button brush an entity, it doesn't need to move. Of course target the button to your lift (door, whatever). Now, when you push the button it will move back to reveal the on switch and then a few seconds later will return to look off again. You CAN set the wait value for func_buttons to determine how long it will stay pressed once it moves before it returns. Also you can set the direction it moves via the angle command. As for triggering the button with a trigger, that's up to you, but is not necessary.

Hope this helps, I think that's what you were going for.

RelFexive
05-15-2002, 01:40 PM
Not a bad idea. I'll give it a go and let you know if it works....