Please or Register to create posts and topics.

entity output as $variable?

I want to make an instance with a relay that delays variably at depending on how long I want the delay to be. How can I make the delay value changeable using func_instance_parms? I tried putting in $delay but it doesn't accept it. I know you can addoutputs

Is there a way to do it with logic_timer somehow? I don't understand the difference between it's outputs "OnTimer", "OnTimerHigh", and "OnTimerLow".

Also, if I could do the same thing to a relay's output's target, then the instance will be able to make outputs. Or is there an easier way to make an instance trigger something outside the instance? Or maybe that's not even possible?

EDIT: I figured out that you can put an output in the io_proxy that says "OnProxyRelay, target, AddOutput, <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>". I deleted the output line in the relay and now I just tell the io_proxy to add that output back in. It's not an ideal solution though, just a work around. Though I have a variety of delays to choose from now, I still have to add the outputs to the proxy manually, and if I need a special delay, I have to make a new instance.

Now I need to figure out how to make an instance fire outputs to outside of itself.

I did this for my own map.

I had a relay (relay1), that I wanted to trigger another relay (relay2) after a delay. As the delay field can't accept variables, what I did was this;
I set up a bunch of logic_relays for the "inbetween", relay1 has the output such as:
OnTrigger > $delay > Trigger
Then, create a relay with the name "1" and set it's outputs to be
OnTrigger > relay2 > Trigger > Delay: 1.00

I did this, creating other relays of 2, 3, 4, etc.

In the func_instance_params, make a Param of $delay with the value of "target_name_or_class" and make the default whatever.

Then, once you place the instance, you set the $delay variable to 1, 2, 3, etc, and when relay1 fires, the variable sends it to a different "inbetween" relay which delays it accordingly.

Lots of entities involved if you want lots of different times, I know, but it works. I hope that helps, maybe it's a better way than adding an output.

Instances can trigger stuff outside the instance. it's explained on the wiki, here http://developer.valvesoftware.com/wiki ... e_io_proxy