RPGs are common in development as they require in depth plots, character development etc.
In this tutorial I'm going to show you how to create a RPG Player function in Game Maker, this will allow you to do a lot more and with less code down the line in your game.
First off you're going to know how to use arrays, if you don't go and check out my array tutorial which can be found here.http://www.rpgrevolution.com/forums/index....showtopic=31027
Ok, first off I use numbers for indexes as I heavily comment on what they are, never use variables inside an array!!
Now first off your going to have to setup a block of folders, this just organizes scripts for your game which I've done in C# and C++ and found it extremely useful. So I use the same method for game maker. This is what your block should look like.http://img230.imageshack.us/img230/8240/block.png
globalvar actor, level, party_member_removed, main_actor;
//Call actor names, and stats
//Set Party Stats
global.maxparty = 0; // Max party variable.
Each array should have 11 slots which are just stats, xp, and slot numbers.
Coding a XP system: Include in your party script.
global.glevel = 0;
level[0,1] = 500;
level[0,2] = 1200;
level[0,3] = 2000;
level[0,4] = 2800;
level[0,5] = 3500;
If you have guessed, 0 is the number of one of your players, you check your party_controller object.
Put this in the step event of your party_control object.
//Hold array levels
global.glevel = actor[0,1]
if actor[0,10] >= level[0,global.glevel]
// If a player is removed, retain correct slots for other members
if party_member_removed = true
In party II I'll cover slots, retainers, menus, and level up functions!