![]() So I added a random block to the X position.“An enchanting fantasy about the life of a young water sprite growing up in the cool green world of the mill pond. I only want my apples to fall from different X positions on the screen (across ways), rather than from different heights. ![]() Our forever block now looks like: Make our Apple Fall from Different PlacesĪt the moment our apple always falls from the same position in the sky, we can add a random block into the ‘go to X Y’ block. We need to test our apple to see if it is touching a fireball object, we can use an if block for a test. On our fireball, we are going to set this to zero when the game starts: To keep score we are going to need to use a variable, let’s call it score. Make the fireball hidden at the start of the game. When the clone starts up, we want to point it towards the mouse position and move it until it hits the edge of the screen at that point we want to delete the clone. We must first move the sprite to where the witch is on the screen, then create a clone of the fireball sprite: We can have our witch shoot a fireball by cloning the fireball sprite and moving it towards the mouse position. Use a negative number for the y position to make it move down. We always want our apple to be falling, so we need to use a forever block: Since the Y axis is for up and down we will use some change Y blocks to make the apple fall. We are going drag the apple to the top of the screen on the right hand side where we want it to fall from. We might notice that the clouds are in front of the witch, we can also bring her to the front of the screen when our game starts. We use a negative number to make the witch go down. We know that the Y axis is for up and down, this means that we can add some change Y blocks onto our keyboard event hat blocks: We want our witch to move up and down using the arrow keys. We can change the speed of the clouds by changing the number of seconds the glide block takes to move across the screen. We also want the clouds to be a little transparent, in scratch this is the ghost effect: Then we move the clouds to the other side of the screen and drag up our glide block: Move the ‘go to x and y’ block into our forever loop: We first move the clouds to the point on the screen where we want them to fly from. We always want the clouds to be moving, if we always want something to happen, we will use a forever loop. We are going to use the glide block to make the clouds move across the screen. We can add our witch, fireball and the object that falls from the sky. Draw a new sprite and use the circle fill tool to make some join circles that will look like a cloud. We will need to create our own sprite for the moving clouds. The background should look like the witch is flying. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |