Interesting logic puzzle

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
I am planning some logic for my 72 hour map, and would like some input. I am attempting to have a train drop off a flag upon passing. Which flag is dropped is determined by the owner of the control point, which is reset after each train passes. I am planning on using a logic_case to determine which flag (or none if the cp is not owned) to drop. My problem is storing a value from the cp (sent upon capture) so that it can be over written if recaptured, and erased when the train passes. when a path_track is passed it should pass the stored value to the logic_case to choose the case and correct out put. My idea was to store the value in a math_counter, and export the value upon a fireuser1 to target logic_case - invalue -(override of current counter value). This last part is where I am stuck, I know there are tricks like !self, but is there a way to referance the value inside the counter in it's output?
Any help would be apreciated.

-Yaba
 
Mar 23, 2013
1,013
347
but is there a way to referance the value inside the counter in it's output?

When a math_counter recieves a GetValue input it will fire the OnGetValue Output and will put it's current value into the parameters.


So if you want three different things to happen depending on controll point state, make a logic_case with three cases

The math counter counts to three, and if red caps set it to 1, if blue caps set it to 2 and by default the counter is 0.

Give the counter this output: OnGetValue - logic_case's name - InValue - [parameter is automaticly generated! So don't add one]

Now when you manually give the math_counter the GetValue input, it will depending on what the counter is set on, trigger the specifc case of the logic_case because the OnGetValue output uses the current count as parameter


Is this what you are looking for? Hope it helps.
 

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
Thank you! I didn't realize the parameter was automatically generated. Now looking back the in hammer help menu makes much more sense.