This article's documentation is for anything that uses the Source engine. Click here for more information.

point_playermoveconstraint

From Valve Developer Community
Jump to: navigation, search
Underlinked - Logo.png
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024


English (en)
... Icon-Important.png
class hierarchy
CPointPlayerMoveConstraint defined in point_playermoveconstraint.cpp
CBaseEntity

point_playermoveconstraint is a point entity available in all Source Source games. When given theTurnOninput, it constrains any players already-within a set radius around itself, then slowing them down when they get close to the edge of the radius.

Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Radius (radius) <float>
Radius to find players to constrain.
Icon-Bug.pngBug:When this entity spawns radius squared is computed and that value is used to check whether constraint was broken on a player to stop its effect and fire OnConstraintBroken output. The issue is that changing radius using AddOutput doesn't update the radius squared variable and so the original radius is used to determine whether player broke the constraint
Constraint Width (width) <float>
Width of the constraint edge. This is the distance in which to start slowing players down as they approach the edge of the radius.
Speed Factor (speedfactor) <float>
Factor applied to the player's max speed as they approach the radius edge.

Inputs

TurnOn
Start constraining any players already within the radius.
TurnOff
Stop constraining any players previously constrained.

Outputs

OnConstraintBroken
Fired when a player breaks through the constraint. !caller = player

See also