Compare Score over Time?

0 favourites
  • 3 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • I have the score updating as a text string fine, but I'd also like to add another score indicator that compares the score to the previous tick's score. So if the score goes down from the previous tick, a frown face appears. If the score goes up from the previous tick, a happy face appears.

    Is there a type of "pick nth instance" for a time-based variable (instead of just objects) for this type of comparison?

    Thanks!

    Norm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use another variable.

    Consider two globals : Score and oldScore

    On start of the tick (so on top of your event sheet) set the value of oldScore to the value of Score.

    Then during the event sheet, there may or may not be changes to Score's value.

    At the bottom of the event sheet have events

    OldScore < (less than) Score => Show Happy face

    OldScore > Score => Show Frown face

  • Much Thanks! I had played around with two globals, but forgot to take into enough account the hierarchy of the event sheet. By moving the global comparisons lower in the sheet like you suggested, and adding a delay ("wait") of 1.5 seconds to accommodate the rapid scoring events that call up the positive indicator, I got exactly what I wanted.

    Thanks again!

    Norm

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