The Multisource as an AND gate
Multisources
These can be made to act as a normal AND gate as in electronics.This
means that the output will not be active HIGH until all inputs are
active HIGH(in this case both Input A and Input B must be 1 for the Output to be 1).
| Input a |
Input b |
Output |
| 0 |
0 |
0 |
| 0 |
1 |
0 |
| 1 |
0 |
0 |
| 1 |
1 |
1 |
In HL editing terms this means that the multisource will not trigger its target until all inputs have been triggered.An example is the best way to show this,
Eg 1 -
Say you want to have a light in a room that can be only turned on when the power is turned on and the switch has been pressed.To do this you can do the following,
multisource
Name Light_control
Target light
(Note:Ignore the Global State Master for now(leave it blank))
func_button
Name power_button
Targetted Object Light_control
func_button
Name switch_button
Targetted Object Light_control
The above 3 entities are used to determine if the light is ON or OFF.
There are 2 entities that target the multisource(the 2 func_buttons).
When both of these entities have been triggered the light will be turned ON.