Logic timer: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (Almost overwrote a previous edit.  Timing is everything. :)) | No edit summary | ||
| Line 6: | Line 6: | ||
| 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 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_headcrabcanister]]s at random intervals, instead of using fixed delays on the inputs. | |||
| ==Keyvalues== | |||
| * {{kv targetname}} | |||
| * {{kv enabledisable}} | |||
| * '''UseRandomTime''' | |||
| : {{boolean}} If set, fires randomly at an interval from the last trigger. | |||
| * '''LowerRandomBound''' | |||
| : <float> 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'. | |||
| * '''UpperRandomBound''' | |||
| : <float> 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. | |||
| * '''RefireTime''' | |||
| : <float> If 'Use Random Time' isn't set, this is the interval between timer fires, in seconds. | |||
| ==Flags== | |||
| *  | * 1 : Oscillator (alternates between OnTimerHigh and OnTimerLow outputs) | ||
| ==Inputs== | |||
| * {{i targetname}} | |||
| * '''Enable''' | * '''Enable''' | ||
| : Enable the timer. | |||
| * '''Disable''' | * '''Disable''' | ||
| * | : Disable the timer. | ||
| * '''Toggle''' | |||
| : Toggle the timer on/off. | |||
| * '''RefireTime <integer>''' | * '''RefireTime <integer>''' | ||
| : Set a new Refire Interval. | |||
| * '''FireTimer''' | * '''FireTimer''' | ||
| : Force the timer to fire immediately. | |||
| * '''LowerRandomBound <float>''' | * '''LowerRandomBound <float>''' | ||
| : Set a new Minimum Random Interval. | |||
| * '''UpperRandomBound <float>''' | * '''UpperRandomBound <float>''' | ||
| : Set a new Maximum Random Interval. | |||
| ==Outputs== | |||
| * {{o targetname}} | |||
| * '''OnTimer''' | * '''OnTimer''' | ||
| : Fired when the timer expires. | |||
| * '''OnTimerHigh''' | * '''OnTimerHigh''' | ||
| : Fired every other time for an oscillating timer. | |||
| * '''OnTimerLow''' | * '''OnTimerLow''' | ||
| : Fired every other time for an oscillating timer. | |||
| [[Category:Entities]] | [[Category:Entities]] | ||
Revision as of 22:22, 11 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.
- 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 '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'.
- UpperRandomBound
- <float> 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.
- RefireTime
- <float> If 'Use Random Time' 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.