change of frame in the animation

Get help using Construct 2

Post » Thu Feb 07, 2013 12:09 pm

Hi all, I'm trying to make a change through a frame animation. The idea of the code but I have not done well in as contstruct 2. The code that I would use would be the siguiete:

button is clicked
corrent frame of (sprite)<4
(sprite) force animation frame to image(sprite)+1
https://www.dropbox.com/s/iq9y02wyvjulksr/change%20frame.capx
thanks
B
6
Posts: 40
Reputation: 1,005

Post » Thu Feb 07, 2013 12:32 pm

Is this what you want to do?

On (X) Button Pressed        (Trigger event)
    If Animation Frame < 4   (Event)
        Set Animation Frame to Sprite.AnimationFrame + 1    (Action)
B
22
S
6
G
1
Posts: 398
Reputation: 3,384

Post » Thu Feb 07, 2013 2:47 pm

just what I do is that when you press a button, change of frame. When you reach the last frame should start with the first. I used the sprite for wallpaper and inside the sprite I created four frames, 0,1,2,3 with one color each. I want something simple but not because they do not know how to construct 2.

thanks for everything
B
6
Posts: 40
Reputation: 1,005


Return to How do I....?

Who is online

Users browsing this forum: jeffige and 18 guests