Keep picking repeated numbers though without repetition method has been integrated

I have no idea why my game keep picking the repeated numbers although i already integrated GSHelper's without repetition method .

Here's some information :
http://i59.tinypic.com/ncmvck.png - what I've put in my random pick number without repetition actor

http://i61.tinypic.com/2qxnez9.png - what the attribute is ( information )

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited October 2015

    You're picking a random row and immediately deleting that row from the table. This is not the correct method.

    You need two separate attributes: one for the row number that is chosen randomly and one for the value that corresponds with that row. The algorithm should be:

    1. Change game.randomRow to random(1,tableRowCount(tableName))
    2. Change game.randomValue to tableCellValue(tableName,game.randomRow,1)
    3. Remove table row at index game.randomRow

    That way you are storing the value from the row before you delete the row (to prevent repetitions).

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

  • EpicoreGamesEpicoreGames Member Posts: 188

    Thanks man ! You saved my life ! Have a great day !

Sign In or Register to comment.