func_instance_io_proxy
Code classes:
CFuncInstanceIoProxy
CBaseEntity
(all ents)
func_instance_io_proxy
is a point entity present in all games since Alien Swarm. It is used to forward I/O between entities in an instance and entities outside it.
To send inputs to the instanced entities:
- Place one copy of this entity inside the instance.
- Use the OnProxyRelay output and specify the target entity (in the instance) and the input to fire.
- Then in the actual map, have the desired output target the
func_instance
itself, with the input matching this format:instance:Target;Input
. ("Target" and "Input" should match with the ones specified in the proxy ent. Example:instance:button_relay;Trigger
) - When the map is compiled, VBSP will re-route all the I/O so that entities in the map will target the
func_instance_io_proxy
with inputs called OnProxyRelay1-16, which will fire outputs with matching names that will send the inputs which were first put into the proxy ent's Outputs tab. You can also send an input directly to the entity by simply targeting the post-fixup name.
Note: If developer
has been set to 1, a warning will appear once the 16th relay input is sent, noting that the instance cannot take any more unique inputs. If you must send even more, the code can be modified to support more (for ), otherwise a workaround must be found.
To allow instanced outputs to target entities in the map (aside from direct references, e.g. @glados
):
- Place one copy of this entity inside the instance (it can be the same one that's used for inputs).
- Have an output in the instance target the
func_instance_io_proxy
with ProxyRelay. - In the actual map, go to the
func_instance
's Outputs tab and have the output follow this format:instance:Caller;Output
. ("Caller" being the name of the entity in the instance that the "Output" comes from. Example:instance:instanced_nearby_trigger;OnTrigger
) That "output" will now fire at the appropriate time in the game. From here, specify the target, input, etc as normal.
Bug: Entities that interact with proxies (inside or outside the instance) may only send inputs to that proxy. Other IO connections will be incorrectly rerouted or lost entirely.
Inputs[edit | edit source]
- ProxyRelay
<string>
- Use to make an output be accessible to mappers while working outside of the instance. To do: What does the parameter do?
Outputs[edit | edit source]
- OnProxyRelay
- Use to forward inputs to entities inside the instance.