Logic timer: Difference between revisions
Jump to navigation
Jump to search
m (Technical limitations and stub) |
(Almost overwrote a previous edit. Timing is everything. :)) |
||
| Line 1: | Line 1: | ||
{{wrongtitle|title=logic_timer}} | {{wrongtitle|title=logic_timer}} | ||
==Entity Description== | |||
'''Entity Name:''' logic_timer | |||
An entity that fires a timer event at regular, or random, intervals. It can also be set to oscillate betweena high and low end, in which case it will fire alternating high/low outputs each time it fires. | |||
==Entity Values== | |||
===Keys=== | |||
* '''Name''' ''targetname <target_source>'' | |||
** The name that other entities refer to this entity by. | |||
* '''Start Disabled''' ''StartDisabled <choices>'' | |||
** If '''Yes''', this entity starts disabled. | |||
* '''Use Random Time''' ''UseRandomTime <choices>'' | |||
** If '''Yes''', fires randomly at an interval from the last trigger. | |||
* '''Minimum Random Interval''' ''LowerRandomBound <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''' ''UpperRandomBound <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''' ''RefireTime <string>'' | |||
** If 'Use Random Time' isn't set, this is the time between timer fires, in seconds. | |||
===Inputs=== | |||
* '''Kill''' | |||
** Removes this entity from the world. | |||
* '''KillHierarchy''' | |||
** Removes this entity and all its children from the world. | |||
* '''AddOutput''' ''<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>'' | |||
** Adds an entity I/O connection to this entity. Very dangerous, use with care | |||
* '''FireUser1''' | |||
** Causes this entity's OnUser1 output to be fired. | |||
* '''FireUser2''' | |||
** Causes this entity's OnUser2 output to be fired. | |||
* '''FireUser3''' | |||
** Causes this entity's OnUser3 output to be fired. | |||
* '''FireUser4''' | |||
** Causes this entity's OnUser4 output to be fired. | |||
* '''Enable''' | |||
** Enable this entity. | |||
* '''Disable''' | |||
** Disable this entity. | |||
* '''RefireTime <integer>''' | |||
** Set a new Refire Interval. | |||
* '''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. | |||
===Outputs=== | |||
* '''OnUser1''' | |||
** Fired in response to FireUser1 input. | |||
* '''OnUser2''' | |||
** Fired in response to FireUser2 input. | |||
* '''OnUser3''' | |||
** Fired in response to FireUser3 input. | |||
* '''OnUser4''' | |||
** Fired in response to FireUser4 input. | |||
* '''OnTimer''' | |||
** Fired when the timer expires. | |||
* '''OnTimerHigh''' | |||
** Fired every other time for an oscillating timer. | |||
* '''OnTimerLow''' | |||
** Fired every other time for an oscillating timer. | |||
===Flags=== | |||
* '''Oscillator (alternates between OnTimerHigh and OnTimerLow outputs)''' (Default Unchecked) | |||
** Self-explanatory. | |||
==Additional Info== | |||
* 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. | |||
[[Category:Entities]] | |||
Revision as of 15:43, 6 July 2005
Entity Description
Entity Name: logic_timer
An entity that fires a timer event at regular, or random, intervals. It can also be set to oscillate betweena high and low end, in which case it will fire alternating high/low outputs each time it fires.
Entity Values
Keys
- Name targetname <target_source>
- The name that other entities refer to this entity by.
- Start Disabled StartDisabled <choices>
- If Yes, this entity starts disabled.
- Use Random Time UseRandomTime <choices>
- If Yes, fires randomly at an interval from the last trigger.
- Minimum Random Interval LowerRandomBound <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 UpperRandomBound <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 RefireTime <string>
- If 'Use Random Time' isn't set, this is the time between timer fires, in seconds.
Inputs
- Kill
- Removes this entity from the world.
- KillHierarchy
- Removes this entity and all its children from the world.
- AddOutput <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Adds an entity I/O connection to this entity. Very dangerous, use with care
- FireUser1
- Causes this entity's OnUser1 output to be fired.
- FireUser2
- Causes this entity's OnUser2 output to be fired.
- FireUser3
- Causes this entity's OnUser3 output to be fired.
- FireUser4
- Causes this entity's OnUser4 output to be fired.
- Enable
- Enable this entity.
- Disable
- Disable this entity.
- RefireTime <integer>
- Set a new Refire Interval.
- 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.
Outputs
- OnUser1
- Fired in response to FireUser1 input.
- OnUser2
- Fired in response to FireUser2 input.
- OnUser3
- Fired in response to FireUser3 input.
- OnUser4
- Fired in response to FireUser4 input.
- OnTimer
- Fired when the timer expires.
- OnTimerHigh
- Fired every other time for an oscillating timer.
- OnTimerLow
- Fired every other time for an oscillating timer.
Flags
- Oscillator (alternates between OnTimerHigh and OnTimerLow outputs) (Default Unchecked)
- Self-explanatory.
Additional Info
- 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.