Slide and animate problem
RAWRafa
Member Posts: 4
Could anyone give me a light at this?
Here's the problem, I have two actors, first one is a slider and the second one is a smile. I have 22 different frames for the smile, and I wanna know how to animate it when the slider goes left/right.
Here's the problem, I have two actors, first one is a slider and the second one is a smile. I have 22 different frames for the smile, and I wanna know how to animate it when the slider goes left/right.
Comments
Files:
"smile0.png"..."smile12.png"
Expression:
Constrain Attribute: self.Image = "smile"..game.imageState..".png"
Slider Expression:
Constrain Attribute: game.imageState = max(0,min(12,floor(self.Position.X/30)))
This expression might need to be tweaked depending on where the slider starts and how far it goes.