Need help with excursion funnel control
I've got a tractor beam (excursion funnel, but I'll call it tractor beam here) and it's disabled at first. I then have a button that you press that turns it on for 10 seconds and then it turns off. That all works fine.
I then have a floor button. This is where it gets annoying. The floor button is supposed to reverse the beam (orange/negative) when pressed and set it back positive when not pressed. It does. The problem is, it turns the beam ON even if the other button has not yet activated it. The floor button should ONLY work if the tractor beam is already on and should turn off after its 10 second delay NO MATTER WHAT.
Any help would be appreciated.
Edit: I think I have this figured out. And I have built an example. Is this what you want?
On button press only: Blue Funnel
On Floor button press only: Nothing
On both pressed: Orange Funnel
On Button Reset: Nothing
If it is then do I have the VMF for you! Just copy and paste the buttons, funnel and math counters (sheep jumping fence) into your map. Ignore everything else!
RageCompeX wrote:
hey, I did the same thing here, I first have a floor button that activates the funnel, and another that needs to reverse. So OnButtonPressed, you want to Trigger an logic_relay, name it ActivateFunnel or something, and OnUnpressed trigger another logic relay and call it DeactivateFunnel (in your case it's on buttonreset). Now these 2 relays will decide when the other button is activated or not. So the ActivateFunnel relay, you set, OnTrigger Enable button, and the other for disable. Make SURE your second button is on default disable.
I tried a logic_relay, and that was going to be my second question, actually...
I had the floor button telling the logic_relay to change the polarity of the beam. I had the first button decide whether or not the logic_relay was enabled. The thing is, even with the logic_relay disabled, the events still fired and the beam turned on. That part didn't make sense at all. If you ask me, that completely defeats the purpose of the relay.
iWork925 wrote:
Implying you can disable a floor button?Edit: I think I have this figured out. And I have built an example. Is this what you want?
On button press only: Blue Funnel
On Floor button press only: Nothing
On both pressed: Orange Funnel
On Button Reset: NothingIf it is then do I have the VMF for you! Just copy and paste the buttons, funnel and math counters (sheep jumping fence) into your map. Ignore everything else!
"The file you are trying to access is temporarily unavailable. Please try again later."
Would you mine just explaining it to me? I tried using a math_counter but I couldn't get anything to work. I think if you just tell me which outputs to use on which entities I could do it.
easy-as-pie.
KenJeKenny!? wrote:
just set up a simple math_counter... have both buttons on pressed add 1 to the math_counter and on unpressed remove 1... and set the math counter to reverse the excursion funnel when the total is 2.easy-as-pie.
Well, it's not quite as easy as that.
Sure, it's easy to get it to reverse the funnel when both buttons are active, but what about when I step off the button? It still stays reversed. It should go back to normal. So then I add the "OnChangedFromMax" output but then it stays on without the first button being pressed.
Honestly, this should not be so complicated. Why can't there just be a simple condition to check to see IF a button is pressed, or IF an entity is active? I've tried logic_compare, logic_case, logic_relay, and several others and nothing works.
more info on math_counters @ http://developer.valvesoftware.com/wiki/Math_counter
KenJeKenny!? wrote:
Well... you gotta set the math counter to ONLY reverse the funnel when it's counter is on 2... and go back to normal when it drops below 2... using the onhitmax & onhitmin.more info on math_counters @ http://developer.valvesoftware.com/wiki/Math_counter
Well, if I set the minimum value to 1 and the maximum to 2, then it'll never go below 1 and therefore it will never turn off.
Perhaps if you were a bit more specific with exactly how I should set the values and outputs, rather than giving me just a piece of the picture each time I come back to tell you it's not working, it would be more efficient.
To clarify, here is what has to happen:
On press of first button, funnel is activated for 10 seconds.
On press of second button, funnel is reversed.
On release of second button, funnel is returned to normal.
On release of first button, which happens after 10 seconds, the beam should be disabled no matter what state the second button is in.
Have your first button set so you cannot do a fast reset (no other way around), set the reset time to say 10.5 seconds and have it add 1 to the math_counter on pressed and substract 1 after 10 seconds (the reset).
On press of second button, have it again add 1 to the math_counter on pressed and substract 1 after unpressed (geussing its a floor_button)
Create a math_counter & a logic_case and name them properly however you want.
Set up your math_counter up as the following:
initial value: 0
min. value: 0
max. value: 2
outputs:
Outvalue > logic_case > Invalue
Now, set up your logic_case up as the following:
case01: "0"
case02: "1"
case03: "2"
Outputs:
Oncase01 > excursion funnel > disable
Oncase02 > excursion funnel > enable
Oncase03 > excursion funnel > reverse
(dont remember the exact commands for the funnels)
And that should do the trick! 
KenJeKenny!? wrote:
Okay... i kinda overlooked what you were trying to do there... so i tested a bit myself and your gonna need a math_counter together with a logic_case...Have your first button set so you cannot do a fast reset (no other way around), set the reset time to say 10.5 seconds and have it add 1 to the math_counter on pressed and substract 1 after 10 seconds (the reset).
On press of second button, have it again add 1 to the math_counter on pressed and substract 1 after unpressed (geussing its a floor_button)
Create a math_counter & a logic_case and name them properly however you want.
Set up your math_counter up as the following:
initial value: 0
min. value: 0
max. value: 2
outputs:
Outvalue > logic_case > InvalueNow, set up your logic_case up as the following:
case01: "0"
case02: "1"
case03: "2"
Outputs:
Oncase01 > excursion funnel > disable
Oncase02 > excursion funnel > enable
Oncase03 > excursion funnel > reverse
(dont remember the exact commands for the funnels)And that should do the trick!
Thanks for all the efforts, but this still doesn't work. Standing on the second button still adds 1 to the counter, triggering OnCase2, which turns the excursion funnel on.
I think I have an idea, though. I'm going to test it real quick....
SUCCESS!
Here's what I did. Instead of having each button add/subtract 1, I had the first button add/subtract 2 and the second button add/subtract 3. I then had the funnel work normally if the case was 2 (only button 1) and then reverse if the case was 5 (both buttons). Activating only the second button would add 3, which doesn't do anything.
Thanks for all the help!
iWork925 wrote:
Only problem with that one is if you stand on button and let the timer run out the funnel will remain in blue mode. Trying downloading the example again. http://www.megaupload.com/?d=1L955XIG
I didn't see this post before. It would have been helpful. Thank you anyway.