Func instance io proxy: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Should have an icon for portal 2 too.)
(Usage (creating outputs for func_instance))
Line 17: Line 17:
: A message from outside can trigger this to cause something to happen in the instance.
: A message from outside can trigger this to cause something to happen in the instance.


==Usage==
Best used for holding outputs from entities inside an instance as if the outputs were originating from the instance itself.
When entities inside the instance target the proxy with a '''ProxyRelay''' input, such as:
:{| | border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
|+ '''detect_something - trigger_multiple'''
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[Image:Io11.png]] || OnStartTouch || door_proxy || ProxyRelay ||   || 0.00 || No
|}
: 
the [[func_instance]] used to import the instance will now be able use that output as if it were the original entity.
If you go to the outputs tab for the func_instance and click ''add'' you'll now be able to select and configure outputs like:
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
|+ '''func_instance'''
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[Image:Io11.png]] || instance:detect_something:OnStartTouch || zap_sound || playsound ||   || 0.00 || No
|-
| [[Image:Io11.png]] || instance:detect_something:OnStartTouch || !activator || kill ||   || 2.00 || No
|}
: 
You can add as many outputs to the proxy as you would like (presumably), wiith as many entities as you'd like. This essentially turns the func_instance into a wildcard entity that borrows outputs from pre-configured entities, and lets the mapper choose how to use them.
==See also==
==See also==
*[[func_instance]]
*[[func_instance]]

Revision as of 11:28, 23 May 2011

Portal 2 Template:As point It is also available in Portal 2.

Entity Description

Place one copy of this entity inside of an instance. Sending messages to entities inside the instance from the Proxy's OnProxyRelay output will allow you to trigger these entities from outside the instance by sending messages to the func_instance. Send the ProxyRelay message from entities inside the instance to the proxy and you will be able to use these events to send messages to other entities outside the instance from the func_instance.

Note.pngNote:The instance, the proxy, and all entities involved should be named descriptively.

KeyValues

Name <target_source>
The name that other entities refer to this entity by.

Inputs

ProxyRelay
This message will get relayed and will be available from the instance.

Outputs

OnProxyRelay
A message from outside can trigger this to cause something to happen in the instance.

Usage

Best used for holding outputs from entities inside an instance as if the outputs were originating from the instance itself.

When entities inside the instance target the proxy with a ProxyRelay input, such as:

detect_something - trigger_multiple
My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch door_proxy ProxyRelay   0.00 No
 

the func_instance used to import the instance will now be able use that output as if it were the original entity. If you go to the outputs tab for the func_instance and click add you'll now be able to select and configure outputs like:


func_instance
My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png instance:detect_something:OnStartTouch zap_sound playsound   0.00 No
Io11.png instance:detect_something:OnStartTouch !activator kill   2.00 No
 

You can add as many outputs to the proxy as you would like (presumably), wiith as many entities as you'd like. This essentially turns the func_instance into a wildcard entity that borrows outputs from pre-configured entities, and lets the mapper choose how to use them.

See also