Sprites interacting with other sprites
When making your story, there is a good chance you will want to get movement on the stage so your story is a bit more exciting. This recipe focuses on how to have sprites react when they are touching or moving around other sprites.
Getting ready
For this recipe, we're going to continue working with the story we built in our previous recipes of this chapter. Our goal for this recipe is to get Frog to move across the screen and react to Monkey Mike when they touch.
How to do it...
We're going to bring back some scripting from our first chapter to get the job done. Let's get started:
To begin the movement of Frog, the user will have to click on the sprite. We'll need to provide directions to the user in order to accomplish this. At the end of Frog's dialogue (from before), add another say block and give it the text
Click
me
to
get
me
moving
.Now we'll introduce a new top hat block. This is the when this sprite clicked block, located under the Events blocks category...