Difference between revisions of "Multisource"
Outerbeast (talk | contribs) m (List of entities supporting master) |
Outerbeast (talk | contribs) m |
||
Line 22: | Line 22: | ||
* If a valid entity does not target a multisource that is being used as a master, or the targetting entity no longer exists, the multisource will not lock entities until something is able to target it. | * If a valid entity does not target a multisource that is being used as a master, or the targetting entity no longer exists, the multisource will not lock entities until something is able to target it. | ||
− | * If you change the target of an entity targeting a multisource entity, the multisource entity will automatically no longer expect input from it. Note that entity takes only <code>target</code> | + | * If you change the target of an entity targeting a multisource entity, the multisource entity will automatically no longer expect input from it. |
+ | <br>Note that the entity takes only <code>target</code> and <code>killtarget</code> keys into account, so other triggering inputs like <code>TriggerTarget</code> won't work. In that case use [[trigger_relay]] like a bridge between entity with atypical-triggering output and multisource. | ||
== Issues == | == Issues == | ||
Kill Target is count as a normal targetting in multisource, do not "kill target" this entity or it won't work expecting a kill input. | Kill Target is count as a normal targetting in multisource, do not "kill target" this entity or it won't work expecting a kill input. | ||
− | |||
{{entity_title}} | {{entity_title}} |
Revision as of 16:50, 24 March 2023
multisource | |
---|---|
Type |
point |
Status |
supported |
The multisource entity is an only master-entity which starts disabled/locked and sets its state to be enabled/unlocked when all entities having the multisource entity as their target
(or killtarget
). It is hence also referred to as an 'AND-Gate'.
The multisource can be used in multiple ways: As a master entity: "locking" entities, triggers, buttons and doors. You can lock or temporary disable some entities by specifying 'multisource' name as a "master" entity of trigger/button/door e.t.c. When 'multisource' is triggered by all possible triggers
(when all entities having this multisource as a target has triggered it) the trigger/button/door is unlocked. Func_button has special ability to revert it's trigger signal when button resets (it's not pressed anymore, see "Delay Before Reset" keyvalue in func_button), that means the trigger/button/door gets locked again and awaits multisource be enabled again. You can create two buttons that unlocks the door but only for limited amount of time, or func_trigger that activates button only when someone step into it e.t.c.As a multiple-triggering entity: multisource will trigger it's target whenever it's triggered by all possible triggers (when all entities having this multisource as a target has triggered it). Func_button has special ability to revert it's trigger when button resets (it's not pressed anymore, see "Delay Before Reset" keyvalue in func_button), that means the multisource can be triggered again by pressing that button(s) and this very multisource can trigger it's target again, even when passing signal through mutli_manager! With this feature you can create well-known "twin buttons" that must be pressed by two players simultaneously in order to open the door.As a single-triggering entity: but what if we need single-triggering entity instead of mutliple triggering, even if multisource can be enabled/disabled repeatedly because of buttons? The solution for this is triggering trigger_relay entity before triggering goal entity, e.g. when mutlisource is targetting door to be opened or multi_manager or anything else, we should add trigger_relay between multisource and goal door/multi_manager/any other entity, like: 'multisource' --> 'trigger_relay' --> 'some entity' instead of directly 'multisource' --> 'some entity' triggering. The state of trigger_relay should be set to "On" to enable triggered entity (or entities) forever, or to "Off" to turn those entities off. You can create two buttons that need to be pressed simultaneously by two players
in order to open the door. When the door opens, button can be still pressed but the door won't be triggered again.
Entities that support master
keyvalue:
- info_player_deathmatch, info_player_dm2 -> disable (re)spawning here untill unlocked.
- game_counter, game_counter_set, game_end, game_player_hurt, game_score, game_text, game_zone_player -> disable until unlocked.
- func_door, func_door_rotating, func_water, momentary_door -> disable opening until unlocked.
- trigger_once, trigger_multiple, trigger_monsterjump, trigger_teleport, trigger_hurt, trigger_changelevel -> disable triggering until unlocked. Note that trigger_teleport/trigger_hurt has built-in options to disable triggering which you may want to use instead of multisource.
- button_target, func_button, func_rot_button, momentary_rot_button -> disable button pressing until unlocked.
1 Keyvalues
Name : targetname
Name by which other entities refer to this entity, either to use it as their master, or to act as one of its required inputs to enable.
When using a multisource as a master to lock another entity, this multisource's targetname
value must be put in the master
value for entity-to-be-locked in order for the multisource to lock it, ensuring that some other entity is set to target this multisource.
Target : target
The multisource entity will fire its target in every instant after it has changed its state to be enabled. You can specify an entity using the multisource entity as its master here to make sure it will be triggered the instant the multisource entity goes into its enabled state.
Global state master : globalstate
If set, the multisource entity will read its initial state from the global state variable specified here on map load. See env_global for more information about this. You should not have any entities targeting this multisource entity when using this.
2 Notes
- If a valid entity does not target a multisource that is being used as a master, or the targetting entity no longer exists, the multisource will not lock entities until something is able to target it.
- If you change the target of an entity targeting a multisource entity, the multisource entity will automatically no longer expect input from it.
Note that the entity takes only target
and killtarget
keys into account, so other triggering inputs like TriggerTarget
won't work. In that case use trigger_relay like a bridge between entity with atypical-triggering output and multisource.
3 Issues
Kill Target is count as a normal targetting in multisource, do not "kill target" this entity or it won't work expecting a kill input.