Terru16389
Member
Hey guys, Terry16389 here. I've been working on a game for a while now, and the scripted ammo systems don't really seem to cut it. So, I've decided to make an Ammo System that's is Event based, and here's the tutorial of how to do it!
Required Knowledge:
Basic Eventing, and some Switch usage.
An Eventers 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.
http://i7.photobucket.com/albums/y288/G ... motut1.jpg[/IMG]
Simple, right? Right.
Next, we have to make an Item. I'll call mine '9mm Round'.
http://i7.photobucket.com/albums/y288/G ... motut2.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut13.jpg[/IMG]
Step 3: Making the Conditional Branches
Right-o, now that we've got out 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.
http://i7.photobucket.com/albums/y288/G ... motut4.jpg[/IMG]
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'.
http://i7.photobucket.com/albums/y288/G ... motut5.jpg[/IMG]
Your Common Event should now look like this:
http://i7.photobucket.com/albums/y288/G ... motut6.jpg[/IMG]
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'.
http://i7.photobucket.com/albums/y288/G ... motut7.jpg[/IMG]
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...
http://i7.photobucket.com/albums/y288/G ... motut8.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut14.jpg[/IMG]
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:
http://i7.photobucket.com/albums/y288/G ... otut11.jpg[/IMG]
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...
http://i7.photobucket.com/albums/y288/G ... otut12.jpg[/IMG]
And voila! You're done!
Now boogie like there's no tomorrow, and enjoy your ammo system!
Also, this is what the final Common Event should look like...
http://i7.photobucket.com/albums/y288/G ... otut15.jpg[/IMG]
Extra Notes:
This can be used with systems such as the DBS, and Caldaron's Realistic ABS. Enjoy.
MAJOR EDIT: 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.
http://i7.photobucket.com/albums/y288/G ... otut16.jpg[/IMG]
Now, another conditional branch (Once again separate from all others...) Use the following settings:
http://i7.photobucket.com/albums/y288/G ... otut17.jpg[/IMG]
Then, under that, add a 'Jump to Label' and select the label you created earlier.
Now, we need another conditional branch.
http://i7.photobucket.com/albums/y288/G ... otut20.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut21.jpg[/IMG]
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!
Required Knowledge:
Basic Eventing, and some Switch usage.
An Eventers 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.
http://i7.photobucket.com/albums/y288/G ... motut1.jpg[/IMG]
Simple, right? Right.
Next, we have to make an Item. I'll call mine '9mm Round'.
http://i7.photobucket.com/albums/y288/G ... motut2.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut13.jpg[/IMG]
Step 3: Making the Conditional Branches
Right-o, now that we've got out 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.
http://i7.photobucket.com/albums/y288/G ... motut4.jpg[/IMG]
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'.
http://i7.photobucket.com/albums/y288/G ... motut5.jpg[/IMG]
Your Common Event should now look like this:
http://i7.photobucket.com/albums/y288/G ... motut6.jpg[/IMG]
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'.
http://i7.photobucket.com/albums/y288/G ... motut7.jpg[/IMG]
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...
http://i7.photobucket.com/albums/y288/G ... motut8.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut14.jpg[/IMG]
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:
http://i7.photobucket.com/albums/y288/G ... otut11.jpg[/IMG]
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...
http://i7.photobucket.com/albums/y288/G ... otut12.jpg[/IMG]
And voila! You're done!
Now boogie like there's no tomorrow, and enjoy your ammo system!
Also, this is what the final Common Event should look like...
http://i7.photobucket.com/albums/y288/G ... otut15.jpg[/IMG]
Extra Notes:
This can be used with systems such as the DBS, and Caldaron's Realistic ABS. Enjoy.
MAJOR EDIT: 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.
http://i7.photobucket.com/albums/y288/G ... otut16.jpg[/IMG]
Now, another conditional branch (Once again separate from all others...) Use the following settings:
http://i7.photobucket.com/albums/y288/G ... otut17.jpg[/IMG]
Then, under that, add a 'Jump to Label' and select the label you created earlier.
Now, we need another conditional branch.
http://i7.photobucket.com/albums/y288/G ... otut20.jpg[/IMG]
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.
http://i7.photobucket.com/albums/y288/G ... otut21.jpg[/IMG]
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!