Reset Global Counter

Discussion in 'BBNodes' started by menanche, Dec 3, 2019.

  1. menanche

    menanche Boxer

    Joined:
    Nov 1, 2018
    Messages:
    57
    Likes Received:
    21
    Global Counter Node always stores value. When the user suddenly quits the game and then returns after a while, a new level is loaded, but the value is still there. That can create a lot of problems .. so here's the solution.

    https://drive.google.com/open?id=1cZ4O5GNblbkBLfOUWlBidtxjAf9aZYOA

    Just transfer this 'reset global counter node' to your character .. and connect it to the start node. Now every time the levels are loaded the global counter will be set to 0.
     
    Last edited: Dec 4, 2019
    itzonator and Jackazoid like this.
  2. Jackazoid

    Jackazoid Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    120
    Likes Received:
    47
    Thanks for this.
    I take it that if you use (lets say) 5 counters in your character or object you should connect 5 resets with the appropriate globacounterID?

    And can it be used as a reset in a game? For example if collide --> reset?
     
  3. menanche

    menanche Boxer

    Joined:
    Nov 1, 2018
    Messages:
    57
    Likes Received:
    21
    In GlobalCounterId goes the name of the Counter we want to reset. The Counter name is located in that 'Global Counter node' called Identification.
    So the answer to your question is 'yes', you need to connect 5 reset nodes or call each counter by the same name if they are doing the same job.
    Yes the reset node can be activated by any input, if colide, timer etc.
     
    Jackazoid likes this.
  4. Jackazoid

    Jackazoid Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    120
    Likes Received:
    47
    menanche Do you think it's possible with BB3 to make target -1 work with Global Counter? -1 just counts 1 so its useless if you want to subtract. Tnx
     
  5. menanche

    menanche Boxer

    Joined:
    Nov 1, 2018
    Messages:
    57
    Likes Received:
    21
    Maybe. Now I don't have time for such experimentation. I'm setting up a game for testing with voodoo. Maybe I'll check later.
     
    Last edited: Dec 9, 2019
  6. Jackazoid

    Jackazoid Avid Boxer

    Joined:
    Sep 7, 2017
    Messages:
    120
    Likes Received:
    47
    Ok. Good luck with testing.
     
  7. menanche

    menanche Boxer

    Joined:
    Nov 1, 2018
    Messages:
    57
    Likes Received:
    21
    Thanks.
     

Share This Page