Trigger happy
schkorpio
I can mspaint Join Date: 2003-05-23 Member: 16635Members
<div class="IPBDescription">disabling a button?</div>Its me again <img src="style_emoticons/<#EMO_DIR#>/tounge.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tounge.gif" />
I'm trying to make a button which can be deactivated by destroying a func_breakable next to the button. however with not much luck.
I've tried doing it like this
Func_button, "Master" value pointing at a multisource entity
Now the button should function as normal, and when the nearby func_breakable is destroyed it switches off the master (multisource entity) therefore locking the button.
my problem is that the button starts locked, and when you destory the func_breakable it unlocks the button - which is the exact opposite of what i'm trying to achieve lol.
How would I make the button unlocked to begin with ? <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /> (btw it doesnt need to b ea button, just something that can be triggered multiple times until the breakable is destroyed)
I've tried playing with relays and such, but its not looking good so far :S
Of course i can always hide the button behide a door and then have the door close once the breakable is destroyed, but its not very elegant.
I'm trying to make a button which can be deactivated by destroying a func_breakable next to the button. however with not much luck.
I've tried doing it like this
Func_button, "Master" value pointing at a multisource entity
Now the button should function as normal, and when the nearby func_breakable is destroyed it switches off the master (multisource entity) therefore locking the button.
my problem is that the button starts locked, and when you destory the func_breakable it unlocks the button - which is the exact opposite of what i'm trying to achieve lol.
How would I make the button unlocked to begin with ? <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /> (btw it doesnt need to b ea button, just something that can be triggered multiple times until the breakable is destroyed)
I've tried playing with relays and such, but its not looking good so far :S
Of course i can always hide the button behide a door and then have the door close once the breakable is destroyed, but its not very elegant.
Comments
Can I use a trigger once, which triggers a trigger_relay to set the multisource to on? or will that just mean it will only do 1/2 of the job, as in i'll still need to destroy the breakable and trigger the trigger_once for it to do it. :s confused.
<a href="http://img461.imageshack.us/my.php?image=hivebeambb3.png" target="_blank"><img src="http://img461.imageshack.us/img461/3963/hivebeambb3.th.png" border="0" alt="IPB Image" /></a>
The idea being that the player walks through the trigger_once, and which goes thru the relay which turns the multisource ON, making the button active.
Then if the breakable is broken it triggers the second relay which turns the multisource OFF making the button inactive - i could also have it kill target the first relay so that if the breakable is destroyed before the button cannot be re-enabled.
Any one know if this might work?
The idea being that the player walks through the trigger_once, and which goes thru the relay which turns the multisource ON, making the button active.
Then if the breakable is broken it triggers the second relay which turns the multisource OFF making the button inactive - i could also have it kill target the first relay so that if the breakable is destroyed before the button cannot be re-enabled.
Any one know if this might work?
<!--QuoteEnd--></div><!--QuoteEEnd-->
I have no real mapping experience, so this is just a guess:
Why not make 2 glass shields, that encase the button? (think like the nuke button hl, except that there are 2 shields)
When you walk through the trigger_once the glass shield retracts, allowing access to the button.
When the breakable gets broken the 2nd glass shield (which has been retracted the whole time) will encase the button sealing access off.
As already said: I have no idea how feasible this is.
If func_button <b>AND</b> func_breakable are, active trigger the multisource.
Also I vaguely remember there being a problem with the func_breakable not resetting properly when a new round starts. Meaning if you break it once during round 1, it will still be broken in the second round...
<!--QuoteBegin-For this I'd use a func_button+ multisource and button_target--><div class='quotetop'>QUOTE(For this I'd use a func_button @ multisource and button_target)</div><div class='quotemain'><!--QuoteEBegin-->
button_target:
- Flags: Start on
- Class info:
-- Target: master
Note:
With these settings it will only be triggered by shooting it, you could then create 2 custom textures like a monitor and a broken monitor. If you shoot it, the broken monitor texture should show. Just give the two texture these names: <i>+0-youtexturename</i> and <i>+a-youtexturename</i>
func_button:
- Flags: whatever you like to use
- Class info:
-- Target: master
multisource:
- Class info:
-- Name: master
-- Target: whatever you want activated by pressing the func_button.
Note 2:
The button_target will start as active, but once it is triggered (by shooting it) it will be inactive, this will result in the multisource not being able to trigger it's target. It needs both the button_target <b>AND</b> the func_button to be active. So once the button_target is inactive, you can press the func_button all you want and nothing will happen. <!--QuoteEnd--></div><!--QuoteEEnd-->
<b>The only problem I forsee right now is that it will be active again once you shoot it once more <img src="style_emoticons/<#EMO_DIR#>/tounge.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tounge.gif" /></b> I'll have a look at how this is fixable though ^_^
<!--QuoteBegin-Hmm+ here we go. First the ones from above with a tiny modification (button_target = func_door)--><div class='quotetop'>QUOTE(Hmm @ here we go. First the ones from above with a tiny modification (button_target = func_door))</div><div class='quotemain'><!--QuoteEBegin-->
func_door:
- Flags: start open,
- Class info:
-- Name: buttontarget
-- Target: master
-- delay before close: -1
-- Lip: the exact with of the moverange minus 1 to make it instant and perhaps show another texture on a brush inside the func_door
-- Fire on close: buttonmanager
-- Health: whatever you want
func_button:
- Flags: whatever you like to use
- Class info:
-- Target: master
multisource:
- Class info:
-- Name: master
-- Target: whatever you want activated by pressing the func_button.
And add this one:
mulitmanager:
Name: buttonmanager
Target1: buttontarget
optional target2 sound?
optional target3 spark?
optional target3 explosion?
optional target3 shake?
Now if the door is closed it should be deactivated and will also deactivate the mulitsource, I hope <img src="style_emoticons/<#EMO_DIR#>/biggrin-fix.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin-fix.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Note 3:
I'll leave the testing of it to you since I don't feel like it <img src="style_emoticons/<#EMO_DIR#>/tounge.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tounge.gif" />
Both solutions did the trick so thank you both <img src="style_emoticons/<#EMO_DIR#>/biggrin-fix.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin-fix.gif" />
In my testing I did find a lovely entity called change_target which as you would expect changes another entities target.
So all I did was make it so when the breakable is broken, but buttons target is changed to a env_spark, so when you press the button instead of a door opening, sparks fly out instead ! which adds to the effect of brokenness.
I thought breakables did come back each round? oh well we shall soon see <img src="style_emoticons/<#EMO_DIR#>/biggrin-fix.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin-fix.gif" />
I can't really test it as my round doesn't seem to end when the hive or cc is dead - guessing i need a proper server to test that.
schkorp: When you test in SP, you probably turn on cheats to allow you to play alone and have the round start, right? Well, as long as cheats are on, neither team can win. If you kill the hive/cc then turn off cheats, the team without their hive/cc will lose and the round will restart.
<!--QuoteEnd--></div><!--QuoteEEnd-->
Thank you kind Sir <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
console --> endgame
When testing a map by yourself, the team you are NOT on will lose if you type endgame in the console <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />