Change an object randomly
seymour
Member Posts: 56
is there a way to have one actor and have it change to a many different images randomly each time you touch it
Comments
Rule: on touch, change attribute [changeimage] to random(1,10)
Rule: if [changeimage]=1, change image to 1.jpg.
Rule: if [changeimage]=2, change image to 2.jpg.
And so forth - I think you probably get the idea. There may be an easier way, but this at least should work.
"imagefilename_"..random(1,10)..".png"