Game Development Reference
In-Depth Information
Now that we have another object on the stage, that is, the landscape, there is one more
thing we have to do to finish the game. When the cannonball hits the ground, it should
stop instead of moving straight through the landscape. This is similar to the addiion we
added after including the targets. Now we only need to add another collision check for
the cannonball to respond to.
The following are the steps for this collision check:
1. Get another () or () operator block.
2. We will check for hiing the green landscape color, just like we just did with
the targets.
3. In the other slot, we will place the enire condiion check, like we made earlier.
So our latest () or () block will become the outermost block in the construcion.
4. Place the enire construcion back in the repeat unil () slot and we're done.
The cannonball will now respond to hiing the stage edge, a target, and the landscape.
Objective complete - mini debriefing
That's it! We should now have an automaic landscape complete with a funcioning cannon,
firing script, and targets.
 
Search WWH ::




Custom Search