logic_timer
From Valve Developer Community
logic_timer is a point entity available in all Source games. It fires an output at regular or random intervals. It can optionally alternate between a "high" and a"low" output.
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.
EnableDisable:
- Start Disabled
<bool> - Stay dormant until activated (probably with the Enable input).
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Flags
- Oscillator (Alternates between
OnTimerHighandOnTimerLowoutputs.OnTimerHighcomes 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.
-
ResetTimer(New with Orange Box) - Starts counting from zero. You could also use
enable. -
AddToTimer <float>(New with Orange Box) -
SubtractFromTimer <float>(New with Orange Box) - Adds/removes time if the timer is enabled. No effect if disabled.
-
UseRandomTime(New with Orange Box)
EnableDisable:
-
Enable -
Disable - Enable/disable this entity from performing its task. It might also disappear from view.
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
Outputs
-
OnTimer - Fired when a non-oscillating timer expires.
-
OnTimerHigh -
OnTimerLow - Alternatively fired every time an oscillating timer expires, starting with
OnTimerHigh.
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.

