Logic timer: Difference between revisions
Jump to navigation
Jump to search
Note:Enabling the entity resets its timer.
Tip:Use with logic_case for extremely random events.
Fitzroy doll (talk | contribs) |
(Cleanup) |
||
Line 1: | Line 1: | ||
{{base point|logic_timer}} | |||
== Entity description == | |||
[[File:logic_timer.png|left|link=]] | |||
An entity that fires an [[output]] at regular or random intervals. It can optionally alternate between a "high" and a "low" output. | |||
{{note|Enabling the entity resets its timer.}} | {{note|Enabling the entity resets its timer.}} | ||
Line 7: | Line 9: | ||
{{tip|Use with [[logic_case]] for extremely random events.}} | {{tip|Use with [[logic_case]] for extremely random events.}} | ||
{{clr}} | |||
== Keyvalues == | |||
{{KV|Use Random Time|boolean|Makes the entity fire at random intervals. Range of values is restricted by the next two KVs. }} | |||
{{KV|Minimum Random Interval|string|If "Use Random Time" is set, this is the minimum time between timer fires. The time will be a random number between this and the "Maximum Random Interval".}} | |||
{{KV|Maximum Random Interval|string|If "Use Random Time" is set, this is the maximum time between timer fires. The time will be a random number between the "Minimum Random Interval" and this.}} | |||
{{KV|Refire Interval|string|If "Use Random Time" isn't set, this is the time between timer fires, in seconds.}} | |||
{{KV Targetname}} | |||
{{KV EnableDisable}} | {{KV EnableDisable}} | ||
==Flags== | == Flags == | ||
* 1 : Oscillator (alternates between <code>OnTimerHigh</code> and <code>OnTimerLow</code> outputs) | |||
== Inputs == | |||
{{IO|RefireTime|Set a new Refire Interval.|param=integer}} | |||
==Inputs== | {{IO|ResetTimer|Reset the timer. It will fire after the Refire Interval expires.}} | ||
{{IO|FireTimer|Force the timer to fire immediately.}} | |||
{{IO|Enable|Enable the timer.}} | |||
{{IO|Disable|Disable the timer.}} | |||
{{IO|Toggle|Toggle the timer on/off.}} | |||
{{IO|LowerRandomBound|Set a new Minimum Random Interval.|param=float}} | |||
{{IO|UpperRandomBound|Set a new Maximum Random Interval.|param=float}} | |||
{{IO|AddToTimer|Add time to the timer if it is currently enabled. Does not change the Refire Interval.|param=float}} | |||
{{IO|SubtractFromTimer|Subtract time from the timer if it is currently enabled. Does not change the Refire Interval.|param=float}} | |||
{{I Targetname}} | |||
{{I EnableDisable}} | {{I EnableDisable}} | ||
== Outputs == | |||
{{IO|OnTimer|Fired when the timer expires.}} | |||
{{IO|OnTimerHigh|Fired every other time for an oscillating timer.}} | |||
{{IO|OnTimerLow|Fired every other time for an oscillating timer.}} | |||
{{O Targetname}} | {{O Targetname}} |
Revision as of 00:04, 9 June 2011
Entity description

An entity that fires an output at regular or random intervals. It can optionally alternate between a "high" and a "low" output.


Keyvalues
- Use Random Time ([todo internal name (i)]) <boolean>
- Makes the entity fire at random intervals. Range of values is restricted by the next two KVs.
- Minimum Random Interval ([todo internal name (i)]) <string>
- If "Use Random Time" is set, this is the minimum time between timer fires. The time will be a random number between this and the "Maximum Random Interval".
- Maximum Random Interval ([todo internal name (i)]) <string>
- If "Use Random Time" is set, this is the maximum time between timer fires. The time will be a random number between the "Minimum Random Interval" and this.
- Refire Interval ([todo internal name (i)]) <string>
- If "Use Random Time" isn't set, this is the time between timer fires, in seconds.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enable
input).
Flags
- 1 : Oscillator (alternates between
OnTimerHigh
andOnTimerLow
outputs)
Inputs
- RefireTime <integer >
- Set a new Refire Interval.
- ResetTimer
- Reset the timer. It will fire after the Refire Interval expires.
- FireTimer
- Force the timer to fire immediately.
- Enable
- Enable the timer.
- Disable
- Disable the timer.
- Toggle
- Toggle the timer on/off.
- LowerRandomBound <float >
- Set a new Minimum Random Interval.
- UpperRandomBound <float >
- Set a new Maximum Random Interval.
- AddToTimer <float >
- Add time to the timer if it is currently enabled. Does not change the Refire Interval.
- SubtractFromTimer <float >
- Subtract time from the timer if it is currently enabled. Does not change the Refire Interval.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnTimer
- Fired when the timer expires.
- OnTimerHigh
- Fired every other time for an oscillating timer.
- OnTimerLow
- Fired every other time for an oscillating timer.