How do I make a counter

0 favourites
  • 7 posts
From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • What i have is coins, Gold and Silver. What i want is to touch one Gold coin, add 1 to the counter, touch 10 or so Silver coins, add one to the counter.

    What i have is :

    Player, on collision with GoldCoin: System, Add 1 To CoinCollect (Global Variable)

    GoldCoin, Destroy

    Text, Set text to round(CoinCollect) <--this works correctly

    Player, on collision with SilverCoin: System, Add 1 To SilverCoin (Global Variable)

    SilverCoin, Destroy

    System, SilverCoin=10: System, Add 1 to CoinCollect (Global Variable) <--Figured this was my anwser but it wont add correct if i grab silver coins, it does like a hundred, but if i grab gold coins first, they add normal, but never add the 10=1 count.

    my global variables are CoinCollect and SilverCoin =0 (Global number)

    any help would be awesome

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • make the silver coins add .1, and use floor(coincollect) instead of round for your text so it won't show partial coins.

    No silvercoin variable necessary.

    That's what I would do...

  • Thank you will try

  • Nope still doing the same,

  • Here is my little project,

  • silver coin > 10 will add 1 every tick while that is true. you don't want that at all.

    you're also only updating the counter on collision with gold coins.

  • Player, on collision with SilverCoin:

    System, add 0.1 to CoinCollect

    SilerCoin, Destroy

    Text, Set Text to floor,(CoinCollect)

    You was correct, I didn't need the SilverCoin Variable .

    Thanks a lot

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)