How to make a rule based on table cell value?

zellhuangzellhuang Member, PRO Posts: 79
Hello GSers!
I have checked the Cookbook and search through the community, but still no luck to find a method to make a rule based on table cell value :(
What I want is a rule in which the triggering condition is attribute and this attribute should be a table cell value.
I know how to insert a table cell value into the right hand side in the triggering condition. But I can't find a way to insert a cell value into the left hand side condition.I think the left hand side ones could only be attributes that in scene attributes or actor attributes or golbal attributes.
So, untill now, I have only figured out one method to make it:
First, create some attributes( real or integer) in actor or scene. Then create a rule to copy the value from table cell to the attribute I created just now.Finally, set up a rule which triggering condition is when this attribute ...
I think this method won't save workload and I still need to create attributes in actor or scene. You know, too much attributes would make the memory usage of game engine too high.So, I want as less attributes as I can. If anybody know how to make the triggering attribute based on table cell value, please don't hesitate to tell me.I'd appreciate of your help!
Thx in advance!

BTW, my English sucks, forgive that!

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Here is another way to do that. If it is a numerical cell value from the tables, make a game attribute, (I call mine game.ConstantZero) and use that as the left hand side of the rule condition. Then on the right side, use the expression editor to reference your table cell and subtract/add what you need from that table cell value.
  • zellhuangzellhuang Member, PRO Posts: 79
    thx for your help @CodeMonkey
    your method does work, but it still need a global attributes. I want to a method without global attribute.
  • SlowboySlowboy Member, PRO Posts: 329
    Thanks for that! Been twisting my melon for half an hour!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    version 11 will allow you to reference table values directly in a rule
  • ImNiklasImNiklas Member Posts: 103

    @jonmulcahy said:
    version 11 will allow you to reference table values directly in a rule

    Do you know when it will be availibe for windows (stable or not)?

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @ImNiklas said:
    Do you know when it will be availibe for windows (stable or not)?

    Version 11 RC2 is out now. The final release of 11 is due next week baring any unseen errors.

  • ImNiklasImNiklas Member Posts: 103
    edited March 2014

    @jonmulcahy said:
    Version 11 RC2 is out now. The final release of 11 is due next week baring any unseen errors.

    Yes, but when is it coming for windows?

Sign In or Register to comment.