Math_counter help

That's the plan

L4: Comfortable Member
Jul 8, 2018
183
38
Is it possible to set a math_counter entity to reset itself when it hits a specific number that isn't its minimum or maximum value? Because so far I can't really figure out how to within the entity's outputs, and its starting to really frustrate me. Any help would be greatly appreciated.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
In the math_counter, fire the OutValue input into a logic_case entity where the Case 01 value is set to whatever value you want to reset the math_counter. In the logic_case, fire OnCase01 to set the math_counter's value to the default.
 

The ImprovisE!

L1: Registered
Dec 13, 2016
17
8
I think you can use logic_case to input each time a number changes and make it reset on whichever case you want.
If that doesn't work you can use logic_compare to compare each time a number is changed and when numbers match it fires the appropriate output or resets clock - in your case.

Edit:Got ninja'd
 

That's the plan

L4: Comfortable Member
Jul 8, 2018
183
38
In the math_counter, fire the OutValue input into a logic_case entity where the Case 01 value is set to whatever value you want to reset the math_counter. In the logic_case, fire OnCase01 to set the math_counter's value to the default.
Like this? (Sorry about my horrible editing skills, I don't even know how to use Ms paint properly)
 

Attachments

  • coolstuff.png
    coolstuff.png
    24.5 KB · Views: 200

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Like this? (Sorry about my horrible editing skills, I don't even know how to use Ms paint properly)
Just like that. Then add the value you want to reset on as the Case 01 value in the logic_case, and add the OnCase01 to set the value of the math_counter. You can have multiple reset values by adding them in the other case values and adding the appropriate outputs for those cases too.
 

That's the plan

L4: Comfortable Member
Jul 8, 2018
183
38
Just like that. Then add the value you want to reset on as the Case 01 value in the logic_case, and add the OnCase01 to set the value of the math_counter. You can have multiple reset values by adding them in the other case values and adding the appropriate outputs for those cases too.
Just to be sure, essentially what this does is it means the case_logic shares the same value as the math_counter, so it updates in real time. Correct? (I just want to be sure of myself, thanks so much for all the help so far)
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Just to be sure, essentially what this does is it means the case_logic shares the same value as the math_counter, so it updates in real time. Correct? (I just want to be sure of myself, thanks so much for all the help so far)
Close. What it means is that the math_counter will send its value to the logic_case every time the counter's value is changed by anything. The logic_case will then compare the counter's value to its case values. If the counter's value matches any of the case values, the logic_case will fire the corresponding output. In this case, we want the output fired by the logic_case to tell the math_counter to change its value back to the default value.