Logic random outputs: Difference between revisions
Jump to navigation
Jump to search
(works perfectly fine in csgo) |
(proof before i get reverted: https://cdn.discordapp.com/attachments/451068614817349634/693148132753801226/unknown.png) |
||
Line 1: | Line 1: | ||
__NOTOC__ [[File:Logic random outputs.png|left]] | __NOTOC__ [[File:Logic random outputs.png|left]] | ||
{{base point|logic_random_outputs|since=Alien Swarm}} It randomly fires one of up to eight separate outputs. Use [[logic_case]] in older engine branches or if you need twice as many outputs. | {{base point|logic_random_outputs|since=Alien Swarm}} It randomly fires one of up to eight separate outputs. Use [[logic_case]] in older engine branches or if you need twice as many outputs. | ||
Revision as of 10:23, 27 March 2020
Template:Base point It randomly fires one of up to eight separate outputs. Use logic_case in older engine branches or if you need twice as many outputs.
Keyvalues
- OnTrigger1 Chance ([todo internal name (i)]) to OnTrigger8 Chance <float>
- Chance (from 0 to 1) of the OnTrigger1-8 output firing when this entity is triggered.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enable
input).
Flags
- 1 : Only trigger once
- 2 : Allow fast retrigger
Inputs
- Trigger
- Trigger this entity, causing its OnTrigger outputs to fire if it is enabled.
- Toggle
- Toggle this entity between enabled and disabled.
- CancelPending
- Cancel any events fired by this entity that are currently pending in the I/O event queue.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnSpawn
- Fired when this entity is spawned. If this entity is set to only trigger once, it will delete itself after firing this output.
- OnTrigger1 to OnTrigger8
- This output has a chance to fire when the entity is triggered.