Gw Temp


Tutorial - 'Gun system without CBS' by Guest

An item about RPGMaker 2000 posted on


We know that all (well, most) guns need ammo. This RM2K3 tutorial shows you how to implement that in your game: you can only attack enemies if you have enough bullets to shoot.


This will only work for RPG Maker 2003. First make a common event parallel process called 'Ammo capacity' or something. You'll also need a variable for the bullets and a switch for an ammo clip item. Start it with a variable that checks the number of your equipped weapon. If the number is less than any of the guns (IE:Weapon #10-20 are guns so it'd be if it was less than 10) then have it turn switch GUN off. In the else case have switch GUN turned on and then the following for each weapon....this is just an example...

<>branch if Billy m84f equipped
<>variable oper: [0001:Ammo capacity] set 8

and so on for each gun. The variable is for the weapons ammo capacity. The bullets variable should be set to equal whatever the ammo capacity of the gun you get is and this variable will be decreased each time you attack. Also, make sure that under each fork condition for when guns are changed you change the amount of bullets incase the ammo capacity of the gun you equip is lower then the one you had before.

Next in the battle events make an event with switch GUN and Billy uses attack command as the conditions. Now under the battle event for Billy attack, have fork conditions as follows...

<>Branch if var [0002:Bullets] is 0
<>show battle animation (insert a battle animation that has numbers. set the animation to appear on Billy and show the number 0.
<>Change condition: Billy No ammo inflict (Make this stat simalar to stun only it abates after 1 tuen with 100% probability. This way when he has no bullets he won't attack)
<> Variable oper: [0002:Bullets] -1 (This will make it so everytime you attack and have ammo your bullets will go down by 1)
<> Branch var [0002:Bullets] is 10 (or whatever number you want)

and repeat for each different amount of bullets. Have 'End event processing' at the end of this coding. Thjen for an ammo clip make an item called 'Ammo clip' or whatever. Have it as a switch. In the battle event commands, whenever the switch turns on you can show a battle animation if you'd like and then change the bullets variable to equal the guns ammo this

when switch AMMO CLIP is on
Change var [0002:Bullets] set equal [0001:Ammo capacity]
turn switch AMMO CLIP off
end event processing.

There! You should have a working ammo system now. Hope this helps.