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.
Hey in case you hadn't noticed, I was one of the first(if not the first) To use this system. I hadn't seen it in use prior to myself...uh "creating" it. Although Im sure other people had variations prior to myself.
Thats excellent. IF you really think about it, the system itself is very basic. Its a common system. I know I was one of the first though because I never saw it in any games prior to the first time I made it. Thats not to say, however, that it wasn't. Im just saying...you know, I was one of the first.
(-: ~Not trying to brag. Just layin down the facts.
Among the first? Mark Pay had a very effecient weapon changing system around last decade or so for Tremor (though I still think that it was over-rated even for its time). Heck, I made a weapon changing system back in late 1999, the second thing I did just after I got MMF. Not to brag or anything .
Nice article though. Should help the newbies. But what I'd rather like to know is how to make the weapon changes show in the game. You know, making the weapons on the sprites change without... being buggy and stuff and without having to make a different sprite for a different weapon. Hot spots? Maybe for a gun... but how about swords and axes?