math_counter_advanced
math_counter_advanced is a point entity available
with any version of Mapbase.A special version of math_counter with the ability to perform advanced calculations. Otherwise functions identically to math_counter.
KeyValues
- Preserve Value? (PreserveValue) <choices>
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.
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 (AlwaysOutputAsInt) <choices>
If set to 'Yes', the stored value (and OutValue) will always be rounded to an integer before firing.
If set to 'Yes', the stored value (and OutValue) will always be rounded to an integer before firing.
- Lerp Percent (SetLerpPercent) <float>
The percentage used by the LerpTo input.
The percentage used by the LerpTo input.
Inputs
- PreserveValue
<bool>
Sets whether this counter's value should be preserved after calculations. 1 = Yes, 0 = No
Sets whether this counter's value should be preserved after calculations. 1 = Yes, 0 = No
- AlwaysOutputAsInt
<bool>
Sets whether this counter's value should always output as an integer. 1 = Yes, 0 = No
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Lerps this counter's value to the specified value based on the lerp percent.
- SetLerpPercent
<float>
Sets the lerp percent.
Sets the lerp percent.
