Have you ever seen those games where there are lots of weapons, and you just push a button to switch, and you always use the same trigger button?

Did you know you can place this system in your games fairly easily?

Okay, to start off, you need to have a picture or text with all the names or pictures of all the weapons or the weapons projectiles.

Next we will look at the two ways of doing this. Did you know that there are two ways?

The First Way

Make it so that when someone gets a new weapon that a global value is set to one( Make the number of global values the same amount of weapons in the game(A-#of weapons). This will make it so someone can't have the weapons without earning them first.

Now make a Global value after the last one of your weapons. In this example it will be P. Insert these events within the ones you already have. Make a new event under the first weapon> When P=0. Continue to the second>when P=1. Continue with this until you get to the very last weapon. This makes the selection system work.

Now insert the trigger button under each weapon, and all the actions you want to happen when the trigger is released.

Below all your actions place the numbers.

Make an action: when 1 is pressed, and insert this: When Alterable Value A=1. Do the same with all your actons(When pressed 2,...B=1, ...C=1). Then make this action under all those actions. For the first one make it set P to 0. For the second action(lets say uppon pressing 2) Set P to 1. Do this until all of your actions are done.

The Second Way

This is very similar to the first way. Your going to make a group of events for each weapon. When the conditions are right, and the user pushes a selection; A group is activated. Then, whenever a different gun is selected all other groups are deactivated regardless of whether they can be activated or not. Of course, in order to make this you will have to use part of the first way. You will need to make it so we know the user posseses the weapon.

Image


http://www.freewebs.com/decstuff