Author: Kerc Kasha
Author Website:

Requirements: Community Base addons A3

Version: 1.2
Signed: Yes, serverkey included

Short description: This mod is designed to act as a framework for other mod makers to extend the base games weapon event handlers to allow for easy to configure sound effects and animations upon firing a weapon.

Date: 2016-11-22 11:07


Comments: (3)
Rating:



 



Weapon Eventhandler Framework

by
Kerc Kasha


Description:
This mod is designed to act as a framework for other mod makers to extend the base games weapon event handlers to allow for easy to configure sound effects and animations upon firing a weapon. For the most part it's designed around the idea of bolt action rifles, pump-action shotguns and any other manual bolt operation weapon.
Another benefit to the mod is it allows for manual bolting of weapons, which is currently set for when you're looking down a scope allowing you to see where your shot lands before bolting.

On it's own the framework does nothing but with a configured mod (such as Toadie's upcoming AWM/AWC modpack), these features come to life.


Installation:
To install the Weapon Eventhandler Framework you should use modfolders to keep it seperate from the official game content to prevent issues.
With Arma 3 you can use different ways to set up your modfolders to use custom content you have downloaded.
Please visit the Arma 3 Mod install instructions page for more information about using custom mods and addons in Arma 3.


Included files:
bg_weaponframework.pbo


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Usage:
The mods eventhandlers are configured within your weapons class name using the sub class 'bg_weaponparameters' like so:
class bg_weaponparameters
{

class onFired_Action
{
HandAction = ""; //The name of the action that will play upon firing the weapon
Actiondelay = 0.2; //The delay before the action and sound plays
Sound = ""; //The CFGSound name that you want to play upon the activation of the action
Sound_Location = "RightHandMiddle1"; //Selection name on the UNIT not the weapon, by default this is the right hand which suits fine for a bolt-action
hasOptic = false; //For weapons with built in optics, overrides the attachment check
};
class onEmpty
{
Sound = ""; //The CFGSound name that you want to play upon the weapon firing it's last round.
Sound_Location = "RightHandMiddle1"; //Selection name on the UNIT not the weapon
};

};
onFired_Action is for manual bolt operations while onEmpty will play the specified sound when the weapon has run out of ammunition.
Example Config for the base game LRR:
class CfgWeapons
{
class Rifle_Long_Base_F;
class LRR_base_F: Rifle_Long_Base_F
{

class bg_weaponparameters
{

class onFired_Action
{
HandAction = "GestureFireLRR";
Actiondelay = 0;
Sound = "";
Sound_Location = "RightHandMiddle1";
hasOptic = false;
};
};

};
};


Known issues:
- Bolting noise may not play when an existing client bolts their weapon if you have recently jipped.
- Not a real issue and actually intended, when you are scoped you must exit scoped in view and allow for the weapon to bolt before being able to reload, this is to avoid a vanilla bug where reloading while the gesture is playing causes magazines to get deleted and can sometimes stop you from ever being able to reload.
- Unit addons that override CBA's XEH handlers will cause the mod to stop working, if you're having issues with particular (non-vanilla) units it's an issue with that addon!


Steam Workshop:
- [url=]Subscribe[/url]


Credits & Thanks:
Kerc Kasha
CBA for the extended eventhandlers


Changelog:
v1.2
- Resolved config warning messages (Thanks to hogthar for the solution for this)
- Resolved scope private error message

v1.1
Hi guys, sorry its taken so long to update this I've been in the process of rewriting the mod for better performance and haven't finished it yet, in the meantime this is a release to fix the config issue that was appearing since Apex release. I apologize for not releasing this sooner as I was looking in the wrong place for a solution when it was right under my nose the entire time.

v1.0
- First Public Release


Forum topic:
- BI forums



- Community Base addons A3




Enable javascript to be able to download from Armaholic please!