How to Call Multiple Values from a Table Row?
galasea
Member Posts: 17
Hello! Is there a way to create a rule that will check the value in a table cell, and if the cell value is not equal to zero, move on to the next column over until it reaches a cell that does contain a zero, then stop?
Comments
Change Attribute self.cellValue [integer or index] to tableCellValue(tableName,row,column)
When [attribute] self.cellValue = 0 --> stop the loop (in my example, you could change self.Counter to a large number or you could create your own boolean for this and add it as another condition of the loop rule).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
This is basically what I did:
Rule: When mouse is pressed and inside, change attribute self.Trigger to true
Rule: When attribute self.Trigger is true
Rule 1 of Loop (self.Time > self.LoopIntervalTime)
Rule 2 of Loop (self.IterationComplete is true)
If you'd like, you can send me a link to download your project file and I'll see if I can identify a problem.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
when self.mod1 > self.time%0.05
.....action
self.mod1 is a real attribute with a value such as 0.04.
You can then wrap that in a When self.trigger is true rule.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I would suggest using the Mod1 Loop. It works fine with self.Trigger=true.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User