Computer Science, asked by bhoomiwadhwani9, 4 months ago

10. How do I control my sprite with keyboard key ?
(a) keep pressing keys
(b) use motion block “move # steps"
(C) use "when <some> key pressed" events block
(d) click green flag​

Answers

Answered by Rameshjangid
0

Answer:

keep pressing keys

Explanation:

Step 1: Establish two key-press events.

In order to have the sprite move both left and right, add two "change x by" blocks.

Step 2:  To make the sprite move more fluidly, add two "repeat until" blocks.

Make a condition that causes the sprite to move until the key is not pressed for every "repeat until" block.

Step 3: By adjusting the x or y value of a forever loop block, the sprite can be made to move continuously across the stage or up and down.

The if on edge bounce block can be helpful in preventing the sprite from vanishing off the edge of the stage.

Step 4: The rotation style in the Sprite information box might need to be changed to ensure that the sprite orientation is accurate when it bounces off the edge.

Learn more about visit:

https://brainly.in/question/47870078?referrer=searchResults

https://brainly.in/question/25400600?referrer=searchResults

#SPJ1

Similar questions