Note About This Book: Advanced Lingo For Games was written by Gary Rosenzweig in 2000 for users of Macromedia Director 7. It is presented here for free on an as-is basis, with no updating. Most of the information and code here can be used in the most recent version of Director. The book has been reproduced from the final editing files archived in 2000, and not the final proof galleys. So some minor differences between this version and the printed version my exist. The entire contents of this book are Copyright 2000, Gary Rosenzweig. No part may be reproduced or copied without written permission. The text here is provided for individual use only.
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX and we'll call it even!

Advanced Lingo For Games
by Gary Rosenzweig


Chapter 12 Section 3

Putting It All Together

The example movie on the CD-ROM has been set up with two levels. Each level has the ball in sprite channel 3 and the paddle in sprite channel 5.

The bricks are contained in a whole set of channels from 11 on up. The second level has more bricks than the first.

The bricks are also colored by changing the color of the sprites themselves. This is done manually in the Score. However, you could also use different members for the bricks rather than doing what I have byusing the same member with a different color assigned to the sprite.

The frame behavior goes in the script channel for each frame. For the first level, set the number of lives to 3, but set it to 0 for all the rest. Also set the next level frame name for each, as well as the end game frame.

The paddle sprite behavior goes on the paddle sprite without needing any parameters filled in. However, the ball sprite takes a lot of parameters. You should have the ball speed increase with each level. You can also make the maximum slope value larger to match it.

Finally, you need to just add the brick behavior to all the bricks. If you have a set of bricks that share the exact same point value and sound, then you can add the behavior to all of these at once, and set the parameters for all of them at once. Otherwise, you have to set them all individually if they differ.

If you need to change the parameters for a whole set of sprites, it is usually easier to use the Score window to remove the behavior from all the sprites at once, and then reassign the behavior to all the sprites at once. That way, you only need to fill out the Parameters dialog box once, and all the sprites will have the same values. However, if you select several sprites, bring up the behavior Parameters dialog box, and change something, this only changes the first sprite in the group.