Changing Attributes in Loop
pokapola
Member Posts: 143
Is it possible to change Attributes in a Loop, similar to changing TableCellValue in Loop?
Let's say I have Attributes called Score1, Score2, Score3...Score10. And another attributes called NoOfScores.
Change Attribute : NoOfScores to 1
Loop While NoOfScore <= 10
Change Attribute : Score..NoOfScore to Some Values.
Change Attribute : NoOfScores to NoOfScores+1
Would combining two Attributes work in GS? (Score..NoOfScores = Score1?)
Comments
Yes, you can certainly change an attribute inside of a loop (try it!).
No, you can't reference an attribute's name by using an expression (e.g. Score.._NoOfScore). That would require storing the values in a table -- one in each row --- and then increasing the row by one in a Loop over Table behavior.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you @tatiang!