Goal:
Let’s finish by coding the hard target in our game.
This code is also very similar to the other targets that we coded with some small differences.
What are they this time? Why are they there?
Steps:
- Click on the “Hard Target” sprite
- From Control, place a when flag clicked block
- From Motion, place a set y to block and change the number to 150
- From Looks, place a show block
- From Control, place a forever block
- From Motion, place a change x by block and set the number to 10
- From Control, place a if block
- From Sensing, place a touching edge block
- From Motion, place a set x to block then set the number to -220.