Please or Register to create posts and topics.

game_ui -> prevent jump/duck

Hi thinking-with-portals-community...

At first I wanna say, that this HP is so awesome and helpful for me. I'm new on mapping, but I like it and I got very good feedbacks to my maps. I was able to solve the one or other problem with your help ^^ So, thumbs up

Now I'm looking for a solution to prevent jump/duck on active game_ui. I saw already the playerproxy thing, but I don't think it can help me. Also I don't want to unbind and rebind keys, that stuff is shitty ^^ I have checked "Freeze player", but jump/crouch are not afflected by that. Are ther clientcommands maybe to toggle the possibility to jump/crouch and retoggle OnPlayerOff?

Try a player_speedmod set to something like 1.00001. There are spawnflags for preventing various actions.

Falsi sumus crusto!

first part works fine, after trigger it, I can't jump/duck. But there is no way to undo that. I tryed to trigger another player_speedmod without any spawnflags checked instinctivly, but that doesn't work :-/

try this
since most users have binded duck to CTRL and jump to space,
use a Point_Clientcommand,
set it as this:
Name: Client_Remove
Inputs:
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind duck +<Anykey>
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind jump +<Anykey>
and to reverse it, same thing, except,
Parameter:
Bind jump +space
bind duck +ctrl

I took over the facility, turned a giant robot into a potato and I've been sent into outer-space... twice... What's your story?
P0rtalFTW wrote:
try this
since most users have binded duck to CTRL and jump to space,
use a Point_Clientcommand,
set it as this:
Name: Client_Remove
Inputs:
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind duck +<Anykey>
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind jump +<Anykey>
and to reverse it, same thing, except,
Parameter:
Bind jump +space
bind duck +ctrl

I use alt for crouch.

HA.

Binding is a bad idea.

P0rtalFTW wrote:
try this
since most users have binded duck to CTRL and jump to space,
use a Point_Clientcommand,
set it as this:
Name: Client_Remove
Inputs:
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind duck +<Anykey>
Source: Your trigger
Output> The fonction of the trigger
My Input> Command
Parameter Bind jump +<Anykey>
and to reverse it, same thing, except,
Parameter:
Bind jump +space
bind duck +ctrl

I'd do this, but using the command unbind instead to remove the binded keys, and then bind again followed by the key and the function to go back to normal. I did for the White Room remix and works perfect, and it's the easiest option to do this. The con is as Toaster Waffles mentioned, that not everyone has exactly the same binded keys (to avoid this you might unbind everything, then bind the common keys to the common functions except crouching and jumping)...

yishbarr wrote:
Binding is a bad idea.

I'd use a game_text or the like to display a message to let the player knows that the keys for the functions have been changed.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

I also think, bindigs are a bad idea. There are clientcommands to change movement-speed (cl_forwardspeed for example) maybe there are commands for jump/duck also. In this case I could trigger the clientcommand at game_ui OnPlayerOn and set to default variables with OnPlayerOff. Then I have no trouble with bindings... But I don't know, if these commands exist :-/

Felon85 wrote:
first part works fine, after trigger it, I can't jump/duck. But there is no way to undo that. I tryed to trigger another player_speedmod without any spawnflags checked instinctivly, but that doesn't work :-/

If bindings are a bad idea, don't confuse him! :P

Felon85, the procedure is a bit weird. Trigger the SAME player_speedmod again, with the input paremeter of 1.0 exactly. This sets the player's speed back to the default, which turns off any other effects of the speedmod.

Falsi sumus crusto!
FelixGriffin wrote:
Felon85, the procedure is a bit weird. Trigger the SAME player_speedmod again, with the input paremeter of 1.0 exactly. This sets the player's speed back to the default, which turns off any other effects of the speedmod.

oh perfect, that works fine, thx very much