Raise the click-radius for a button!

Avatar
StGinger
49 Posts
Posted Dec 28, 2011
I want the player to push a button while flying in the air, but I would want to minimize the possibility to miss it by for example making the "click radius" for the button longer. But it's not like that is possible, so does anyone have an idea of how to solve the problem? I tried to surround the button with a func_button with the right outputs, but I could not make it non-solid and now I'm out of ideas.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Mevious
205 Posts
Posted Dec 28, 2011
Replied 45 minutes later
I thought you could make non-solid func_buttons but I guess not. Off the top of my head you could do something crazy like make a large trigger_multiple and make its outputs bind the 'E' key to something specific for that map. For example OnStartTouch triggers a console command to bind E to fire a message to the button entity, and OnEndTouch binds it back to whatever. This approach is messy and has a lot of flaws (e.g., if the player uses non-standard controls or if the player pauses and quits in the middle of the trigger.)

Another approach is to redesign that piece of the level so that you fling straight up and hit the switch near the apex of the fling (when you're moving the slowest), as it was done in the official levels.

I'm hoping someone else has a better answer for you.

Avatar
spongylover123
944 Posts
Posted Dec 28, 2011
Replied 1 hour later
My method is making a trigger surrounding where you want the player to be able to press the button then add these outputs
OnTrigger - button- enable
OnEndTouchAll - button - disable
Avatar
StGinger
49 Posts
Posted Dec 28, 2011
Replied 38 minutes later
Problem is, buttons does not have "enable" or "disable" :wink:
Avatar
spongylover123
944 Posts
Posted Dec 28, 2011
Replied 49 minutes later
use a nodraw func_button with a button model
or just type in enable/disable if the I/O isn't there, but it may be in the game.
Avatar
StGinger
49 Posts
Posted Dec 29, 2011
Replied 13 hours later
The func_button does not have those inputs either. And since I do not really understand exactly what is going to happen, I dont know if it works when I type it in. But I guess it does not becouse I do not notice any difference when I type it in.
Avatar
Random
171 Posts
Posted Dec 29, 2011
Replied 1 hour later
I wonder why buttons can't be non-solid... This may be a complicated workaround, but I'm thinking it will work.

Func_doors can be triggered by "using" them and they can be non-solid (use "don't render" to make it invisible). I bet if you make it passable to the player and objects you could enable "use" to open, then give it an output to fire OnOpen. Tell it to "Press" the prop_button if you want it to animate and fire the outputs from there. The player can open the door when they try to use the button, without seeing or hitting it, which will activate the normal outputs.

Avatar
StGinger
49 Posts
Posted Dec 30, 2011
Replied 20 hours later
Okey, now I feel stupid again. I can not find a way to get the func_door non-solid. Sure I can choose "don't render", but that only makes it invisible, not non-solid. When I have stumbled upon "non-solidness" before, I have been able to choose "yes" or "no" in "make solid" or whatever its named.

What am I missing?

Avatar
beecake
484 Posts
Posted Dec 30, 2011
Replied 47 minutes later

StGinger wrote:
Okey, now I feel stupid again. I can not find a way to get the func_door non-solid. Sure I can choose "don't render", but that only makes it invisible, not non-solid. When I have stumbled upon "non-solidness" before, I have been able to choose "yes" or "no" in "make solid" or whatever its named.

What am I missing?

I guess you are unable to make it non-solid... If you want to "use" the door, then i prefer that you use the func_button, and place it where the button is. The player won't hit it, but he/she still gets a feeling of pressing the button

Avatar
StGinger
49 Posts
Posted Dec 30, 2011
Replied 7 minutes later
But what is the difference between that and just having a normal button? The problem is that you will miss it about 75% of the times you try to hit it. Maybe I just don't get you right
Avatar
beecake
484 Posts
Posted Dec 30, 2011
Replied 28 minutes later

StGinger wrote:
But what is the difference between that and just having a normal button? The problem is that you will miss it about 75% of the times you try to hit it. Maybe I just don't get you right

This is what i mean:
img

Avatar
Random
171 Posts
Posted Dec 30, 2011
Replied 2 hours later

StGinger wrote:
Okey, now I feel stupid again. I can not find a way to get the func_door non-solid.

It's under "Flags," not the key properties. Check "passable" and "non-solid to player." Good luck.

Quote:
use the func_button, and place it where the button is.

I think StGinger's point wass that this doesn't work because it will usually be too far away to use unless the player collides into it. But if you're having the player fling sideways or something you could use this method to give the player more space horizontally in which (s)he can press the button. Maybe put the button in an alcove or something so the player couldn't actually collide with it.

Advertisement
Registered users don’t see ads! Register now!
Avatar
StGinger
49 Posts
Posted Dec 31, 2011
Replied 19 hours later
Okey, thank you for the commitment. beecake: I have actually tried that, but it does not work as well in my map, becouse you fly heading the button, and cklick it at the turning point. I have tried to make a func_button beside the flying player, but it does not work as well as I want it to.

Random: Thank you, I successfully made it non-solid. But the problem was that you cant "use" the wall when you are inside it, so the non-solidness is to no use in this situation it seems