How do I specify a table cell value in the 'if' part of a rule?
SLOCM3Z
Member Posts: 797
Hello,
I wanted to know how to specify the table value in the 'if' part of a rule in Windows. So where you would put 'if game.attribute = 1'. How would I do this? All I can do right now is 'if game.Table = 1'
Thanks
Comments
I believe table to table expressions is in the latest stable build on Windows. Have you updated?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Yes I have updated. How would I do that table to table expression?
For Windows Creator, in a Rule you can select 'Numeric Expression' or 'String Expression' for the Rule Conditions. (depends on what type of data you want to compare)
Then you'll have expression editor access on the left and right on the condition.
https://help.gamesalad.com/hc/en-us/articles/202044496-2-6-Tables
Specifically you can use the tableCellValue([table],[row],[col]) function to get a specific table cell value.
tableCellValue (Function): Returns the value of a cell of a selected table at a certain row and column. Tables are numbered starting at 1. You can also use the row or column name as an input for this function.
For example, tableCellValue(game.Data,1,15) will return the value in table, Data, at row 1 and column 15.