Discuss Scratch

LB102710
Scratcher
12 posts

Using Motion Blocks To Make a Small Animation for a Sprite.

So, if you're here then, you must want to do some small animations for some sprites. Well, for this, we are going to use motion blocks! Motion blocks are much more useful than you might expect. You might be wondering how? Well, they could be used to move things around, used for some camera effects (which I'll go over some other time), and best of all; ANIMATION. Anyways, let's get started.
So for now, we are going to do a simple title effect. If you want your title to be somewhat animated, for example, you want your title to start in the middle of the screen, then make its way up, then you just need to follow these steps! Here we go:
Step 1: Go to the sprites tab, and click the paintbrush button, or download a title.
Step 2: Customize your title however you like it.
Step 3: Go to the position tab (x,y) and set it to what you want it to be (I prefer x and y being 0 to make it easier)
Step 4: If you haven't yet, then go to the costumes tab and place your title in the middle of the screen
Step 5 is where the code begins. I'm going to use an example of when the green flag is clicked, but if you have anything before the title showing, I suggest putting the code for after you receive a certain message. Anyways, here we go again.
Step 5: Copy this code
when green flag clicked
go to x: (0) y: (0)
wait (0.5) secs
glide (0.5) secs to x: (0) y: (200)
And there you go! Test this by pressing the green flag and watch your animation play. Note that the wait block is not needed, I just include it because I like to wait some time and then do the animation. Anyways, I plan on making some more post on the forums, but until then, goodbye everyone!

Last edited by LB102710 (April 27, 2024 00:49:22)

Powered by DjangoBB