Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Randomizing the death screen[email protected] Posts: 77Member, PRO

In my endless runner, I have a screen that appears (image) when the user dies. I want it to have a random taunt and play again button. I want to have like 20 taunts and so it randomizes which one appears. Same screen, but different words/taunts. Is there a way I can do this? It doesn't really give me much information when I click into the game over screen as you can see in image so...
Any Ideas?


  • tatiangtatiang Posts: 11,766Member, Sous Chef, PRO, Senior Sous-Chef
    edited April 2014

    The easiest way to do this is to number your images, for example:

    taunt1.png taunt2.png taunt3.png ... taunt20.png

    And then have a rule that changes the attribute self.Image to "taunt"..random(1,20).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.