"NEW!" - Having trouble finding a way to incorporate this after beating highscore
AngryBoi
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
Has anyone ever done something like this in any of your games?
Would a rule like this work?
When
Att. game over = true
AND
Score > HighScore
Display Text: "New!"
Rule when the user beats the highscore . . show "NEW!" text.
@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 .
@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.
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.
@Dues I "think" he wants it to only display when the hero dies.
@DeepBlueApps Aahh Didnt see that, and also that you posted before me
@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
@DeepBlueApps it doesn't work like this, if the player ties the highscore, it will show "new" which I don't want
@ookami007 thanks. Will try when I get home
I see no problem, try the above demo and if that doesn't work I will make you one that does.
Thanks @ookami007 . Worked