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

Point playermoveconstraint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (doesn't seem like it functions in l4d2)
m (Minor grammatical revisions for clarity)
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{base point|point_playermoveconstraint}} It constrains players to a radius around itself, slowing them down the closer they get to the edge of the radius.
{{Underlinked|date=January 2024}}
{{warning|Doesn't function in {{l4d2}}.}}
{{LanguageBar}}
{{confirm | This entity does not function in {{tf2}} and {{l4d}}.}}
{{CD|CPointPlayerMoveConstraint|file1=point_playermoveconstraint.cpp}}
{{This is a|point entity|name=point_playermoveconstraint}} When given the<code>TurnOn</code>input, 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.
__NOTOC__
== Keyvalues ==
== Keyvalues ==
{{KV|Radius|float|Radius to constrain players to.}}
{{KV|Constraint 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.}}
{{KV|Speed Factor|float|Factor applied to the player's max speed as they approach the radius edge.}}
{{KV Targetname}}
{{KV Targetname}}
{{KV|Radius|float|intn=radius|Radius to find players to constrain. (max 16384)
:{{note|Changing this via [[AddOutput]] is not supported.<br />When this entity spawns, this value is squared, saved elsewhere, and used for the purposes of checking when to stop constraining the player and fire the output.}}}}
{{KV|Constraint Width|float|intn=width|Width of the constraint edge. This is the distance in which to start slowing players down as they approach the edge of the radius.}}
{{KV|Speed Factor|float|intn=speedfactor|Factor applied to the player's max speed as they approach the radius edge.}}


== Inputs ==
== Inputs ==
{{IO|TurnOn|Start constraining any players within the radius.}}
{{I|TurnOn|Start constraining any players already within the radius.}}
{{IO|TurnOff|Stop constraining any players previously constrained.}}
{{I|TurnOff|Stop constraining any players previously constrained.}}
{{I Targetname}}


== Outputs ==
== Outputs ==
{{IO|OnConstraintBroken|Fired when a player breaks through the constraint. {{PlCal}}}}
{{O|OnConstraintBroken|activator= this entity|caller = the player that broke through the constraint|Fired when a player breaks through the constraint.}}
{{O Targetname}}
 
== See also ==
* {{ent|trigger_auto_crouch}}
* {{ent|trigger_playermovement}}

Latest revision as of 08:46, 19 May 2025

Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
English (en)Translate (Translate)
C++ Class hierarchy
CPointPlayerMoveConstraint
CBaseEntity
C++ point_playermoveconstraint.cpp

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

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Radius (radius) <float>
Radius to find players to constrain. (max 16384)
Note.pngNote:Changing this via AddOutput is not supported.
When this entity spawns, this value is squared, saved elsewhere, and used for the purposes of checking when to stop constraining the player and fire the output.
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
!activator = this entity
!caller = the player that broke through the constraint
Fired when a player breaks through the constraint.

See also