Counter Problems

Discussion in 'Mapping Questions & Discussion' started by UltimentM, Jun 28, 2015.

  1. UltimentM

    UltimentM L1: Registered

    Messages:
    31
    Positive Ratings:
    15
    I need some help with the maths counters. I have two of them (each of them count from 0-7) and I want something to happen when one of them reaches 4 or more, but stops when it goes back down to 3. Is there any way to do that? Also, how do you reset a counter at the end of a round?
     
  2. Vincent

    aa Vincent 🔨 Grandmaster Lizard Wizard Jedi 🔨

    Messages:
    914
    Positive Ratings:
    580
    logic_compare like Henke said; I wasn't aware that existed.

    Also if you set up your gamemode correctly and you can actually round win then all your entities should refresh on a new round automatically. Side note using OnMultiNewMap with logic_auto's is a good idea if you want something to happen only on map spawn and not when a new round starts.
     
    Last edited: Jun 28, 2015
  3. henke37

    aa henke37

    Messages:
    1,909
    Positive Ratings:
    446
    Use a logic_compare and that's it. No need to mess around with the max and min of the counters.
     
    • Thanks Thanks x 1
  4. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    You can make your math_counter send its value to a logic_case each time it's updated. Simply give it the output OutValue, pointing to the logic_case, and leave the parameter field blank.

    In the properties of the logic_case, enter the triggering numbers in each Value field.
    E.G.
    Then simply specify the outputs that should be performed upon each case, in the logic_case's outputs tab.

    If the logic_case is sent a number that it doesn't have a case for (0, 1, 2, 5, 6 and 7), it won't fire any outputs.
     
  5. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Before I attempt and describe a solution, let me check I have the desire correct:

    You want something to become enabled when either is >= 4 and disabled when both are <4?