Logic timer: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (rv. the other 13,000 visitors to the page probably do not. Please use the FGD instead.) |
(I paid for my source licence like they did. I'm as entitled as they are. Please review the ToS item 5 for Online Conduct. Adding information is less restrictive than deleting. Thank you.) |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=logic_timer}} | |||
{{base_point}} | |||
{{ | ==Entity Description== | ||
[[Image:{{PAGENAME}}.png|right]]An entity that fires a timer event at regular, or random, intervals. It can also be set to oscillate between a high and low end, in which case it will fire alternating high/low outputs each time it fires. | |||
* An oscillator's first output will be an OnTimerHigh output. | |||
* Use with [[logic_case]] for extremely random events. | |||
* Could be used to deploy [[env_headcrabcanister]]s at random intervals, instead of using fixed delays on the inputs.{{clr}} | |||
==Keyvalues== | |||
{{ | * {{KV Targetname}} | ||
* {{KV EnableDisable}} | |||
* '''UseRandomTime''' | |||
: | : {{boolean}} If set, fires randomly at an interval from the last trigger. | ||
* '''LowerRandomBound''' | |||
: <float> If '''UseRandomTime''' is set, this is the minimum time between timer fires. The time will be a random number between this and the '''UpperRandomBound'''. | |||
* '''UpperRandomBound''' | |||
: <float> If '''UseRandomTime''' is set, this is the maximum time between timer fires. The time will be a random number between the '''LowerRandomBound''' and this. | |||
* '''RefireTime''' | |||
: <float> If '''UseRandomTime''' isn't set, this is the interval between timer fires, in seconds. | |||
==Flags== | ==Flags== | ||
* Oscillator ( | * 1 : Oscillator (alternates between OnTimerHigh and OnTimerLow outputs) | ||
==Inputs== | ==Inputs== | ||
* {{I Targetname}} | |||
: Toggle the timer on | * {{I EnableDisable}} | ||
: Set a new | * '''Toggle''' | ||
: Toggle the timer on/off. | |||
* '''RefireTime <integer>''' | |||
: Set a new Refire Interval. | |||
* '''FireTimer''' | |||
: Force the timer to fire immediately. | : Force the timer to fire immediately. | ||
* '''LowerRandomBound <float>''' | |||
: Set a new | : Set a new Minimum Random Interval. | ||
* '''UpperRandomBound <float>''' | |||
: Set a new Maximum Random Interval. | |||
* '''{{EP2 add|ResetTimer}}''' | |||
* '''{{EP2 add|AddToTimer <float>}}''' | |||
* '''{{EP2 add|SubtractFromTimer <float>}}''' | |||
* '''{{EP2 add|UseRandomTime}}''' | |||
==Outputs== | ==Outputs== | ||
* {{O Targetname}} | |||
: Fired when | |||
* '''OnTimer''' | |||
: Fired when the timer expires. | |||
: | |||
* '''OnTimerHigh''' | |||
: Fired every other time for an oscillating timer. | |||
* '''OnTimerLow''' | |||
: Fired every other time for an oscillating timer. |
Revision as of 10:55, 15 August 2009
Template:Wrongtitle Template:Base point
Entity Description
An entity that fires a timer event at regular, or random, intervals. It can also be set to oscillate between a high and low end, in which case it will fire alternating high/low outputs each time it fires.
- An oscillator's first output will be an OnTimerHigh output.
- Use with logic_case for extremely random events.
- Could be used to deploy env_headcrabcanisters at random intervals, instead of using fixed delays on the inputs.
Keyvalues
- 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).
- UseRandomTime
- <boolean> If set, fires randomly at an interval from the last trigger.
- LowerRandomBound
- <float> If UseRandomTime is set, this is the minimum time between timer fires. The time will be a random number between this and the UpperRandomBound.
- UpperRandomBound
- <float> If UseRandomTime is set, this is the maximum time between timer fires. The time will be a random number between the LowerRandomBound and this.
- RefireTime
- <float> If UseRandomTime isn't set, this is the interval between timer fires, in seconds.
Flags
- 1 : Oscillator (alternates between OnTimerHigh and OnTimerLow outputs)
Inputs
- EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
- Toggle
- Toggle the timer on/off.
- RefireTime <integer>
- Set a new Refire Interval.
- FireTimer
- Force the timer to fire immediately.
- LowerRandomBound <float>
- Set a new Minimum Random Interval.
- UpperRandomBound <float>
- Set a new Maximum Random Interval.
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.