logic_branch
Jump to navigation
Jump to search
Code classes:
CLogicBranch
CLogicalEntity
CServerOnlyEntity
CBaseEntity
(all ents)
logic_branch
is a point entity present in all Source games. It stores a boolean (true/false, yes/no, 1/0) value. Use env_global
to make this value persist across rounds and maps.
Keyvalues[edit | edit source]
- Initial value
(InitialValue)
<integer>
- What the value should be set to when the entity spawns.
Inputs[edit | edit source]
- SetValue
<boolean>
- Sets Initial value.
- SetValueTest
<boolean>
- Sets Initial value, then causes OnTrue or OnFalse to fire.
- Toggle
- Inverts the value.
- ToggleTest
- Inverts the value, then causes outputs to fire.
- Test
- Makes OnTrue or OnFalse fire without changing the value.
Outputs[edit | edit source]
- OnTrue
- Fires if the value is true (1).
- OnFalse
- Fires if the value is false (0).