Change actor when touch
wolala123
Member Posts: 249
I have actor A, B and C. How do i change it start from A to B to C and go back to A and to B and to C repeatedly when touch?
Comments
Make an "Actor" integer attribute that says,
When touch is pressed change "Actor" attribute to Actor (Attribute+1)%3
0 = A
1 = B
2 = C
It depends on whether you need to change the image, the image and the rules, or the image+rules+a bunch of self attributes. But as @RabitParrot says, the easiest way is to set an integer attribute and change it when needed. Then have separate rules for each possible value of that attribute.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User