Table data check
mconyers
Member Posts: 1
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
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
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.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
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.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX So right, Bray. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps