Goal:
To finish up our game, we need to activate everything we coded during this part. We can fire off these events when we hit the targets by using an If statement.
If the arrow touches a target, then we want to broadcast the message that will run the code to add a score and reset the targets.
After this the game is complete. Have fun with it and see if you can think of anything else to add to it!
Steps:
- Click on the “Arrow Sprite” and find the “when I start as a clone” block
- At the very bottom of the last If statement block (the if touching edge block), from Control, place an If statement
- From Sensing, place a touching mouse-pointer block and change it to touching EasyTarget
- From Events, place a broadcast EasyScored! block
- From Control, place a delete this clone block
- From Control, place an If statement after the last If statement
- From Sensing, place a touching mouse-pointer block and change it to touching MediumTarget
- From Events, place a broadcast MediumScored! block
- From Control, place a delete this clone block
- From Control, place an If statement after the last If statement
- From Sensing, place a touching mouse-pointer block and change it to touching HardTarget
- From Events, place a broadcast HardScored! block
- From Control, place a delete this clone block