Passing Math_Counter value from instance to logic_case

Passing Math_Counter value from instance to logic_case

Postby Samot » Sun Jul 29, 2018 12:35 pm

I created an instance with multiple buttons. Within the instance, I have each button add +1 to a Math_Counter. I have a Logic_Relay with an output On Trigger, GetValue from the Math counter. I finished with a Func_Instance_IO_Proxy. In my current map, I included this instance, but can not figure out how to get the value from within the instance into a Logic_Case. I tried using a Logic_Timer, to call the Func_Instance_IO_Proxy, but don't see how to grab and save that value into my Logic_Case. No matter how much I searched online, I couldn't find anything that gives me the answer. Can somebody help me with this? Thanks.
Check out my Science Fiction novels at http://www.tomawright.com
User avatar
Samot
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Mar 3, 2014

Registered users don't see ads! Register now!
 

Re: Passing Math_Counter value from instance to logic_case

Postby ChickenMobile » Mon Aug 06, 2018 1:17 am

The output for when a math_counter changes is 'OutValue'. Therefore

Math_Counter Outputs =
OutValue > name_of_logic_case > InValue

The values of the logic_case will need to be mapped to your values respectively, e.g. Case01 = 1, Case02 = 2 etc.
                             TWP Releases | My Workshop
User avatar
ChickenMobile
Senior Stalemate Associate
 
Posts: 2,426
Joined: May 9, 2011
Location: Canberra, Australia

Re: Passing Math_Counter value from instance to logic_case

Postby Samot » Mon Aug 06, 2018 12:06 pm

Thanks for posting this, ChickenMobile. It works great in a test map. But I can't get it to work when the Math_Counter is in an Instance.
I tried having a second math_counter in the level with the following output: OnGetValue, Instance_test, instance:Relay_Counter;Trigger, outvalue. My second output is: OutValue, Case_test, InValue. As I said above, my instance has 4 buttons that add +1 each to a counter. I have a relay that, On_Trigger, GetValue from the counter. This does not work. My level math_counter does not seem able to acquire the value of the math_counter within the instance. I know there has to be a way to do this, but I just can't figure out how. I'm coming to the point where I might have to completely recreate the instance within my current level.
Check out my Science Fiction novels at http://www.tomawright.com
User avatar
Samot
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Mar 3, 2014

Re: Passing Math_Counter value from instance to logic_case

Postby Kwinten06 » Sun Aug 12, 2018 2:34 pm

Sadly this is not your fault here, there is a big problematic bug with instances
"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"
source here: https://developer.valvesoftware.com/wik ... e_io_proxy
User avatar
Kwinten06
Defective Turret
 
Posts: 40
Joined: Sep 9, 2015
Location: France


Return to Hammer and Modding



Who is online

Users browsing this forum: No registered users and 5 guests

Search the Forums

User Menu

Register
Login

Login