Table data check
Hi,
I'm creating a math game and need to be able to check the player's total against a list of numbers I've put in a table. Anybody know how can I do this?
Thanks
I'm creating a math game and need to be able to check the player's total against a list of numbers I've put in a table. Anybody know how can I do this?
Thanks
Answers
Hi @mconyers and welcome to GameSalad and the Forums.
Do you want to cycle through all rows to compare with the player's total, or compare with the highest number in the Table, or something different again?
Edit: writing while @Braydon_SFX was posting.
OK, one way would be to create a loop for it to compare each row (make it an integer if you want to start the process off rather than it starting automatically):
Rule: When Loop is 1
When RowCount < tableRowCount(YourTable)
Change Attribute RowCount to Row+1
When playerTotal = tableCellValue(YourTable,RowCount,1)
---whatever you want to do with this info
Change Attribute Loop to 2
Rule: When Loop is 2
Change Attribute Loop to 1
-----
hope that helps.
@Braydon_SFX So right, Bray. :-)