Logic_compare SetValue and SetCompareValue problem

Any aspects of level design for the Source engine.

Logic_compare SetValue and SetCompareValue problem

Postby xerox8521 on Sun Aug 10, 2014 12:52 pm

Hello,

so i have 2 math_counters which adds +1 if a certain entity enters a trigger (there are 2 triggers). So after lets say 5 min i want to compare the current values the math_counters hold and do actions based on the result of it.

math_counter name: m_counter_b
math_counter name: m_counter_a

if entity hits trigger A it adds +1 to m_counter_a and if it hits trigger B it adds +1 to m_counter_b. So how do i get these values which m_counter_a and m_counter_b have to set them via the Input from a logic_compare.
xerox8521
Dumpling
Dumpling
 
Joined: Sun Aug 10, 2014 12:40 pm

Re: Logic_compare SetValue and SetCompareValue problem

Postby LordDz on Sun Aug 10, 2014 1:39 pm

I did something similar on a map I did a few years ago, but it's something like this:

On each math_counter, add the output called OutValue
"Fired when the counter value changes."

Target your logic_compare and use the input SetValue for the math_a and SetCompareValue for math_b.
(Don't mix it up with SetValueCompare), also don't add anything to the parameter override.

Add the OnLessThan and OnGreaterThan outputs to your logic_compare, have them trigger a relay that gives a birthday cake to the winning team.
Then simply have a logic_relay or something trigger your logic_compare with the Compare input after 300 seconds.
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Logic_compare SetValue and SetCompareValue problem

Postby xerox8521 on Mon Aug 11, 2014 8:25 pm

Thanks
xerox8521
Dumpling
Dumpling
 
Joined: Sun Aug 10, 2014 12:40 pm

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users