[FA Addon Making] Weapon Selector - beta testing / Collab
Posted: Sat Feb 02, 2013 5:48 pm
Beware: this is not a finished addon. I DO NOT recommend you use it in the regular sessions in its current state! (Although you do what you wanna do)
After much bangin my head against walls, I think I've come up with a (decent?) way to do what I wanted to do, i.e revamp the current Weapon Selection system in arma.
Yup, I got bored of having to scroll through all the weapons to get from Full auto to semi auto, or 203 to auto.
So my goal here was to separate the weapon selection from the fire-mode selection, and make it so if you're in full auto, throw a grenade, you don't get back to a semi auto gun.
In practice, what it does (wants to do):
- Uses two keyboard keys and the mousewheel
- One of those keys, when pressed, brings a up a menu (action menu style) containing every weapon you have.
- You can use your mousewheel to scroll through that menu, as you do with the Action Menu, and select a weapon using the middle button. It'll switch to that weapon.
- When the key is released, the menu disappears.
- The other key browse through the firemodes if you're carrying a pistol or a primary weapon. Note that the 203 launcher (or GP25) is considered a weapon on its own, so it will not be toggled by the fire mode selector.
- When you switch weapons, it'll remember which firemode you were in before.
- It ignores the mines/IEDs/Satchels so you don't blow yourself up while trying to change the color of your smoke.
- It also removes the default "Weapon: stuff" you get in your action menu.
- (it will be compatible with my other addon, the one with one button for the nades?) // Not done yet.
Now, it's not perfect because:
- it's ugly as hell (but who cares, right?)
- it doesn't make any difference between the different colors of smoke/type of grenades
- even though it looks like a light script, it's still a scripted solution and is dependant on scriptload/FPS.
- the implementation of it all might be retarded. It can certainly be optimized.
- it might mess up with some mods (although it shouldn't with what you can use in the regular sessions and ASR_AI)
- it doesn't work into vehicles. My current way of using it makes me unbind the "F" key (switch weapons/modes) but I use Ctrl+F to switch between guns in vehicles.
- it still contains development/unused code.
Why do I post this here:
- first, to gauge the interest for such a thing.
- because, if somebody can look at the code with fresh eyes and tell me what's messed up, what's retarded, how to do things in a better/more efficient way etc. it'll be better.
- because, if somebody knows his way around User Interface in Arma, design, etc. it'll be even cooler.
- because, every person who tests it can report bugs / unwanted features / needed features.
If interest for a collaborative work on this is shown, I might throw in a GitHub repository (although GitHub still drives me mad).
So here's the addon in its current beta form (0.2). You will need Eliteness to look into it, probably.
You can stick that in any modfolder to test it, as usual.
To use it, you'll have to bind one key (FireMode Selector) to Custom Controls / Use Action 18, and the other (Weapon Selection) to Custom Controls / Use Action 19.
Planning to do:
- Document the code (yes, I'm lazy).
- Stick the key Bindings in a new group of controls in the Arma/Options/Controls to make it more user friendly.
- fix game breaking bugs
- optimize the code as well as possible.
Known/reported bugs:
- Doesn't remember the firemode when switching back to some weapons having odd default muzzle (e.g G36K)
- Doesn't remember the firemode when automatically switching back to the main weapon (e.g after throwing your last grenade)
- For some reason, the last version here doesn't ignore the binos. Will fix.
After much bangin my head against walls, I think I've come up with a (decent?) way to do what I wanted to do, i.e revamp the current Weapon Selection system in arma.
Yup, I got bored of having to scroll through all the weapons to get from Full auto to semi auto, or 203 to auto.
So my goal here was to separate the weapon selection from the fire-mode selection, and make it so if you're in full auto, throw a grenade, you don't get back to a semi auto gun.
In practice, what it does (wants to do):
- Uses two keyboard keys and the mousewheel
- One of those keys, when pressed, brings a up a menu (action menu style) containing every weapon you have.
- You can use your mousewheel to scroll through that menu, as you do with the Action Menu, and select a weapon using the middle button. It'll switch to that weapon.
- When the key is released, the menu disappears.
- The other key browse through the firemodes if you're carrying a pistol or a primary weapon. Note that the 203 launcher (or GP25) is considered a weapon on its own, so it will not be toggled by the fire mode selector.
- When you switch weapons, it'll remember which firemode you were in before.
- It ignores the mines/IEDs/Satchels so you don't blow yourself up while trying to change the color of your smoke.
- It also removes the default "Weapon: stuff" you get in your action menu.
- (it will be compatible with my other addon, the one with one button for the nades?) // Not done yet.
Now, it's not perfect because:
- it's ugly as hell (but who cares, right?)
- it doesn't make any difference between the different colors of smoke/type of grenades
- even though it looks like a light script, it's still a scripted solution and is dependant on scriptload/FPS.
- the implementation of it all might be retarded. It can certainly be optimized.
- it might mess up with some mods (although it shouldn't with what you can use in the regular sessions and ASR_AI)
- it doesn't work into vehicles. My current way of using it makes me unbind the "F" key (switch weapons/modes) but I use Ctrl+F to switch between guns in vehicles.
- it still contains development/unused code.
Why do I post this here:
- first, to gauge the interest for such a thing.
- because, if somebody can look at the code with fresh eyes and tell me what's messed up, what's retarded, how to do things in a better/more efficient way etc. it'll be better.
- because, if somebody knows his way around User Interface in Arma, design, etc. it'll be even cooler.
- because, every person who tests it can report bugs / unwanted features / needed features.
If interest for a collaborative work on this is shown, I might throw in a GitHub repository (although GitHub still drives me mad).
So here's the addon in its current beta form (0.2). You will need Eliteness to look into it, probably.
You can stick that in any modfolder to test it, as usual.
To use it, you'll have to bind one key (FireMode Selector) to Custom Controls / Use Action 18, and the other (Weapon Selection) to Custom Controls / Use Action 19.
Planning to do:
- Document the code (yes, I'm lazy).
- Stick the key Bindings in a new group of controls in the Arma/Options/Controls to make it more user friendly.
- fix game breaking bugs
- optimize the code as well as possible.
Known/reported bugs:
- Doesn't remember the firemode when switching back to some weapons having odd default muzzle (e.g G36K)
- Doesn't remember the firemode when automatically switching back to the main weapon (e.g after throwing your last grenade)
- For some reason, the last version here doesn't ignore the binos. Will fix.