Multi manager (Half-Life: Source): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
{{CD|CMultiManager|base=CPointEntity|file1=hl1/hl1_ents.cpp}}
{{CD|CMultiManager|base=CPointEntity|file1=hl1/hl1_ents.cpp}}
{{TabsBar|main=hls|base=multi_manager}}
{{TabsBar|main=hls|base=multi_manager}}
{{draft}}
{{cleanup|This entity seems to actually work more akin to {{ent|logic_relay}} than its GoldSrc counterpart.}}
{{obsolete|entity=1|replacement={{ent|logic_relay}}}}
{{obsolete|entity=1|replacement={{ent|logic_relay}}}}
{{this is a|point entity|name=multi_manager|engine=Source|sprite=1|game=Half-Life: Source|game1=Half-Life Deathmatch: Source}}
{{this is a|logical entity|name=multi_manager|sprite=1|game=Half-Life: Source|game1=Half-Life Deathmatch: Source}}
Deprecated entity from {{GoldSrc|2}}, only used in {{hls|bold}}, replaced by {{ent|logic_relay}} in {{src|4}}.
Deprecated entity from {{GoldSrc|2}}, replaced by {{ent|logic_relay}} in {{src|4}}.
{{modernImportant|This entity counts as an [[edict]]; use [[logic_relay]] instead.}}
{{Important|This entity counts as an [[edict]]; use [[logic_relay]] instead.}}
__NOTOC__
==Entity description==
Lets you trigger multiple entities, potentially with a delay before fire for each targeted entity.


To trigger an entity with it, you must first turn off smartedit, then add keyvalue pairs for the targets. The "key" is the [[targetname]] of the entity you want to target. The "value" is the delay in seconds before the entity is triggered after the <code>multi_manager</code> itself has been triggered. The same targetname can be targeted multiple times at different delays, however the keyvalue will become ''targetname#1'' and so on.
== Keyvalues ==
{{KV Targetname}}
{{KV|Wait|intn=wait|float|deprecated=1|Unused.}}
{{KV|<Any other entity's [[targetname]]>|float|intn=0|The entity targetnames to be used by this <code>multi_manager</code>. The key is the targetname of another entity, and the value is the delay in seconds. Up to 16 targets in the queue can exist. This is equivalent to firing their [[Use]] input with the specified delay{{confirm}}.
:{{note|These keyvalues must be added manually without smart edit.}}
:{{note|Almost all uses of multi_manager in {{hls}} were converted to use OnTrigger.}}
}}


A maximum of 16 targets can exist for a single <code>multi_manager</code>.
== Inputs ==
{{I|[[Use]] / Trigger|param=void|Fires this entity's OnTrigger output and also uses specified targets with their specified delays.}}


==Key Values==
== Outputs ==
{{Hl1 kv targetname}}
{{O|OnTrigger|activator=activator of {{mono|Trigger}} input|Fired when this entity receives the {{mono|Trigger}} input.}}
{{KV|Any other entity's [[targetname]]|float|intn=0|The entity targetnames to be fired by this <code>multi_manager</code>. The key is the targetname of another entity, and the value is the delay in seconds. Up to 16 targets in the queue can exist.
:{{note|These keyvalues must be added manually without smart edit.}}}}


== Media ==
== FGD Code ==
<gallery mode=nolines widths=384px heights=256px>
<syntaxhighlight lang="d">
mm_in_source.png|Entity in {{hammer|4}}
@PointClass base(Targetname) color(255 128 0) iconsprite("sprites/multi_manager.vmt")= multi_manager : "MultiTarget Manager"
</gallery>
[
 
    input Trigger(void) : "Fire this entity's outputs"
==Flags==
    output OnTrigger(void) : "Fired when this entity receives the Trigger input."
{{fl|1|Multithreaded|This allows the <code>multi_manager</code> to be targeted again after it has been targeted once, but before all of the targets in its queue have been fired. It does this by creating a clone of itself that will trigger all targets and then remove itself. This can cause a noticeable increase in the number of entities if the manager has targets with long delays.}}
]
:{{warning|When the <code>multi_manager</code> clones itself, it takes an additional entity slot in the game for every cloning. If all entity slots are taken up, the game will crash with an error message of <code>'''ED_Alloc No Free Edicts'''</code>. There are other ways of looping one multimanager without the need of this flag ticked, [https://twhl.info/wiki/page/Tutorial%3A_Multi_manager_Looping_Made_Easy such as this one].}}
</syntaxhighlight>


== See Also ==
== See Also ==
* {{ent|multisource|engine=source}}
* {{ent|multisource|engine=source}}
[[Category:Half-Life Source]]
[[Category:Half-Life Source Entities]]

Latest revision as of 06:46, 19 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CMultiManager
CPointEntity
CBaseEntity
C++ hl1/hl1_ents.cpp
Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
It has since been deprecated by: logic_relay.
Multi manager.png

multi_manager is a logical entity available in Half-Life: Source Half-Life: Source and Half-Life Deathmatch: Source Half-Life Deathmatch: Source.

Deprecated entity from GoldSrc GoldSrc, replaced by logic_relay in Source Source.

Icon-Important.pngImportant:This entity counts as an edict; use logic_relay instead.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Wait (wait) <float> Obsolete
Deprecated.
Unused.
<Any other entity's targetname> <float>
The entity targetnames to be used by this multi_manager. The key is the targetname of another entity, and the value is the delay in seconds. Up to 16 targets in the queue can exist. This is equivalent to firing their Use input with the specified delay[confirm].
Note.pngNote:These keyvalues must be added manually without smart edit.
Note.pngNote:Almost all uses of multi_manager in Half-Life: Source were converted to use OnTrigger.

Inputs

Use / Trigger <void>
Fires this entity's OnTrigger output and also uses specified targets with their specified delays.

Outputs

OnTrigger
!activator = activator of Trigger input
!caller = this entity
Fired when this entity receives the Trigger input.

FGD Code

@PointClass base(Targetname) color(255 128 0) iconsprite("sprites/multi_manager.vmt")= multi_manager : "MultiTarget Manager" 
[
    input Trigger(void) : "Fire this entity's outputs"
    output OnTrigger(void) : "Fired when this entity receives the Trigger input."
]

See Also