POINT math_counter_advanced

A special version of math_counter with the ability to perform advanced calculations. Otherwise functions identically to math_counter.

KeyValues

Preserve Value? <boolean> = No

If set to 'Yes', calculations will fire OutValue with the resulting value, but the actual value stored in this entity will stay the same, allowing future calculations to use a constant value. If you want to change the value, you must use SetValueNoFire to set the counter's value or the PreserveValue input to toggle this feature. This also disables min/max functionality.

Always Output As Int <boolean> = No

If set to 'Yes', the stored value (and OutValue) will always be rounded to an integer before firing.

Lerp Percent <float> = 0.5

The percentage used by the LerpTo input.

Inherited from BaseEntityPoint

Name <target_source>

The name that other entities refer to this entity by.

Global Entity Name <string>

Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

Pitch Yaw Roll (X Y Z) <angle> = 0 0 0

This entity's orientation in the world. Roll is the rotation around the X axis, pitch is rotation around the Y axis and yaw is the rotation around the Z axis.

Parent <target_destination>

The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Set an attachment point via 'parentname,attachment'.

Inherited from EnableDisable

Start Disabled <boolean> = No

No description provided.

Inherited from math_counter

Initial Value <float> = 0

Starting value for the counter.

Minimum legal value for the counter. If min=0 and max=0, no clamping is performed.

Maximum legal value for the counter. If min=0 and max=0, no clamping is performed.

Inputs

PreserveValue <boolean>

Sets whether this counter's value should be preserved after calculations. 1 = Yes, 0 = No

AlwaysOutputAsInt <boolean>

Sets whether this counter's value should always output as an integer. 1 = Yes, 0 = No

SetValueToPi <void>

Sets the counter's value to 3.14159265358979323846 and fires the OutValue output with it.

SquareRoot <void>

Calculates the square root of the counter's current value. Fires the OutValue output with the result.

Power <integer>

Raises the power of the counter's current value to this value. Fires the OutValue output with the result.

Round <integer>

Rounds the counter's current value to the specified number place. For example, rounding 256 to 100 will round it to 300 and rounding 256 to 10 will round it to 260. Use 0 to round decimals to integers. Fires the OutValue output with the result.

Floor <integer>

Floors, or rounds down, the counter's current value to the specified number place. Fires the OutValue output with the result.

Ceil <integer>

Ceils, or rounds up, the counter's current value to the specified number place. Fires the OutValue output with the result.

Trunc <integer>

Truncates, or rounds toward zero, the counter's current value to the specified number place. Fires the OutValue output with the result.

Sin <void>

Applies sine to the counter's current value. Fires the OutValue output with the result.

Cos <void>

Applies cosine to the counter's current value. Fires the OutValue output with the result.

Tan <void>

Applies tangent to the counter's current value. Fires the OutValue output with the result.

RandomInt <string>

Generates a random integer between the specified bounds. Format = 'lowerbound upperbound', like '22 65'. Fires the OutValue output with the result.

RandomFloat <string>

Generates a random float between the specified bounds. Format = 'lowerbound upperbound', like '22.5 48.721'. Fires the OutValue output with the result.

LerpTo <float>

Lerps this counter's value to the specified value based on the lerp percent.

SetLerpPercent <float>

Sets the lerp percent.

Inherited from BaseEntityPoint

Kill <void>

Removes this entity from the world.

KillHierarchy <void>

Removes this entity and all its children from the world.

SetParent <target_destination>

Changes the entity's parent in the movement hierarchy.

SetParentAttachment <string>

Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.

SetParentAttachmentMaintainOffset <string>

Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.

ClearParent <void>

Removes this entity from the the movement hierarchy, leaving it free to move independently.

SetLocalAngles <vector>

Sets the rotation of the entity relative to the parent's rotation.

SetLocalOrigin <vector>

Sets the position of the entity relative to its parent if one exists. Otherwise relative to the world.

SetAbsAngles <vector>

Set this entity's angles, always relative to the world origin.

AddOutput <string>

Adds an entity I/O connection to this entity or changes keyvalues dynamically. Format: '<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite, 1 = only once)>' or 'keyvalue newval'. Very dangerous, use with care.

FireUser1 <void>

Causes this entity's OnUser1 output to be fired.

FireUser2 <void>

Causes this entity's OnUser2 output to be fired.

FireUser3 <void>

Causes this entity's OnUser3 output to be fired.

FireUser4 <void>

Causes this entity's OnUser4 output to be fired.

Use <void>

More or less replicates the player interacting with an entity. (+USE)

PassUser1 <string>

Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged.

PassUser2 <string>

Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged.

PassUser3 <string>

Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged.

PassUser4 <string>

Causes this entity's OutUser4 output to be fired, passing along the parameter unchanged.

FireRandomUser <void>

Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.

PassRandomUser <string>

Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. The parameter is passed along unchanged.

KillIfNotVisible <void>

Removes this entity if it is not in a player's viewcone.

KillWhenNotVisible <void>

Removes this entity when it is not in a player's viewcone. You can pass a time for when this should start.

FireOutput <string>

Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.

RemoveOutput <string>

Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.

AcceptInput <string>

Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.

CancelPending <void>

Cancels any events fired by this entity that are currently pending in the I/O event queue.

FreeChildren <void>

Unparents all direct children of this entity.

SetLocalVelocity <vector>

Sets this entity's current velocity.

SetLocalAngularVelocity <vector>

Sets this entity's current angular velocity.

AddSpawnFlags <integer>

Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

RemoveSpawnFlags <integer>

Removes spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

AddSolidFlags <integer>

Adds solid flags to this entity.

RemoveSolidFlags <integer>

Removes solid flags from this entity.

ChangeVariable <string>

Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.

SetHealth <integer>

Sets this entity's health.

AddHealth <integer>

Adds to this entity's health.

RemoveHealth <integer>

Removes from this entity's health.

SetMaxHealth <integer>

Sets this entity's max health.

SetEntityName <target_destination>

Sets this entity's name that other entities should refer to it by.

SetTarget <target_destination>

Sets this entity's target. This is specific to certain entities, particularly logic entities that involve a target.

SetOwnerEntity <target_destination>

Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.

SetThinkNull <void>

Sets this entity's general think function to null. Behavior varies from entity to entity..

Touch <target_destination>

Simulates this entity touching the specified entity.

Inherited from EnableDisable

Enable <void>

Enable this entity.

Disable <void>

Disable this entity.

Inherited from math_counter

Add <float>

Add an amount to the counter and fire the OutValue output with the result.

Divide <float>

Divide the counter by an amount and fire the OutValue output with the result.

Multiply <float>

Multiply the counter by an amount and fire the OutValue output with the result.

SetValue <float>

Set the counter to a new value and fire the OutValue output with the result.

SetValueNoFire <float>

Set the counter to a new value without firing any outputs.

Subtract <float>

Subtract an amount from the counter and fire the OutValue output with the result.

SetHitMax <float>

Set the upper bound of the counter and fire the OutValue output with the current value.

SetHitMin <float>

Set the lower bound of the counter and fire the OutValue output with the current value.

GetValue <void>

Causes the counter fire its OnGetValue output with the current value of the counter. Used for polling the counter when you don't want constant updates from the OutValue output.

SetMaxValueNoFire <float>

Set the upper bound of the counter without firing any outputs.

SetMinValueNoFire <float>

Set the lower bound of the counter without firing any outputs.

Outputs

Inherited from BaseEntityPoint

OnUser1 <void>

Fired in response to FireUser1 input.

OnUser2 <void>

Fired in response to FireUser2 input.

OnUser3 <void>

Fired in response to FireUser3 input.

OnUser4 <void>

Fired in response to FireUser4 input.

OutUser1 <string>

Fires in response to PassUser1 input, with the parameter passed through unchanged.

OutUser2 <string>

Fires in response to PassUser2 input, with the parameter passed through unchanged.

OutUser3 <string>

Fires in response to PassUser3 input, with the parameter passed through unchanged.

OutUser4 <string>

Fires in response to PassUser4 input, with the parameter passed through unchanged.

Inherited from math_counter

OutValue <float>

Fired when the counter value changes.

OnHitMin <void>

Fired when the counter value meets or goes below the min value. The counter must go back above the min value before the output will fire again.

OnHitMax <void>

Fired when the counter value meets or exceeds the max value. The counter must go below the max value before the output will fire again.

OnGetValue <float>

Fired in response to the GetValue input. Used for polling the counter when you don't want constant updates from the OutValue output.

OnChangedFromMin <void>

Fired when the counter value changes from the minimum value.

OnChangedFromMax <void>

Fired when the counter value changes from the max value.