ROBOTIC
TUTORIALS.COM

Popular Tutorial

Click on the image interested  to know what they are, how to do them and more...
Scroll down to check out to specific topic of tutorials on Electronics and Robotics.
Archery using scratch2 programming
1

Items Required

1. A computer capable of running Scratch
2. Scratch 2
3. The starter project can be found in this link Starter Project

2

What new will you learn?

1. use animations 
2. use random numbers 
3

Procedure


Aiming arrows


1. Open the starter project this link, Starter Project
2. In the starter project, you can see this target backdrop and a cross hair sprite



Step 1:
When your game starts, broadcast a message to shoot a new arrow. 



Step 2:
once this message has been revived, set the arrow's position and size.



Step 3:
Click the green flag to test your game. you will see your arrow getting bigger and moving to the bottom - left of the stage. 



Step 4:
Add coder to your arrow that it glides randomly around the stage forever 



Step 5: 
Test your game again, and you should see your arrow move randomly around the stage. 



Shooting arrows

Let'
s code your arrow to shoot when the space bar is pressed. 

Step 1:
stop the other script (the one moving the arrow) when the space bar is pressed. 



Step 2:

Test your project again. This time, your arrow should stop moving when the space bar is pressed.

Animate your arrow, so that it looks like it's moving towards the target. 


Step 3: 

Test your game again. This time when you press the space bar, you should see your arrow get smaller. As if it is moving towards the target.

Step 4:

Once your arrow is at the target, you can tell the player how many points they have scored. 
For example, they could score 200 points for hitting the yellow.


Step 5:

You can also play a sound if they hit the yellow.


Step 6: 

Finally, you need to broadcast the new arrow message again to get a new arrow. 




4

Congrats!! Project complete

Click here to see the working of your project 
HAPPY ROBOTING !!!
Home | Shop | Terms & Conditions | Privacy Policy | Disclaimer | Contact Us
Copyright © SP Robotic Works. All Rights Reserved.