inactivate button? Created 11 years ago2012-11-03 08:43:37 UTC by salmon salmon

Created 11 years ago2012-11-03 08:43:37 UTC by salmon salmon

Posted 11 years ago2012-11-03 08:43:37 UTC Post #310745
I have made an elevator. There's 16 buttons in all and I need them inactivated for when the elevator is in use.
I was thinking about having func_doors block the buttons so players can't reach and trigger them but that would be a problem with a player blocking another player making him die on crush.
Posted 11 years ago2012-11-03 10:45:58 UTC Post #310747
Perhaps you can make the multimanager to activate something that will trigger that button, which is meant to be inactive, when it is pressed, although I don't know how... Maybe you'll have to go to Source? :lol:
Posted 11 years ago2012-11-03 22:30:27 UTC Post #310762
I believe you can do that sort of thing with multisources as masters... but I'm afraid I don't know the mechanics of it. One of the other more knowledgable members will probably fill you in.
Jessie JessieTrans Rights <3
Posted 11 years ago2012-11-04 03:26:40 UTC Post #310765
Are the 16 buttons on an elevator panel that takes u to different floors? If yes, I'd highly recommend you don't do this because the ability to press tiny buttons on a keypad in Goldsource is very bad.
Posted 11 years ago2012-11-04 07:05:38 UTC Post #310767
Nope. I've realized it would be a bad idea with more buttons on the panel, so there's only 4 floors and I don't think I could do a bigger entity setup anyway.
The elevator moves according to what floor the player wants to go to, so I can't move the buttons with it, so I have invisible buttons on each floor. there's a total of 12 in the shaft, along with the 4 buttons on each floor that calls the elevator.

Okay I have a question. The trigger_relay can turn ents on and off. So could I have all buttons the same name (because there's no other ents triggering them) and set them to one trigger_relay?
Turning on and off actually means on and off I hope. So does it trigger button or disable it?
Posted 11 years ago2012-11-04 09:53:15 UTC Post #310769
I don't think it is possible. I haven't tried this in Goldsrc yet, but when I do this is Source all entites named with one name act the same way one of them is told to. For example, if you have two(or more) doors with the same name, then, when you open one door, all the other will do so even if they're set to be locked. :(
As for the trigger_relay - setting all buttons to have one name, then the button being pressed will be locked too, unless you make some more complex scripting.
Posted 11 years ago2012-11-04 12:52:29 UTC Post #310771
Spirit of Half-Life
Captain Terror Captain Terrorwhen a man loves a woman
Posted 11 years ago2012-11-06 10:18:25 UTC Post #310805
it didn't work because turning off button activated them and didn't turn them off. I also tried placing a clip over a button and activating a func_door to move into it's position to block the button but that just messed things up and didn't work.

help please. Could I use func_doors instead of buttons and make that work somehow?

edit:
@captain terror, I have seen that mod but haven't tried mapping with it. And what I am going for here is making an elevator used in all hl mods.
Posted 11 years ago2012-11-06 12:39:18 UTC Post #310820
Salmon, did you try multisources with masters? Check out a tutorial on them. What multisource does is it lets you enable or disable a button or any other trigger or triggerable entity for that matter, when certain conditions are met.
Here's an example of how it works: You put the master value of a door to that one multisource, and you set an entity to target the multisource. The multisource will be off at default, and the door will not function because the multisource is off. But once that entity that targets the multisource has been activated, the multisource will turn on, and the door will also turn on and start working... and you can make the multisource have multiple inputs and it will only be on once they all are active.

So you need to use your head here, you have four floors, four buttons in elevator, plus one for each floor, so 8.

What you can try doing, (this is just me thinking of ideas), Is give all the buttons the same master value, linking to your one multisource. and then whenever a button is triggered, make that button move the elevator PLUS run a little multi_manager sequence that turns the multisource off, and then on. The triggering of multisource would have to be done by the same trigger, otherwise the multisource would be waiting for multiple inputs. You can make each button trigger the same multimanager event I guess.

I hope you understand what I just wrote, I mean it seems clearly fine to me, but untill you mess around with these things you might not know what I'm talking about xD
Skals SkalsLevel Designer
Posted 11 years ago2012-11-07 01:55:42 UTC Post #310827
Called it!

Yeah. The best way to do what you're doing, probably, is to make a multimanager for each button, a trigger_relay and a multisource.

(Might need a trigger_auto to make the trigger_relay turn the multisource on by default.)

When a button is pressed, it triggers its multimanager, which moves the elevator and triggers the trigger_relay, which, in turn, triggers the multisource. I suppose you could have the path_corners (I assume you're using them for the elevator?) trigger the relay to turn it on when the elevator finishes moving.

Can't quite remember how relays work either, I'm pretty sure you can sort of use them like a switch for the multisource.
Jessie JessieTrans Rights <3
You must be logged in to post a response.