How do I specify a table cell value in the 'if' part of a rule?

SLOCM3ZSLOCM3Z 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

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    I believe table to table expressions is in the latest stable build on Windows. Have you updated?

  • SLOCM3ZSLOCM3Z Member Posts: 797

    @Braydon_SFX said:
    I believe table to table expressions is in the latest stable build on Windows. Have you updated?

    Yes I have updated. How would I do that table to table expression?

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803

    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.

Sign In or Register to comment.