Point EntityThe multisource acts as an AND gate. It only triggers its targets if all entities targeting it are in the 'on' state. It can also be used as a master (instead of actively triggering something when the conditions are met, events or entities using it as a master will only be able to function when the conditions are met).
In other words, the multisource can be used in 2 ways:
1. As a way to activate something,
only if an X amount of entities are already active (it can be 1 entity, 2, 3 or how many you wish to have). For instance: 3 buttons which have their targets set at a specific multisource, and when those buttons get activated, the multisource will activate a door (this is an example of course, the possibilities are endless).
2. To unlock an entity, such as a door, or a button, again only if an X amount of entities are already active. For instance, if a door has its master parameter set to the name of the multisource, then that door will
only unlock once that multisource gets activated in some way.
Be aware though: If just 1 of those X amount of entities gets disabled (such as a button turning off), the multisource will turn off and the door (or anything else you have) will now be locked once again.
Attributes
- Name (targetname) - Property used to identify entities.
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Global State Master (globalname) - This is the name of the global variable (set by an env_global) that can be used to control the state of the multisource.
Notes
- It is very important that the multisource has to be able to be activated by some other entity in some way, otherwise it will not work. That can be anything, from buttons to triggers, but always make sure that something triggers it.
- Note that all clients need to be 'active' at the same time in order for the multisource state to be 'on'. If you have two buttons targeting a multisource, pressing both will make the multisource active, until either one resets (pops back).
- When naming a multisource, do not call it "multisource". It will not function properly. Give it a helpful name that relates to your entity set-up.
- When a map is loaded, a multisource will make a list of up to 32 entities that target it. It will only react to being triggered by any of these entities, so entities that are later made to target the multisource through a trigger_changetarget will be ignored. Likewise, changing the target of an original multisource-targeting entity won't make the multisource forget about that entity, even though that entity can no longer trigger the multisource.
- A multisource doesn't actually look at the state of the entities that trigger it. Instead, it stores its own 'on/off' flag for each entity (initially set to 'off'). Whenever an entity triggers the multisource, it simply toggles the 'on/off' flag for that entity. Auto-resetting func_buttons have special behavior when targeting a multisource: they normally don't trigger their target when they reset, unless the target is a multisource, so the button state automatically matches the multisource's 'on/off' flag for that button.
- Bug: when a func_button with its 'Toggle' flag set targets a multisource, it will fail to trigger the multisource once every 4 times (the third time out of every 4 times that the player uses the button). To work around this bug, make the button target a trigger_relay which then targets the multisource.
- To invert the relationship between a 'Toggle' button and a multisource, use an intermediary trigger_relay as above, and add an auto_trigger that triggers the trigger_relay when the level starts (be sure to set its 'Remove On fire' flag to prevent problems when loading savegames). This results in a button that can disable other entities when pressed. This is more difficult for auto-resetting buttons, because they won't trigger the intermediary trigger_relay when they reset, but one workaround for that is to make the button target a multi_manager that then triggers the trigger_relay twice (first with a delay of 0, then with a delay that matches the buttons auto-reset time).
- If you need to explicitly enable or disable a multisource, you could target it with a button_target, and use two trigger_relays to send an 'on' or 'off' signal to the button_target. This allows you to enable the multisource with the trigger_relay that sends the 'on' signal, and disable it with the trigger_relay that sends the 'off' signal.
Master properties expect a multisource name. A multisource acts as an on/off switch that you trigger to toggle your entity. If two entities target the multisource, both must be active at the same time for the multisource to work. (e.g.: two buttons).