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

Point posecontroller: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(don't see it only in source sdk base 2006)
 
(24 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{wrongtitle|title=point_posecontroller}}
{{CD|CPoseController|file1=point_posecontroller.cpp}}
==Entity Description==
{{this is a|logical entity|name=point_posecontroller|since=Source 2007}} It controls a [[$poseparameter|pose parameter]] of a prop and cycles the pose clientside.
An entity that controls a pose parameter of a prop and cycles the pose clientside.
{{note|The posecontroller resets the prop's default animations.}}
==Keyvalues==
{{bug|Using an invalid or non-existant Pose Parameter will crash the game.}}
* {{kv targetname}}
 
* '''PropName'''
== Keyvalues ==
: <target_destination> Name of the prop to control.
{{KV Targetname}}
* '''PoseParameterName'''
{{KV|Prop Name|intn=PropName|string|Name of the prop to control.}}
: <string> Name of the pose parameter to control.
{{bugfix|This keyvalue does not receive [[instance]] fixups, making the entity mostly unusable inside instances.|Change the keyvalue type from <code>string</code> to <code>target_destination</code> in the [[FGD]].}}
* '''PoseValue'''
{{KV|Pose Parameter Name|intn=PoseParameterName|string|Name of the pose parameter to control.}}
: <float> Normalized value for the pose parameter from 0.0 and 1.0 (maps to min and max range).
{{KV|Pose Parameter Value|intn=PoseValue|float|Normalized value for the pose parameter from 0.0 and 1.0 (maps to min and max range).}}
* '''InterpolationTime'''
{{bug|<code>Pose Paramater Value</code> suffers from rounding or overflow errors.}}
: <float> Number of seconds (0.0 to 10.0) for client to match absolue pose values.
:{{clarify|What effect does this have?}}
* '''InterpolationWrap'''
:{{workaround|Apparently, constantly setting a new value using <code>SetPoseValue</code> can be used as a workaround.}}
: {{boolean}} If set, wrap from 0.0 to 1.0 when interpolating.
{{KV|Interpolation Time|intn=InterpolationTime|float|Number of seconds (0.0 to 10.0) for client to match absolute pose values.}}
* '''CycleFrequency'''
{{bug|The value must have a trailing decimal (such as .0), or it will completely break the pose controller.}}
: <float> Base cycles per second from -10.0 to 10.0.
{{KV|Should wrap from 0.0 to 1.0 when interpolating.|intn=InterpolationWrap|boolean|If set, wrap from 0.0 to 1.0 when interpolating.}}
* '''FModulationType'''
{{KV|Cycle Frequency|intn=CycleFrequency|float|Base cycles per second from -10.0 to 10.0.}}
: <choices> Frequency Modulation Type
{{KV|Frequency Modulation Type|intn=FModulationType|choices|Control the way the interpolation blends between the poses.}}
{|
:{| class=standard-table
! Literal Value || Description
! Value || Description
|-
|-
| 0 || None
| <code>0</code> || None
|-
|-
| 1 || Sine
| <code>1</code> || Sine
|-
|-
| 2 || Square
| <code>2</code> || Square
|-
|-
| 3 || Triangle
| <code>3</code> || Triangle
|-
|-
| 4 || Sawtooth
| <code>4</code> || Sawtooth
|-
|-
| 5 || Noise
| <code>5</code> || Noise
|}
|}
* '''FModTimeOffset'''
{{KV|Frequency Modulation Time Offset|intn=FModTimeOffset|float|Modulation time offset from -1.0f to 1.0.}}
: <float> Modulation time offset from -1.0 to 1.0.
{{KV|Frequency Modulation Rate|intn=FModRate|float|Modulation cycles per second from -10.0f to 10.0.}}
* '''FModRate'''
{{KV|Frequency Modulation Amplitude|intn=FModAmplitude|float|Modulation extents from 0.0f to 10.0.}}
: <float> Modulation cycles per second from -10.0 to 10.0.
 
* '''FModAmplitude'''
== Inputs ==
: <float> Modulation extents from 0.0f to 10.0.
{{I|SetPoseParameterName|Sets the pose parameter to control.|param=string}}
==Inputs==
{{I|SetPoseValue|Set the pose parameter to a normalized value between 0.0 and 1.0 (maps to min and max range).|param=float}}
* {{i targetname}}
{{I|SetInterpolationTime|Set the interpolation time to a number of seconds between 0.0 and 10.0.|param=float}}
* '''SetPoseParameterName <string>'''
{{I|SetCycleFrequency|Set the pose parameter's base cycles per second from -10.0f to 10.0.|param=float}}
: Sets the pose parameter to control.
{{I|SetFModType|Set the type of frequency modulation.|param=integer}}
* '''SetPoseValue <float>'''
{{I|SetFModTimeOffset|Set the modulation time offset from -1.0f to 1.0.|param=float}}
: Set the pose parameter to a normalized value between 0.0 and 1.0 (maps to min and max range).
{{I|SetFModRate|Set the modulation cycles per second from -10.0f to 10.0.|param=float}}
* '''SetInterpolationTime <float>'''
{{I|SetFModAmplitude|Set the modulation extents from 0.0f to 10.0.|param=float}}
: Set the interpolation time to a number of seconds between 0.0 and 10.0.
{{I|RandomizeFMod|Randomize the frequency modulation by an extremeness of 0.0 to 1.0.|param=float}}
* '''SetCycleFrequency <float>'''
{{I|GetFMod|Outputs the current modulation settings in console.}} {{Not in FGD}}
: Set the pose parameter's base cycles per second from -10.0 to 10.0.
* '''SetFModType <integer>'''
: Set the type of frequency modulation.
* '''SetFModTimeOffset <float>'''
: Set the modulation time offset from -1.0 to 1.0.
* '''SetFModRate <float>'''
: Set the modulation cycles per second from -10.0 to 10.0.
* '''SetFModAmplitude <float>'''
: Set the modulation extents from 0.0 to 10.0.
* '''RandomizeFMod <float>'''
: Randomize the frequency modulation by an extremeness of 0.0 to 1.0.
==Outputs==
* {{o targetname}}
[[Category:Half-Life 2 Episode Two Entities]]

Latest revision as of 18:38, 30 April 2025

C++ Class hierarchy
CPoseController
CBaseEntity
C++ point_posecontroller.cpp

point_posecontroller is a logical entity available in all Source Source games since Source 2007 Source 2007. It controls a pose parameter of a prop and cycles the pose clientside.

Note.pngNote:The posecontroller resets the prop's default animations.
Icon-Bug.pngBug:Using an invalid or non-existant Pose Parameter will crash the game.  [todo tested in ?]

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

Prop Name (PropName) <string>
Name of the prop to control.
Icon-Bug.pngBug:This keyvalue does not receive instance fixups, making the entity mostly unusable inside instances.  [todo tested in ?]
Note.pngFix:Change the keyvalue type from string to target_destination in the FGD.
Pose Parameter Name (PoseParameterName) <string>
Name of the pose parameter to control.
Pose Parameter Value (PoseValue) <float>
Normalized value for the pose parameter from 0.0 and 1.0 (maps to min and max range).
Icon-Bug.pngBug:Pose Paramater Value suffers from rounding or overflow errors.  [todo tested in ?]
Clarify: What effect does this have?
PlacementTip.pngWorkaround:Apparently, constantly setting a new value using SetPoseValue can be used as a workaround.
Interpolation Time (InterpolationTime) <float>
Number of seconds (0.0 to 10.0) for client to match absolute pose values.
Icon-Bug.pngBug:The value must have a trailing decimal (such as .0), or it will completely break the pose controller.  [todo tested in ?]
Should wrap from 0.0 to 1.0 when interpolating. (InterpolationWrap) <boolean>
If set, wrap from 0.0 to 1.0 when interpolating.
Cycle Frequency (CycleFrequency) <float>
Base cycles per second from -10.0 to 10.0.
Frequency Modulation Type (FModulationType) <choices>
Control the way the interpolation blends between the poses.
Value Description
0 None
1 Sine
2 Square
3 Triangle
4 Sawtooth
5 Noise
Frequency Modulation Time Offset (FModTimeOffset) <float>
Modulation time offset from -1.0f to 1.0.
Frequency Modulation Rate (FModRate) <float>
Modulation cycles per second from -10.0f to 10.0.
Frequency Modulation Amplitude (FModAmplitude) <float>
Modulation extents from 0.0f to 10.0.

Inputs

SetPoseParameterName <stringRedirectInput/string>
Sets the pose parameter to control.
SetPoseValue <floatRedirectInput/float>
Set the pose parameter to a normalized value between 0.0 and 1.0 (maps to min and max range).
SetInterpolationTime <floatRedirectInput/float>
Set the interpolation time to a number of seconds between 0.0 and 10.0.
SetCycleFrequency <floatRedirectInput/float>
Set the pose parameter's base cycles per second from -10.0f to 10.0.
SetFModType <integerRedirectInput/integer>
Set the type of frequency modulation.
SetFModTimeOffset <floatRedirectInput/float>
Set the modulation time offset from -1.0f to 1.0.
SetFModRate <floatRedirectInput/float>
Set the modulation cycles per second from -10.0f to 10.0.
SetFModAmplitude <floatRedirectInput/float>
Set the modulation extents from 0.0f to 10.0.
RandomizeFMod <floatRedirectInput/float>
Randomize the frequency modulation by an extremeness of 0.0 to 1.0.
GetFMod
Outputs the current modulation settings in console. !FGD