how to use a table value in a rule

hi guys
ive got an integer in a table and i want to have a rule that accesses that value....i tried using a self attribute that changes value right to the table cell value before the rule but its not working....

thanks
Dan

Best Answer

  • TheGabfatherTheGabfather Posts: 633
    Accepted Answer
    @danshaw Yes, it's exactly how you said it :) tableCellValue, which is a Function, is only available in the right-hand-side field, which is the Expression editor.

Answers

  • TheGabfatherTheGabfather Member Posts: 633
    What does your current Rule look like?
  • danshawdanshaw Member Posts: 38
    its a fairly simple rule that says "if self.attribute.x < 3 and actor recieved touch"

    where change attribute is used to change self.attribute.x to the value in the table right before this rule...

    thanks
    Dan
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    change the rule around. set self.Attribute to 3 and have it in reverse

    if self.Attribute > tableCellValue(TBL,Row,Col) AND ...
  • danshawdanshaw Member Posts: 38
    thanks but can you use the table value in a rule like that? i dont have my GS available right now to check but i thought the table values couldt be used in rules...could it be that they just cant be used in the 1st box but can in the second?

    thanks
  • danshawdanshaw Member Posts: 38
    great thanks...that should solve the problem...
Sign In or Register to comment.