Can you disable player movement?

TheMightyGerbil

L2: Junior Member
Dec 23, 2012
79
21
If I remember right the prop_hunt plugin disables player movement, or at least their control, but let's you rotate and fire your weapon. I think Merasmus also does this on lakeside_event after teleporting people but before forcing them to dance but he is mostly hard coded. Is there an entity setup to do this to a player on a map? I'm asking this before going to sleep so don't expect a reply until tomorrow. Thank you!
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
Condition 54: Player cannot move and hears the Ghost Fort dancing music. Any taunts performed will be the Thriller taunt.
Condition 87: Player is locked in place and cannot turn.

These are the only conditions I could find that have the effect you want, though I reckon you don't want the thriller stuff.
Source: https://wiki.teamfortress.com/wiki/Cheats
 

TheMightyGerbil

L2: Junior Member
Dec 23, 2012
79
21
Yeah I realized I remembered the Merasmus thing incorrectly after going to sleep. That what I get for working on it too long :p . Unfortunately I don't think either of those will work because I need the player to fire their weapon just not move. ATM I'm attempting to hold the player with some trigger_push brushes but I haven't finished testing it yet. If their is a better brush to use let me know. There is a trigger stun but it had a duration, and I need an on/off, so I didn't test it yet. Oh it needs to be able to be parented if a brush. Thanks for any help :) .
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
If you are teleporting the players to set positions, you should be able to place invisible func_brush's around where their feet will be, and set them to enable when the players are teleported. If it only covers their feet, they should be able to turn/look around and shoot their weapons, but not move around.

If you wanted to go the pushing route, try point_push instead of trigger push. Simply set the push to a negative number to make it pull instead of push. Just have the radius it effects to quite small (40-60 should be OK) so that multiple players aren't stuck together.
 
Mar 23, 2013
1,013
347
Perhaps you can use trigger_stun ? Set the movement reduction to 1 and it stops players compleetly. Players will still be able to jump and rocket jump so perhaps you can't use this
 

TheMightyGerbil

L2: Junior Member
Dec 23, 2012
79
21
I might as well tell specifics so you poor guys aren't groping in the dark I'm basically attempting a sudo-vehicle (what it is specifically is a secret... because it may take forever to finish XD). It's not as complex as Boojum's car but when you parent a momentary_rot_button to a func_tracktrain you basically get a room you can turn that follows a path_track. This could be used for a player controlled turret on say a tank (not what I'm doing but similar). The only problem remaining is if you walk into the buttons or walls it causes the room to stop if currently rotating. If you stop touching the walls or buttons all is fine and it continues to rotate. Not finding a flag to allow the momentary_rot_button to push the user I'm looking for a way to immobilize the user in the center of the room. It should work because the buttons trigger on damage you just can't touch them or the walls and you're fine.

EDIT: Hmmm I may attempt a game_ui and maybe parent the player to the momentary_rot_button hmmm...

EDIT: game_ui turns off movement and weapons but the player still would need to be parented to the momentary_rot_button hmm...
 
Last edited:

Powerlord

L3: Member
May 8, 2010
127
60
If I remember right the prop_hunt plugin disables player movement, or at least their control, but let's you rotate and fire your weapon. I think Merasmus also does this on lakeside_event after teleporting people but before forcing them to dance but he is mostly hard coded. Is there an entity setup to do this to a player on a map? I'm asking this before going to sleep so don't expect a reply until tomorrow. Thank you!
As the last maintainer of Prop Hunt, PH can do this because it's a plugin and can modify players movement directly. The code to do it is literally

Code:
SetEntityMoveType(client, MOVETYPE_NONE); // MOVETYPE_WALK to make them able to move again

As izotrope mentioned, condition 87 can freeze people in place... it was added for the Halloween 2014 event. Basically, at the start of a minigame, TF2 would apply condition 88 (put a cage around player) which also automatically applies condition 87 (stop player from moving).

I'm not sure if disabling the trigger_add_tf_player_condition entity makes the conditions it applies go away though.

Edit: Sadly, the tf_base_minigame and tf_halloween_minigame entities are poorly documented, because it's possible that it can apply and automatically remove conditions after a time.
 

TheMightyGerbil

L2: Junior Member
Dec 23, 2012
79
21
As the last maintainer of Prop Hunt, PH can do this because it's a plugin and can modify players movement directly. The code to do it is literally

Code:
SetEntityMoveType(client, MOVETYPE_NONE); // MOVETYPE_WALK to make them able to move again

As izotrope mentioned, condition 87 can freeze people in place... it was added for the Halloween 2014 event. Basically, at the start of a minigame, TF2 would apply condition 88 (put a cage around player) which also automatically applies condition 87 (stop player from moving).

I'm not sure if disabling the trigger_add_tf_player_condition entity makes the conditions it applies go away though.

Edit: Sadly, the tf_base_minigame and tf_halloween_minigame entities are poorly documented, because it's possible that it can apply and automatically remove conditions after a time.

Wow a Powerlord reply that was unexpected. I didn't know you haunted the TF2map's forum just SourceMod. My players have played and enjoyed prophunt quite a bit ;) . I might be getting into source pawn to make some things down the road but that's another project to put on the stack of 1 zillion things I'd like to make XD.

Having found Boojums car thread I've switched over to that method as game_ui effectively does what I want, freeze the player and instead of using damage on buttons I can control the room directly (for the most part). I've got that all working but I'm having a time setting the logic_measure_movement to bind the player to the room. I think it renames the player's targetname fine it just does nothing with it. I've also tried a phys_constraint. At least with that thread I know it can be done I'm just not getting the settings right.

I'm not above reading tutorials guys so if you know one for this let me know. I just need one with specific settings and googling logic_measure_movement isn't finding one. Thanks so far though :) .


Edit: I think I may have overthought it based on reading Boojum's post. It appears you don't have to use a logic_measure_movement to attach the player but can just plain jane parent the player to the brush. More testing required but it looks promising!
 
Last edited:

Izotope

Sourcerer
aa
May 13, 2013
698
764
If the timelimit is set to -1, then yes it will disappear as soon as the player leaves the brush would include when the brush is disabled.
The freeze condition will actually stay forever if you are inside that trigger with -1 when it disables.