Short Circuit Gamer
Feb 9 2012, 02:56 PM
It's probably a real simple process, But can anyone explain in simple terms for a dipshit like me how to assign ammo variables etc to various weapons and when no ammo is available to the weapon, it can't be used.
Help me plzzzzz
Thanks in advance
Feb 9 2012, 03:18 PM
So basically, it assigns the amount of that item to that variable
Short Circuit Gamer
Feb 10 2012, 01:57 AM
ok thanks, but how is that certain ammo, attached to a certain weapon?
Feb 10 2012, 11:45 AM
It isn't, at least not very easily. You would have to have it run through a common event or script.
For a common event, you would have it check which weapon is equipped, then have it take away said variable when used.
If no ammo is left, it doesn't shoot.
Feb 11 2012, 11:09 PM
How are the weapons being used? (I imagine it's simply equipping them like a weapon, and not some kind of eventing). If you are using the gun in a battle this is what I would do.
"Bullets in .09 Clip" (Set to 30 or however many bullets are in a clip)
"Number of .09 Bullets" (how you make the clips in the first place you can figure out, basically once made it should add item ".09 Clip" and remove 30 of the ".09 Bullets").
Needed Common Event "Ammo Check"
Is weapon "Semi Auto" equipped
Conditional Branch is ".09 Clip" in inventory.
Conditional Branch is Variable "Bullets in .09 Clip" Greater than or equal to 1
Jump to label 'End'
Conditional Branch is Variable "Bullets in .09 Clip" = 0
is number of ".09 Clip" in inventory greater than or equal to 2
if yes remove 1 ".09 Clip"
set variable "Bullets in .09 Clip" to 30
Change Equipment 'Alexis, Weapon = None' (This is the else part for if Variable "Bullets in .09 Clip" = 0)
Label - End
(Create an End label at the very end.)
Now in every Else section of those conditional branches (like if there is no ".09 Clip" in inventory), you should have a command 'Change Equipment' (it's in the 3rd page). Select character and select weapon and change it to none. But if you have enough bullets it will skip to the end and nothing happens.
Now in the troop page, you want to run the "Ammo Check" common event at the start of every turn.
What this will do is at the start of every turn check if you have enough ammo. If you don't, the weapon will unequip. If you have more than one character it will get a little more complicated, but let's see if this makes sense to begin with.
* Completely forgot about the whole using ammo part... Id have the weapon with a status effect (like poison) attached to it called ".09 Flag". Add into the Ammo Check commen event to check if an enemy is inflicted by that state. If so, remove 1 bullet from the clip (control variable "Bullets in .09 Clip" - 1)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here