Can you alter instance parameters?
Quote from GreyHound on August 25, 2011, 9:12 amHi, i've got an integer parameter defining the texture index of some overlays.
Now i want the option to toogle the texture index via the io_proxy.
Is there any way to do that?I've been looking for anything similar all day but i couldn't get any further.
Or, is it possible to somehow write some code into the parameter overwrite field where i call the textureToogle like "Counter:GetValue" or something similar?
I could probably come up with something using logic_branches but that would double my logic_relays. Not sure if this is necessary.
Thanks a lot
Hi, i've got an integer parameter defining the texture index of some overlays.
Now i want the option to toogle the texture index via the io_proxy.
Is there any way to do that?
I've been looking for anything similar all day but i couldn't get any further.
Or, is it possible to somehow write some code into the parameter overwrite field where i call the textureToogle like "Counter:GetValue" or something similar?
I could probably come up with something using logic_branches but that would double my logic_relays. Not sure if this is necessary.
Thanks a lot
Quote from gallardo on August 25, 2011, 9:20 amWait for specific help, but an option is always tweak the original instance and save it like yours.
Wait for specific help, but an option is always tweak the original instance and save it like yours.
Quote from GreyHound on August 25, 2011, 9:39 amThere's no instance i could edit, or at least i'm not aware of any. I almost doubt it's possible to change the variables at runtime.
I guess i'll have to go the way using logic branches.
There's no instance i could edit, or at least i'm not aware of any. I almost doubt it's possible to change the variables at runtime.
I guess i'll have to go the way using logic branches.
Quote from Vordwann on August 25, 2011, 12:54 pmIf you have indicator lights in an instance and want to toggle them from outside, do it like so: Set up the indicator lights, all with the same name. Set up an env_texturetoggle with target brushes set as the indicator lights. Name the texturetoggle also. Next, put 2 logic_relays in the instance. Have one of their outputs being OnTrigger > Texturetoggle > SetTextureIndex > 1 and the other being OnTrigger > Texturetoggle > SetTextureIndex > 0. Next, in your func_instance_io_proxy, have two outputs. First: OnProxyRelay > (Name of first logic_relay) > trigger, and OnProxyRelay > (Name of 2nd logic_relay) > Trigger. This way, once your instance has a fix-up name inside your other map, you can tell it to fire one or the other logic_relays in the instance, causing the indicator lights to turn on/off remotely.
If you have indicator lights in an instance and want to toggle them from outside, do it like so: Set up the indicator lights, all with the same name. Set up an env_texturetoggle with target brushes set as the indicator lights. Name the texturetoggle also. Next, put 2 logic_relays in the instance. Have one of their outputs being OnTrigger > Texturetoggle > SetTextureIndex > 1 and the other being OnTrigger > Texturetoggle > SetTextureIndex > 0. Next, in your func_instance_io_proxy, have two outputs. First: OnProxyRelay > (Name of first logic_relay) > trigger, and OnProxyRelay > (Name of 2nd logic_relay) > Trigger. This way, once your instance has a fix-up name inside your other map, you can tell it to fire one or the other logic_relays in the instance, causing the indicator lights to turn on/off remotely.
[spoiler][SP] Alternate[/spoiler]
Quote from GreyHound on August 25, 2011, 1:59 pmVordwann wrote:If you have indicator lights in an instance and want to toggle them from outside, do it like so: Set up the indicator lights, all with the same name. Set up an env_texturetoggle with target brushes set as the indicator lights. Name the texturetoggle also. Next, put 2 logic_relays in the instance. Have one of their outputs being OnTrigger > Texturetoggle > SetTextureIndex > 1 and the other being OnTrigger > Texturetoggle > SetTextureIndex > 0. Next, in your func_instance_io_proxy, have two outputs. First: OnProxyRelay > (Name of first logic_relay) > trigger, and OnProxyRelay > (Name of 2nd logic_relay) > Trigger. This way, once your instance has a fix-up name inside your other map, you can tell it to fire one or the other logic_relays in the instance, causing the indicator lights to turn on/off remotely.The things is, i'm making indicator panels using 25 unique overlays that can, depending on the combination, display all numbers from 0-9 or even letters if i choose to do them.
So i've already broken down all numbers into single proxy_relays that display a certain number. That isn't the problem. But i want it to be more generic:
The indicators i use have 3 states. Black/Off (0) and (1) for Blue and (2) for Orange.
Now i wanted to add a simple relay that would be called "Toggle" and it would just change the color from Orange to blue and vice versa. I guess i could stimulate the update using Multiply x 1 on the counter that holds the curently displayed number, which will pipe it's value to a logic_case that will then call the correct sub_relay for that specific symbol. I guess that "sub_relay" needs to toogle a logic_branch specific for this single number. For each number there would be an logic_branch_listener with only this single branch as input which would determine the actual color.
Hmmmm .... as i write this, this could work. Brb.
The things is, i'm making indicator panels using 25 unique overlays that can, depending on the combination, display all numbers from 0-9 or even letters if i choose to do them.
So i've already broken down all numbers into single proxy_relays that display a certain number. That isn't the problem. But i want it to be more generic:
The indicators i use have 3 states. Black/Off (0) and (1) for Blue and (2) for Orange.
Now i wanted to add a simple relay that would be called "Toggle" and it would just change the color from Orange to blue and vice versa. I guess i could stimulate the update using Multiply x 1 on the counter that holds the curently displayed number, which will pipe it's value to a logic_case that will then call the correct sub_relay for that specific symbol. I guess that "sub_relay" needs to toogle a logic_branch specific for this single number. For each number there would be an logic_branch_listener with only this single branch as input which would determine the actual color.
Hmmmm .... as i write this, this could work. Brb.
Quote from GreyHound on August 26, 2011, 12:14 pmI kinda overcomplicated everything.
I guess it's the lack of experience. I solved it enabling/disabling some relays and calling getValue on the counter to toggle the color eventually.
I kinda overcomplicated everything.
I guess it's the lack of experience. I solved it enabling/disabling some relays and calling getValue on the counter to toggle the color eventually.
