"NEW!" - Having trouble finding a way to incorporate this after beating highscore

AngryBoiAngryBoi Member Posts: 586

I can't seems find a way to put this in my game... When the user beats the highscore, when he dies, I want there to be a "NEW!" text showing... but nothing I try works. Any Ideas?

Comments

  • AngryBoiAngryBoi Member Posts: 586

    Has anyone ever done something like this in any of your games?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Would a rule like this work?

    When
    Att. game over = true
    AND
    Score > HighScore

    Display Text: "New!"

  • SocksSocks London, UK.Member Posts: 12,822

    @TappWater said:
    When the user beats the highscore . . I want there to be a "NEW!" text showing

    Rule when the user beats the highscore . . show "NEW!" text.

  • AngryBoiAngryBoi Member Posts: 586

    @As Of Latte @socks sorry guys. It's not that simple. I have it so when the score is greater than the high score, the score becomes the high. So the score will never be greater and the text will never stay appeared .

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited May 2015

    @TappWater

    Rule in your "New!" actor if Score ≥ HighScore + game over = true, change position X to for e.g. 512 and in the otherwise section do a "change self position x to -100"

    You could also simply change the alpha from 0 to 1 if the conditions are met instead of moving it on and off the scene.

  • DuesDues Member Posts: 1,159

    @TappWater said:
    @As Of Latte socks sorry guys. It's not that simple. I have it so when the score is greater than the high score, the score becomes the high. So the score will never be greater and the text will never stay appeared .

    That means you have a rule that probably says:
    When attribute game.score > game.higscore change attribute game.highscore to game.score. Put your display text in that rule and you are all set.

  • UtopianGamesUtopianGames Member Posts: 5,692

    @Dues I "think" he wants it to only display when the hero dies.

  • DuesDues Member Posts: 1,159

    @DeepBlueApps Aahh Didnt see that, and also that you posted before me :)

  • ookami007ookami007 Member Posts: 581

    @TappWater Create an attribute called newHighScore and set to false

    In your routine that changes the high score to the current score when it exceeds the high score, change the newHighScore to true, this way you can keep track of whether the high score has changed.

    From that point, you will need to know when the player dies and display the NEW message however you wish.

    I've created a quick demo of how it might work. Move Left and Right using the A/D keys and touch the slime to die.

    The high score is set at 100 so move right first, get the gold coin and die and you will see the high score doesn't change and no message is displayed.

    Next time, go left first and get those coins and then kill yourself and you will see the NEW message.

    https://dropbox.com/s/5b47u94ps263mpp/New%20High%20Score%20Demo.zip?dl=0

  • AngryBoiAngryBoi Member Posts: 586

    @DeepBlueApps it doesn't work like this, if the player ties the highscore, it will show "new" which I don't want

  • AngryBoiAngryBoi Member Posts: 586

    @ookami007 thanks. Will try when I get home

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited May 2015

    I see no problem, try the above demo and if that doesn't work I will make you one that does.

  • AngryBoiAngryBoi Member Posts: 586

    Thanks @ookami007 . Worked

Sign In or Register to comment.