Talk:Func instance io proxy

From Valve Developer Community
Jump to navigation Jump to search

Why use a proxy input?

Why use a proxy over usual inputs?

e.g. Why not...

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch DoorInstance01-door_open_relay Trigger   0.00 No
 

as opposed to configuring a proxy to handle...

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch DoorInstance01 instance:door_open_relay:Trigger   0.00 No
 

They both do the exact same thing. Am I overlooking something? --TheLazyPanda 17:12, 23 May 2011 (UTC)

You're right, both ways will work, but the first one is error-prone. You need to know the exact entity names inside the instance you want to communicate with and construct the resulting targetnames like the compiler does. In fact, before the proxy was implemented (L4D2), this was the only way to communicate with instance entities. But with the proxy, Hammer automatically detects all entities that are connected with it, which makes instance I/O much easier (even though it is still being displayed as "broken" by Hammer, I hope Valve will fix that). --Barracuda 18:25, 23 May 2011 (UTC)
I admit, it's nice that the more specific i/o information is passed through (well-sometimes, but I assume this is a bug), but I've found that in many cases, both methods exhibit the same behavior (actually more so, I think in most cases for me). And in regards to constructing the name- well, that's the same too (except again, I can't get Hammer to fill the name using the proxy way, but it will do so using the direct method). So I guess I'm still left confused, lol...because the proxy is currently very error prone...the other way, not so much.--TheLazyPanda 21:27, 23 May 2011 (UTC)
Make sure you're using ProxyRelay1 to ProxyRelay30 and OnProxyRelay1 to OnProxyRelay30 instead of just ProxyRelay and OnProxyRelay (for some reason, the official FGD doesn't contain the numbered slots) Edit: nvm, the numbers are added automatically. The proxy also requires a name to work. --Barracuda 22:14, 23 May 2011 (UTC)
I think the problem has to do with instances not updating properly. Sometimes they appear updated, and at the same time they're missing elements like newer names etc. There seems to be some sort of de-syncing thing going on at some point. Anyway, you're right...when everything is working properly, making calls with instance proxies gets much easier. Oh, I'm also assuming that since Valve uses the name proxy for most of its proxies, proxies don't require map-wide unique names; only instance-wide unique names are important.--TheLazyPanda 12:31, 29 May 2011 (UTC)
While working on a button instance, I've recently noticed that you must use dedicated relays for each ProxyRelay output if your button also fires outputs that are not related to the proxy. Otherwise, all outputs are replaced with OnProxyRelayX, even those who don't fire the proxy. I consider this as a bug, but it could be... well... intended. I would try fix this annoying behavior as a SDK programmer. --Barracuda 16:18, 29 May 2011 (UTC)

Proxy Limitations

Hmm, semi-important question, so do proxies only allow 30 relays for each direction? Just what are the proxy limits?--TheLazyPanda 12:44, 29 May 2011 (UTC)

Yes, there's a hard limit of 30 different I/O per proxy, for both directions. At least that's what ent_info says. --Barracuda 16:07, 29 May 2011 (UTC)

Proxy output bug

Is there any way to fix the 'Entities that send an output to a proxy via ProxyRelay can only output to a proxy. If an entity has outputs to both the proxy and other entities inside the instance, the proxy will re-route the normal outputs to ProxyRelay# and the i/o system will exhibit undesired behavior.' bug? I've tried doing something with @'s or adding some kind of relay-snake but it just doesn't work. I have a button that lights up when you press it, but the only thing it does right now is outputting a signal through the proxy. --DJbatcat 11:00, 30 Januari 2016 (UTC)

Anyone know why this entity can't be an internal entity?

I can't think of any reason why this entity couldn't be internal like func_instance or func_instance_parms, I can't see why inputs or outputs couldn't be handled at compile time. Is there something I don't understand here? Because it'd be really nice if I was able to easily create more than 3 quarters of the complicated things I don't want to manually create every time in older games. --Tiny Desk Engineer (Talk Page) 19:55, 16 June 2022 (PDT)