Random Question:how to not always repeated the same numbers?

venon_itvenon_it Member, PRO Posts: 594
edited November -1 in Working with GS (Mac)
Hi,
in my new application you shake iphone and change image....but sometimes show the same image... the random number sometimes is the same! how to not always repeated the same numbers?

thanks

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    You need attributes: game.randnumber, and game.prevrandnumber
    Code: change game.prevrandnumber to game.randnumber
    When (your shake function) change game.randnumber to random(X,X)
    if game.randnumber = game.prevrandnumber then change game.randnumber to random(X,X)
    Otherwise; change image to XXXXXXX
    I think this is what you need, I hope it works
    ~CTM
Sign In or Register to comment.