logic_timer

From Valve Developer Community
Revision as of 22:38, 15 August 2009 by Fitzroy doll (talk | contribs) (Undo revision 124045 by Gmc.jimmy (Talk) - No need for an edit war)
Jump to navigation Jump to search
Logic timer.png

Template:Base point It fires an output at regular or random intervals. It can optionally alternate between a "high" and a"low" output.

Note.pngNote:Enabling the entity resets its timer.
Tip.pngTip:Use with logic_case for extremely random events.

KeyValues

Use Random Time <bool>
Makes the entity fire at random intervals. Range of values is restricted by the next two KVs.
Minimum Random Interval <float>
Maximum Random Interval <float>
If "Use Random Time" is enabled, these values define the range of values, in seconds, that the entity can choose from for random firing.
Refire Interval <float>
If "Use Random Time" is disabled, this is the interval between outputs in seconds.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

  • Oscillator (Alternates between OnTimerHigh and OnTimerLow outputs. OnTimerHigh comes first.)

Inputs

Toggle
Toggle the timer on or off, resetting it in the process.
RefireTime <int>
Set a new refire interval.
FireTimer
Force the timer to fire immediately.
LowerRandomBound <float>
UpperRandomBound <float>
Set a new min/max random interval.
Template:EP2 add
Starts counting from zero. You could also use enable.
Template:EP2 add
Template:EP2 add
Adds/removes time if the timer is enabled. No effect if disabled.
Template:EP2 add

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.


Outputs

OnTimer
Fired when a non-oscillating timer expires.
OnTimerHigh
OnTimerLow
Alternatively fired every time an oscillating timer expires, starting with OnTimerHigh.