Raise the click-radius for a button!
Quote from StGinger on December 28, 2011, 5:58 pmI 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.
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.
Quote from Mevious on December 28, 2011, 6:43 pmI 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.
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.
Portal 1: Portal Pro, Resurrection, Dyad, Rexaura
Portal 2: [Coop] Electrophobia, [PTI] EotM Collection, [SP] Aperture Halloween
Quote from spongylover123 on December 28, 2011, 8:19 pmMy 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
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
Quote from spongylover123 on December 28, 2011, 9:47 pmuse 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.
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.
Quote from StGinger on December 29, 2011, 11:11 amThe 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.
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.
Quote from Random on December 29, 2011, 12:52 pmI 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.
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.
Quote from StGinger on December 30, 2011, 8:58 amOkey, 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?
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?
Quote from beecake on December 30, 2011, 9:45 amStGinger 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
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
Quote from StGinger on December 30, 2011, 9:52 amBut 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
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
