Stop sphere working prop_floor_cube_button

Avatar
Haggis
158 Posts
Posted Sep 13, 2011
How do you stop a sphere making a prop_floor_cube_button work. I know it will be a filter but i do not know which ones and what outputs i need to put in.
Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Sep 13, 2011
Replied 3 minutes later

Haggis wrote:
How do you stop a sphere making a prop_floor_cube_button work. I know it will be a filter but i do not know which ones and what outputs i need to put in.

A sphere can activate a cube button? I didn't know that.

Anyway you need to use a filter_activator_name.

Avatar
Haggis
158 Posts
Posted Sep 13, 2011
Replied 11 minutes later
But i dont know how to set it up
Avatar
spongylover123
944 Posts
Posted Sep 13, 2011
Replied 1 minutes later

Haggis wrote:
But i dont know how to set it up

Check here: mapping-help/filtering-a-trigger-t462.html

Avatar
iWork925
1,080 Posts
Posted Sep 14, 2011
Replied 8 hours later
Place down the button as per normal, create a trigger_multiple around the red bit of the button, also place in a math_counter and a filter_activator_name. Set the filter in the filter to the name of the sphere and set the filter of the trigger to the name of the filter_activator. Make sure to check the physics flag on the trigger. Add the following outputs to both the trigger and the button.

OnStartTouch/OnPressed > math_counter > add > 1
OnEndTouch/OnUnPressed > math_counter > subtract > 1

Add the following to he math counter. Make sure the maximum setting is 2.

OnHitMax > open door or whatever
OnChangedFromMax > close door

Hope this helps!!!!!!

Avatar
Haggis
158 Posts
Posted Sep 14, 2011
Replied 1 hour later

iWork925 wrote:
Hope this helps!!!!!!

Thankyou, it did.

Avatar
Vordwann
767 Posts
Posted Sep 14, 2011
Replied 1 hour later
You don't need the math_counter if you instead have the trigger with the filter disabling the button when it isn't a ball that's in there. After you have all the filters just use, in the trigger right on top of the button:

OnStartTouch > Button Name > Enable

OnEndTouch > Button Name > Disable

Have the button start disabled, or if you can't do that, then have a logic_auto that disables it. Less hassle without the math_counter.

Avatar
iWork925
1,080 Posts
Posted Sep 14, 2011
Replied 3 hours later
You can not disable a floor button.
Avatar
Marise
249 Posts
Posted Sep 14, 2011
Replied 56 minutes later
You don't need a trigger at all. You can have the button test the filter when activated. Say you use a filter_name, and your cube is named cube1. Have the filter look for cube1, and only activate the outputs if cube1 is placed on the button. So in other words, the filter serves as a 'middle-man' between the button and its output. I don't have Hammer in front of me right now, so I can't remember the exact I/O to use, but it's pretty simple.
Avatar
canari
70 Posts
Posted Feb 24, 2012
Replied 5 months later

Marise wrote:
You don't need a trigger at all. You can have the button test the filter when activated. Say you use a filter_name, and your cube is named cube1. Have the filter look for cube1, and only activate the outputs if cube1 is placed on the button. So in other words, the filter serves as a 'middle-man' between the button and its output. I don't have Hammer in front of me right now, so I can't remember the exact I/O to use, but it's pretty simple.

That's right !
For example, i have a prop_floor_cube_button, and i want that when a cube (but not a sphere) press it, a door opens and a prop_indicator_panel gets checked, and when unpressed the door closes and the panel gets unchecked.
So i put a filter_activator_name, and for its properties :
- Name : filter1 (for example)
- Filter mode : Allow entities that match criteria
- Filter name : [the_name of your cubes] (in my map i had 2 kinds of prop_weighted_cube : a standard one named template_cube, and a reflective one named template_cube2, whereas the spheres were named template_sphere, so for the Filter Name i wrote template_c* so that it allows all that starts with "template_c")
I guess it could also work with a Filter Mode = disallow entities that match criteria, and a Filter Name = template_sphere

For my prop_floor_cube_button, here were the outputs :
OnPressed > filter1 > TestActivator (uncheck fire once only)
OnUnPressed > [name_of_the_door] > Close (uncheck fire once only)
OnUnPressed > [name_of_the prop_indicator_panel] > Uncheck (uncheck fire once only)

For my filter_activator_name, here were the outputs :
OnPass > [name_of_the_door] > Open (uncheck fire once only)
OnPass > [name_of_the prop_indicator_panel] > Check (uncheck fire once only)

And from now spheres won't activate the prop_floor_cube_button !

There are two minor problems i can't solve :
- even if the sphere doesn't activate the button's outputs, we still hear the button's activation sound
- the sphere still changes it's color from blue to yellow as if it had activated the button (this is also true when you put a cube in a prop_floor_ball_button)

Hope this will help...

Avatar
ChickenMobile
2,460 Posts
Posted Feb 24, 2012
Replied 18 minutes later
I would have done it the cheap way and made a clip_vphysics that filters to your sphere. That way the sphere cannot even go in the receptacle.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Spam Nugget
492 Posts
Posted Feb 24, 2012
Replied 5 minutes later
That or make the button portal 1 style, out of props and triggers and whatnot. There are a bazzilion tutorials out there. Or for the cheapest soloution of them all, tilt the button so the sphere rolls off but the cube doesnt.