PDA

View Full Version : [AS2] Stat System


DotheDew
07-14-2009, 03:49 AM
How could i create a 3 stat system based rpg. Meaning the 3 stats would consist of strength, intellect, and charisma. The player could increase the stats by 25 points at the beginning. Directing them independently to each stat. So in truth, how would i create a stat system like that. I don't want to sound too hasty. But i really suck at action scripting rpg's. All i need to know is how to do the stat system.

VexForge
07-14-2009, 09:10 AM
Hi!
Assuming you actually want the save the stats for later gameplay, mySQL database would be a good way to go. It's not too hard once you get into it, but it takes a day or two of reading to actually get it. So, you could try www.tizag.com - There's some basic use of mySQL along with PHP.
Here's a basic thought of it:

The user uses the stat point to + a number in a dynamic textfield.
Once the user is done, he/she clicks the save button.
The save button rounds up the points in a loadvars object, like this:
var pointsToSend:LoadVars = new LoadVars();
pointsToSend.points_strength = strength_points.text;
...and so on....
Finally it sends the points to a php file, which in turn updates the database.

So basicly:
- Learn how to use loadvars to send variables to PHP
- Learn how to pass variables from PHP to mySQL
- And last but no least, learn how to load the points from the database.