Game Development Reference
In-Depth Information
7. Drag and place both plaforms to the correct place on the grass between the
bends in the road. They should be placed as shown in the following screenshot:
Test your script and see how you can now only place cannons on the two plaforms
and not on the grass or the road.
Slowing down the rapid iring of cannonballs just requires a small addiion to the script.
Remember how everything in "computerime" goes really fast, but you can slow it down
with a wait command as shown in the following steps:
1.
Have a look at the cannonball's Scripts tab.
2.
See how the forever loop in the <green lag> script has no wait block in it at all.
Cannonballs will therefore be created as fast as your computer can manage.
3.
Place a wait … secs block just inside the forever block and fill in 0.1 . This will
slow down the creaion of cannonballs a bit. You can increase the number for
an even slower spawn rate and a more challenging game.
 
Search WWH ::




Custom Search