Help with animation


#1

So I'm just making a simple throwing animation for pokemon but something is wrong. I have 3 frames right now so I'll show you the frames.

Here is my code right now : https://c.gethopscotch.com/p/y7lj42dsi

How I tried it

I set a value called frame and decided to use it to got through the frames. So for the first frame I used the value as

When frame = 0
Set size 800
Wait 50
Invis 100
Increase Frame by 1

I then set the second frame like this

When Game starts
Invis 100
Set size 800

When Frame = 1
Set x and y position of Image 1 (first frame)
Invis 0
Wait 50
Invis 100
Increase Frame by 1

Then the third is the same as the second but it doesn't show up :/

Tbh I'm stuck


#2

Ok, I found your bug! :D

So, when the game starts, Frame is 0.
Then, when Frame = 0, the first frame is called, and increases Frame by 1.
When Frame = 1, the second frame is called, and increases Frame by 1.
However, the next when is when Frame = 3. At this point, Frame only equals 2, so the third frame is not called.

You either need to change the last when to when Frame = 2, or set value Frame to 1 at the very beginning (and change the other whens as well)!