An Eventer's Guide to an Ammo System

Started by Terry16389, July 13, 2008, 06:30:13 pm

Previous topic - Next topic

Terry16389

July 13, 2008, 06:30:13 pm Last Edit: July 21, 2008, 04:48:10 pm by Terry16389
Please note that I made this a long while ago, so I didn't feel like retyping it so I just copied/pasted it here. The edited part I actually added in on a different forum that I copied it from.


Required Knowledge:
Basic Eventing, and some Switch usage.

An Eventer's Guide to an Ammo System

Step 1: Creating the Items

Alright, to start off, we need to make our weapon that's going to use ammo.

I've gone ahead and made a Handgun that will require 9mm bullets.

Spoiler: ShowHide


Simple, right? Right.

Next, we have to make an Item. I'll call mine 9mm Round.

Spoiler: ShowHide


Let's go ahead and turn off Consumable, and set the Occasion to Never. It'll be going away fast enough.

Step 2: Creating the Common Event

Now go to your Common Event tab, and create a new one. I'll go ahead and call mine Ammo System. Set it to 'None'. We'll only be calling it when we're in battle.

Spoiler: ShowHide


Step 3: Making the Conditional Branches

Right-o, now that we've got our Common Event made, we can start making it do it's thing.

First off, make a Conditional Branch. Go to the second tab, and put a dot in the Actor circle. Then go down and check Weapon. Select your Handgun.

Spoiler: ShowHide


Hit OK.

Next, we need to make a Conditional Branch within the one we just made. Create a Conditional Branch, and go to the 4th page. Select Item. Put your 9mm Round in the box, and hit OK.

Spoiler: ShowHide


Your Common Event should now look like this:

Spoiler: ShowHide


Step 4: More Conditional Branches and Switches

Now, in the second Conditional Branch you made, put, a Control Switches command. Have it turn a second switch ON. I'm going to call my switch Player attack.

Spoiler: ShowHide


Click OK.

Now, we need to make it so that if the player DOESN'T have a 9mm Round, we need to do the same thing, but this time put turn OFF the switch Player attack, and we need to put this under Else in the second Conditional Branch.

Our Common Event should now look like...

Spoiler: ShowHide


That!

Now, we need to create another Conditional Branch, completely separate from the two we've just been working with.

Our next new Conditional Branch needs to be set on the first page of the CB dialog so that it activates only when the switch Player attack is OFF.

Our Common Event should now look like the following.

Spoiler: ShowHide


It's coming along, but it's not really doing anything yet, is it?

Well, that's coming up. Right now.

Step 5: Turning the Player's Attack On and Off

Now what we need to do, under this new Conditional Branch, is put a Force Action command.

It should have the following settings:

Spoiler: ShowHide


Click OK. What you could do, is if you wanted all of your actors to use arrows or bullets or whatever, is have the Force Action duplicated and the first two conditional branches duplicated for each of your actors who use ammo. But, to keep it simple, we'll stick with just our one actor for now.

Step 6: Putting the Common Event to Use

Now, all we have to do, is go through to each of the troops, and put in a Call Common Event command...

Spoiler: ShowHide


The common event should look like this so far:

Spoiler: ShowHide


I realize I forgot to put in the part such as when using ammo, it actually subtracts from the ammo you have. This is easily fixed by creating a Control Variable event, under your Force Action event line... (I'm calling my variable playerattacks)

Also, you need to create a LABEL above EVERYTHING. You'll see why.

Spoiler: ShowHide


Now, another conditional branch (Once again separate from all others...) Use the following settings:

Spoiler: ShowHide


Then, under that, add a Jump to Label and select the label you created earlier.

Now, we need another conditional branch.
Spoiler: ShowHide



And under that, we need to put another Control Variable command, but this time we need to add to a DIFFERENT variable than before. Ok? Ok.

And now for a final conditional branch.

Spoiler: ShowHide


And now, for the final two commands:

Add a Subtract Item "9mm Round" Constant: 1 command. Then under that create a Jump to Label and once again type in the label that you put on top of everything.

And that's it! It officially works now. lol!

"Anyone can say you can't write, don't let anyone say you don't."

Sally

nice, 7/10, i suggest to make it better, to have better bullets to do more damage, and maby a status effect.

Terry16389

Well, assuming you're going to have more than one weapon that uses ammo, the better weapon would do higher damage. And of course it would be easy to have certain weapons (for example, a tranquilizer gun) activate certain statuses on enemies. All you'd have to do is change the properties of the weapon. :)

"Anyone can say you can't write, don't let anyone say you don't."

Starrodkirby86

July 21, 2008, 04:29:58 pm #3 Last Edit: July 21, 2008, 04:59:03 pm by Starrodkirby86
As being an eventer (Not focused totally on it), I usually do systems like these myself. But possibly I would be interested in using this instead. I will surely add this to the database...Under the following conditons.

  • Add spoilers to hide the images.

  • Make it a little more visually appealing. Not saying it's horrendous now...but still. (Add bold, size up, etc.)


Finishing these minor things will have this added onto the Tutorial Database.  :D

-----

Thank you very much Terry, you have been added. Many cheers! :gunz:

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




cstb

How does this all work with the weapon?I tried it and my ammo dont go away. :O.o:Also the weapon cant have a common event.
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7

cstb

September 08, 2008, 06:35:00 pm #5 Last Edit: November 15, 2008, 02:32:39 pm by cstb
bump 8)
EDIT:Nvm forget it.
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7