Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The fired Muzzle/Weapon is going to be grenadeMuzzle/Throw for grenades (classnames may be wrong - I've never actually looked at the cfg's for grenades) and demoChargeMuzzle/Put (for these I'm absolutely certain and confirmed them with the cfg, since I'm already doing stuff with it).
So...
_this select 0 = the unit that used the item
_this select 1 = the weapon the unit used (Put/Throw)
_this select 2 = the muzzle the unit used (demoChargeMuzzle and equivalent - different for each item for explosives!)
_this select 3 = mode... uh... full/semi auto? I don't think it's applicable
_this select 4 = the ammo type the unit used. (DemoCharge_Remote_Ammo for the small charge)
_this select 5 = the magazine that the unit had loaded when it fired (DemoCharge_Remote_Mag for the small charge)
_this select 6 = projectile... not applicable for charges, potentially applicable for grenades
Since both Put and Throw are defined under cfgWeapons, the game will see them as Weapons. They all have defined muzzles, magazines and ammunition - even though this makes no sense in reality, it is how the game works.
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Fired
_unit addeventhandler ["fired", {if((_this select 1) in ["Put","Throw"]) then {
(_this select 0) addMagazine (_this select 5);
};
}];
apparently the "fired" event handler WAS the right one, at first i thought it'll just add the nades or explosives after you take a shot from your firearm. Turns out it adds them right when they're being used.
In other words, it works like a charm. Thanks for the help champ