Use an actor attribute to represent a number 1 through 4. When touch is pressed, Change Attribute: ---self.Counter = mod(self.Counter,4)+1 ---Change Attribute: self.Image = [something based on the self.Counter]
now that [something based on the self.Counter] could be the value from a table using the Counter as the row value, or if you name all your images with the same pattern (image1, image2,image3,image4) you could make it "image"..self.Counter
@CodeMonkey..What if i have 3 same actor in the scene, i touch one of the actor to change image but other two actor i want remain current image?i use above method or else?.thx
With all the rearranging of various plans, and the whole Lua-drop™ vs Lets–make-Lua-scary-fast™ thing, is the plan still to move from '%' to 'mod' . . . . and should we be adapting it now ?
Comments
When touch us pressed:
--change image to (click the drop down menu and select your image)
---end rule
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
When touch is pressed, Change Attribute:
---self.Counter = mod(self.Counter,4)+1
---Change Attribute: self.Image = [something based on the self.Counter]
now that [something based on the self.Counter] could be the value from a table using the Counter as the row value, or if you name all your images with the same pattern (image1, image2,image3,image4) you could make it "image"..self.Counter
Re: mod v %
With all the rearranging of various plans, and the whole Lua-drop™ vs Lets–make-Lua-scary-fast™ thing, is the plan still to move from '%' to 'mod' . . . . and should we be adapting it now ?