Charas-Project

Game Creation => Requests => Tutorials => Topic started by: TMlunder on December 04, 2005, 10:44:11 PM

Title: Ammo System for RPG Maker 2003
Post by: TMlunder on December 04, 2005, 10:44:11 PM
Ok...Im gonna write out this script for you to make a ammo system.
Things you will need:
1. A weapon. Needs to be a gun or bow.
2. A common item. Name it to be ammo (or arrows, pending.)
3. Switch. Name it HeroEquipGun. (Or Heroquipbow, pending. Also when I wrote 'hero' I mean the name of the charactor with the weapon.)
4. A variable. Name it Gunammo (or arrows, whatever.).
-----------(ok now to make the whole thing. In order to make all this work you will need to edit the monster groups you are going to be using, I suggest making a new monster group and then copying it again and again untill your sure. I will post more comments throughtout this as well. So be looking for my comments as inbetween ()'s. If you still cant understand me I am putting picture in this to show you, I have a character named Squall, and a gun called Colt 1911 and ammo called .45 ACP.)--------------

Ok now the tutorial!

1. Make a common event. Trigger it Call. Name it HeroCurrentWeapon.

2. In the common event: Branch if the Hero (Whatever Character) has Gun equipped else handler. In the branch Switch operation HeroEquipGun ON. In the else handler Switch HeroEquipGun OFF. End. ( Make a branch just like this one in this event for the other charactors with guns or bows. all you need is anoher switch for them. Remember when I say HeroEquipGun I mean CharactorNameEquipGun, if you dont put there name you can get confused.
Example For Common Even Click Here! (http://img212.imageshack.us/img212/3958/picfortut17wt.png)

( Ok now that we have the common event done, lets move on. Go to your monster group tab and go to the Battle Events at the bottom. You will need 2 pages for this. Add an extra page if you have more then 1 character with a gun or bow. )

1. On the first page of the Battle Events trigger it turns elapsed

2. Now first thing we put on the page is Call Common event HeroCurrentWeapon.

3. Next on the page put Variable Operation Ammo (or whatever you named that variable for ammo.) set, Ammo (the item you named for ammo.) possessed.

Example For First Page of Monster Group Battle Event Click Here! (http://img169.imageshack.us/img169/1562/picfortut23sm.png)

( Ok now were done with the first page of the battle events. Now the second page.  )

1. Trigger it [Character uses the fight command]

2. First thing on this page is Branch if switch HeroEquipGun is ON. No Else Handler.

3. In the branch, Branch if Variable Ammo is 1 or More. Else Handler.

4. In that branch put change items Ammo 1 Remove (What im saying is remove 1.)

5. In the else handler of that branch Change Equipment Hero Weapon Unequip. End. End.

Example For Page Two of Monster Groups Battle Events Click Here! (http://img169.imageshack.us/img169/482/picfortut37hb.png)

And thats it! If you have any questions let me know, please comment on this too I really want to know if I did good job or not!
Title:
Post by: ShadSilverdragon on April 13, 2006, 11:07:03 AM
Doesn't sound bad. Think i'll give it a try.
Title:
Post by: Rikushinblade on April 13, 2006, 11:37:00 AM
hmm....this sounds pretty good ill check this out sometime
Title:
Post by: Poncho on April 13, 2006, 02:52:51 PM
Very nice. I kinda need a system like this if I ever come to start my future/mecha project ;)
Title:
Post by: Grandy on April 13, 2006, 02:58:38 PM
Quote
Originally posted by ShadSilverdragon
Doesn't sound bad. Think i'll give it a try.


 Topic kick, please be careful next time.