How to create a shooter video game step 3 animate background head

How to Create a Shooter Video Game in Adobe Flash- Part 4

By


How to Create a Video Game using Action Script 2.0 Part 4-Adding Lives and Score, Game Over

In the first part of this video series on how to create a shooter style video game in Adobe Flash, we created our main characters, made them move, and shoot. In the second part, we animated our characters.  In the third part, we animated our background.  In this fourth part of the video tutorial series, we'll add our lives, score, and Game Over. 

The code for our lives, score, and Game Over is already embedded in our file.  We added all of this code in the first step.  Now we just need to add our score, lives and Game Over and link them to them code.

Step 1- Add the Score
Use the text tool, find a place that you want the word "Score" to appear on your stage and type "Score".  In the properties panel for this text, be sure that it is static text.  Now beside the word "Score", pull out a new text box, again with the text tool.  This time be sure that the text is dynamic.  You can change it from static to dynamic in the properties panel of the text.  Then, in the properties panel, under "options", type the following in the "variable" box...

_root.score

Now your score will work adding "10" points for every enemy hit.

Step 2- Add the Lives
Now you'll follow similar steps for the lives. Find a place on your stage for the word "Lives". Using the text tool, add static text to read "Lives". Beside the word "Lives", add a new dynamic text box. In the properties panel for this text, under "options", type the following text in the "variable" box...

_root.lives

Now your lives work.  You will start with "3" lives.  If you play your game at this point, you keep losing lives into negative values.  To fix this we need to add our "Game Over" movie clip.

Step 3- Create a "Game Over" Movie Clip
Now we need to add a "Game Over" sequence to our game.  Go to the library, and create a new movie clip.  Name this new movie clip "GameOver".  Select the "export for actionscript" radio button when you create the new symbol.  Then, in the new timeline, draw what you want your "Game Over" sequence to look like.  

Here's how to create your score, lives, and Game Over sequence for your shooter style video game...  Continue on to Part 5 of How to Create a Shooter Video Game

LIKE THIS TUTORIAL?

If so, please join over 16,000 people who receive weekly tutorials, articles, and 3 FREE COURSE VIDEOS and EBOOKS!  Just click on the button below to add your name!

I'M IN!




Membership Program
DRAWING COURSES
The Secrets to Drawing


The Colored Pencil Course


Portrait Drawing The Smart Way


The Pen and Ink Experience


Pastel Landscape Mastery


Creative Mixed Media
PAINTING COURSES
Oil Painting Master Series


The Watercolor Workshop


The Acrylic Painting Academy
DIGITAL COURSES
Basic Photoshop for Artists
FOR TEACHERS
Ultimate Lesson Plan for Art Teachers