Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [GM] RPGs
Rukiri
post Jun 1 2009, 08:06 PM
Post #1


emerge -avt awesome! Wait... it brings me.... HERE?!
Group Icon

Group: Revolutionary
Posts: 1,729
Type: Scripter
RM Skill: Advanced




RPGs

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 (TOO Large)

Party_Int:
CODE
globalvar actor, level, party_member_removed, main_actor;
//Call actor names, and stats
scr_party();


Party:
CODE
//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.
CODE
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.
CODE
//Control levels

//Hold array levels
global.glevel = actor[0,1]

//Goku

if actor[0,10] >= level[0,global.glevel]
{
  actor[0,1]+=1;  
}

// If a player is removed, retain correct slots for other members
if party_member_removed = true
{
  scr_retain_slots();
}


In party II I'll cover slots, retainers, menus, and level up functions!


__________________________
Xeilsoft
- Follow your dreams to the very end..

Kits that I'm working on.
[Unity3D 4.0] LTTP/Minish Cap - I don't have time for custom gfx like what the pze folks are doing but I will try and work on some enhanced LTTP graphics.

Main PC
Core i7 3820 overclocked @ 4.8GHZ
Galaxy: Nvidia Geforce GTX 680 GDDR5 2GB
Asrock X79 Extreme9 w' creative sound
64GB corsair platinum @ 1600MHZ
Muchkin 128GB SSD(boot), OZKIN 2TB SSD, Western Digital GREEN 1TB HDD.
Rosewill Lightning 1000W PSU
OS: Funtoo Linux, Windows 8 (Virtual Machine)

iMac (March 2013)
3.4GHz Quad-core Intel Core i7, Turbo Boost up to 3.9GHz
16GB 1600MHz DDR3 SDRAM - 2X8GB
1TB Serial ATA Drive @ 7200 rpm
NVIDIA GeForce GTX 680MX 2GB GDDR5
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th June 2013 - 05:32 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker