logic_branch_listener

From Valve Developer Community
Jump to: navigation, search

logic_branch_listener is a point entity available in all Source games.

Entity description

It contains a list of logic_branch entities and fires outputs when the state of any of the logic_branches changes. This entity is used to fire an event when a set of conditions are all satisfied.

Keyvalues

Logic Branch 01 to Logic Branch 16 <targetname>
The names of the logic_branch entities to which this entity "listens". If there are fewer than sixteen, fill them in starting at the lowest number and working up and leave the unused ones blank. Wildcards are allowed in the targetnames.

Inputs

Test
Test the state of all the logic_branches in the Keyvalues list and fire the appropriate output.

Outputs

OnAllTrue
This Output fires when the values of all the logic_branches in the list are true (1) and either one of the logic_branches has changed from false (0) to true (1) or the Test input to this entity has been fired.
OnAllFalse
This Output fires when the values of all the logic_branches in the list are false (0) and either one of the logic_branches has changed from true (1) to false (0) or the Test input to this entity has been fired.
OnMixed
This Output fires when some of the logic_branches in the list are true (1) and some are false (0) and either one of the logic_branches has changed value or the Test input to this entity has been fired.

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.