Math counter: Difference between revisions
Jump to navigation
Jump to search
Note:Only stores integers
mNo edit summary |
m (minoro) |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=math_counter}} | {{wrongtitle|title=math_counter}} | ||
==Entity | == Entity description == | ||
[[Image:{{PAGENAME}}.png|right]] | [[Image:{{PAGENAME}}.png|right]] | ||
An entity that stores and manipulates an integer value. It can trigger on reaching user-defined maximum or minimum values, or output its value every time it changes. It also has the ability to perform simple mathematical functions. | An entity that stores and manipulates an integer value. It can trigger on reaching user-defined maximum or minimum values, or output its value every time it changes. It also has the ability to perform simple mathematical functions. | ||
{{clr}}{{note|Only stores integers}} | {{clr}}{{note|Only stores integers}} | ||
==Keyvalues== | == Keyvalues == | ||
* {{kv targetname}} | * {{kv targetname}} | ||
Line 21: | Line 20: | ||
: <integer> Maximum legal value for the counter. If min and max are zero, no clamping is performed. | : <integer> Maximum legal value for the counter. If min and max are zero, no clamping is performed. | ||
==Inputs== | == Inputs == | ||
* {{i targetname}} | * {{i targetname}} | ||
Line 57: | Line 55: | ||
: Fires this entity's OnGetValue | : Fires this entity's OnGetValue | ||
==Outputs== | == Outputs == | ||
* {{o targetname}} | * {{o targetname}} | ||
* '''OutValue <integer>''' | * '''OutValue <integer>''' | ||
: Simply sends out the math_counter's value as though it were typed into the the parameter | : Simply sends out the math_counter's value as though it were typed into the the parameter override field. Useful in conjunction with [[logic_case]] or [[func_movelinear]]. The change is outputed each time the value changes unless the <code>SetValueNoFire</code> is used. | ||
* '''OnHitMax''' | * '''OnHitMax''' | ||
Line 73: | Line 70: | ||
: Outputs integer value in this entity | : Outputs integer value in this entity | ||
==See | == See also == | ||
* [[logic_case]] | * [[logic_case]] | ||
* [[func_movelinear]] | * [[func_movelinear]] | ||
[[Category:Entities]] | [[Category:Entities]] |
Revision as of 13:47, 27 November 2007
Entity description
An entity that stores and manipulates an integer value. It can trigger on reaching user-defined maximum or minimum values, or output its value every time it changes. It also has the ability to perform simple mathematical functions.

Keyvalues
- <boolean>
- startvalue
- <integer> The number the math_counter starts with.
- min
- <integer> Minimum legal value for the counter. If min and max are zero, no clamping is performed.
- max
- <integer> Maximum legal value for the counter. If min and max are zero, no clamping is performed.
Inputs
- Enable this entity.
- Disable this entity.
- Add <integer>
- Adds the given value to the math_counter's value.
- Subtract <integer>
- Subtracts the given value from the math_counter's value.
- Multiply <integer>
- Multiplies the the math_counter's value by the given value.
- Divide <integer>
- Divides the the math_counter's value by the given value.
- SetHitMax <integer>
- Changes the Maximum Legal Value to the given value.
- SetHitMin <integer>
- Changes the Minimum Legal Value to the given value.
- SetValue <integer>
- Changes the math_counter's value to the given value.
- SetValueNoFire <integer>
- Changes the math_counter's value to the given value, but doesn't update the change to any other entities.
- Fires this entity's OnGetValue
Outputs
- OutValue <integer>
- Simply sends out the math_counter's value as though it were typed into the the parameter override field. Useful in conjunction with logic_case or func_movelinear. The change is outputed each time the value changes unless the
SetValueNoFire
is used.
- OnHitMax
- When the Maximum Legal Value is reach this output will be sent. In order to trigger it again you will need to alter the value first. (!activator is the activator)
- OnHitMin
- When the Minimum Legal Value is reach this output will be sent. In order to trigger it again you will need to alter the value first. (!activator is the activator)
- Outputs integer value in this entity