multi_watcher
An entity that implements the “if-else” logical condition. Turns on if specified entities are in specified states.
Options
logic | Operation logic (AND, OR, NAND, NOR, XOR, XNOR). The words in parentheses should be entered directly in the logic field. |
state | Global state that the multi_watcher watches for in all specified entities. If you want to monitor individual states for specific entities, leave this field empty. The following values are accepted: ON, OFF, TURN ON, TURN OFF, IN USE, DEAD. These words should be entered either directly in the state field or next to the individual target names that you specify. |
target | Target that is activated when all conditions are met. |
offtarget | Target that is activated when the multi_watcher goes from the ON (valid) state to the OFF (invalid) state. |
The other fields are filled in as in multi_manager, where the key is the target name to watch and the value is either the state to watch for or, if a global state is
Usage Details
- This is a modified version of the object from Spirit of Half-Life with extended functionality. This object can implement virtually any logical condition that is based on objects' internal states. The states of objects are closely related to their purposes. In other words, for each object a change of state causes object-specific transitions. Some objects are always turned off—for example, logical objects such as trigger_relay or trigger_auto. Other objects may be in the IN USE state while the player is using them. Lifts are in the ON state while in motion and so on.
- Overview of operation logic for those unfamiliar with Boolean algebra:
- AND—The condition is met if all monitored objects assume the state specified in the multi_watcher configuration.
- OR—The condition is met if one or more of the monitored objects assume the state specified in the multi_watcher configuration.
- NAND—The AND condition, inverted. Effectively swaps target and offtarget.
- NOR—The OR condition, inverted. Effectively swaps target and offtarget.
- XOR—Exclusive “or”. The condition is met if only one of the monitored objects assumes the specified state, whereas all the others have non-matching states.
- XNOR—The XOR condition, inverted.
- This entity is multifunctional and can be used anywhere, from keypads to complex interactive scripted scenes that require player participation.
- The object works well as a master.