Math_counter help

Discussion in 'Mapping Questions & Discussion' started by That's the plan, Feb 27, 2019.

  1. That's the plan

    That's the plan L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    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.
     
  2. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,290
    Positive Ratings:
    858
    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.
     
    • Thanks Thanks x 1
  3. The ImprovisE!

    The ImprovisE! L1: Registered

    Messages:
    17
    Positive Ratings:
    6
    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
     
    • Thanks Thanks x 1
  4. That's the plan

    That's the plan L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    Like this? (Sorry about my horrible editing skills, I don't even know how to use Ms paint properly)
     

    Attached Files:

  5. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,290
    Positive Ratings:
    858
    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.
     
    • Thanks Thanks x 1
  6. That's the plan

    That's the plan L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    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)
     
  7. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,290
    Positive Ratings:
    858
    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.
     
    • Thanks Thanks x 1