Status Feature Tutorial

Okay. First off, this tutorial should work, and will be helpful to those that want to make rpg elemented games or any other type of game that requires a status point choosing feature. These instructions will be easy and simple to understand, and is guarenteed satisfaction. So here we go.

What is the status choosing feature?

  • The feature provides the ability of complete customization of your character in an rpg elemented game, or any other.

What are the requirements for this feature?

  • The requirements, are simply any version of Macromedia Flash, this tutorial, and some memory.

How long will this take to make?

  • This would take as long as you wish, for the basics about a half an hour to completely understand the coding and functions, but for more advanced status features, as long as the Flasher would want to.

Let’s start.

Step one - New Project

  • Start off with a simple Flash document. Choose a background, for this tutorial, a blue background.

  • If there is none provided, make a frame on your timeline, only one is needed right now.

Step two - Basic status field

  • Make a feild (simple box) on the top right had corner of the document, make the lines a darker shade of blue, and for the fill, the lighter shade of your background. Make this take up about a third of your document virtically, and three-fourths horizontaly.

Step three - Status names

  • Make your status elements names. For this tutorial, just make “strength” and “defense” you do this by selecting the text tool, selecting static text, and clicking and dragging accross the screen to make a text field, make sure that this field is small enough to fit into the box on the side of this project. Name it strength. Do the same with defense, and place it under strength in the stats field.

Step Four - Making the dynamic text stats

  • Select the text tool, and go to properties. Change the text to dynamic text and make two boxes. Name the variables. In the first box, name the variable str, cllick on the box itself, and when the instert thing shows up, type in str, just so you can identify it. Do the same to the second dynamic text, and name the variable def. Place both texts close to the previous names.

  • Make another dynamic text, and call it pnt, the total amount of points that are given to you so that you could choose your stats. Place this anywhere.

  • Next to set the value of the dynamic text, Click outside the project on the grey background. open the actionscript menu, F9, and place this into it.

stop();

//First make this frame stop on entering.

_root.str = 5
_root.def = 5
_root.pnt = 10

//_root. sets the values of the variables that it represents.

Step Five - buttons.

  • For now, you don’t need anything fancy. Select the oval tool and make two small identical ovals. Make the line
    color a darker shade of the background, and the fill, make it the background color. Place one over the other somewhere in the background. Select the selection tool, highlight one of the ovals, and press F8 or press insert, convert to symbol, or with MX 2004, press modify, convert to symbol. Make the symbol into a button. The name it add1. Do the same to the other one, name it sub1. And place both next to strength.

  • Now for the actionscript. select add 1 button, and open the actionscript menu, F9, and add this into it.

To add everything correctly, follow these steps.

  • type in

on (release) {
if (pnt > 0) {
pnt = pnt - 1
str = str + 1
}
}

  • So that the total available points don’t go below 0, you have to add the greater than symbol, >, because you will start going into the negatives if you continue adding to the strength.

  • This button adds one point to strength and takes away one from the total points.

  • Do the same to sub1, but this time, change the variables around in the actionscript. Here is what it should look

like.

on (release) {
if (str > 0) {
str = str - 1
pnt = pnt + 1
}
}

  • Those are the adding and subracting buttons for strength. Now do the same for defense, follow the steps that were listed above. Name the adding button add2 and the subtracting button sub2. Here is the formula that you need in them.

  • add2

on (release) {
if (pnt > 0) {
pnt = pnt - 1
def = def + 1
}
}

  • And for sub2

on (release) {
if (def > 0) {
def = def - 1
pnt = pnt + 1
}
}

That’s basically it. For more advanced instructions, please reply on what you need. The following attachment is the advanced version of this tutorial. It is with MX 2004, so it might not work in your version. The second attachment is the sample file of the tutorial. Thank you for reading my tutorial, and God Bless!