Logic timer: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 18: | Line 18: | ||
* '''LowerRandomBound''' | * '''LowerRandomBound''' | ||
: <float> If ' | : <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''' | * '''UpperRandomBound''' | ||
: <float> If ' | : <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''' | * '''RefireTime''' | ||
: <float> If ' | : <float> If '''UseRandomTime''' isn't set, this is the interval between timer fires, in seconds. | ||
==Flags== | ==Flags== |
Revision as of 22:50, 25 March 2006
Entity Description
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.
- 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
- 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
- Enable
- Enable the timer.
- Disable
- Disable the timer.
- 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.