![]() ![]() Step 8: From the “Control” block in the block palette, select the ‘if ( ) then’ block, drag it to the coding area, and place it inside the ‘forever’ block.Step 7: Go to the “Control” block in the block palette, select the ‘forever’ block, drag it to the coding area, and place it under the ‘switch backdrop to ( )’ block.Step 6: In the ‘switch backdrop to ( )’ block, select the vale as ‘backdrop 1’ from the drop-down menu.Step 5: Go to the “Looks” block in the block palette, select the ‘switch backdrop to ( )’ block, drag it to the coding area, and place it under the ‘go to x: ( ) y: ( )’ block.Step 4: From the “Motion” block in the block palette, select the ‘go to x: ( ) y: ( )’ block, drag it to the coding area, and place it under the ‘point in direction ( )’ block.In the ‘point in direction ( )’ block, leave the values as ‘90’. Step 3: Go to the “Motion” block in the block palette, select the ‘point in direction ( )’ block, drag it to the coding area, and place it under the ‘show’ block.Step 2: Go to the “Looks” block in the block palette, select the ‘show’ block, drag it to the coding area, and place it under the ‘when green flag clicked’ block.Step 1: Go to the “Events” block in the block palette, select the ‘when green flag clicked’ block, and drag it to the coding area.Make sure that the square-shaped sprite is selected while coding for it. It’s time for coding by fixing the player’s (square-shaped sprite) position at the beginning and whenever the user presses the ‘space’ key, the player must jump to avoid the triangular spikes. So, first, switch to the ‘Code’ section, then go to the “Variables” block in the block palette and create a variable named ‘score’.Ĭode for the player’s position and to make the player jump Step 10: After drawing the backdrops and sprites, it’s time to make a variable to keep the score of the game.Keep in mind to draw three different costumes for the triangle spike as shown below. Step 9: After drawing the square-shaped player sprite, it’s time to draw the triangle spike. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |