Jump to content

Recommended Posts

So im literally just building an editor and or saved mission to house as many functions that the editor can handle. The point especially being simple for simple sake. Attempting to tackle an issue that is often requested but with little answers I figured I would give it a shot. Im at an impasse simply because there is a definition all throughout the BI WIki that cannot be searched and is not defined. Muzzle. 
WTH is muzzle when attached to a grenade? I have no idea what was going through the programmers mind when he declared muzzle therefor without being a mind reader neither can I. I cant find any real detailed info for it im just making guesses.
I can put this in a trigger and if my named unit has a regular white smoke this actually functions in ARMA 3.

[dumbGuy,"SmokeShellMuzzle"] call BIS_fnc_fire;
hint "it activated";

There is an example right on the [fire] wiki page at the bottom that uses "SmokeShellGreenMuzzle", well go figure if I equip the test ai with a green smoke, it will not work. 
So then this got further confusing as I can go into arma 2 classnames and they were nice enough to list the muzzles on that page giving me I assume some basic insight to what the programmers mean when they say muzzle. Seems like its some launching position for the projectile or type of system for launching. 

I have attempted to run BIS_fnc_fire, fire, forceweaponfire. and nothing works. Basically anything suggested on previous threads, examples in the wiki, and examples in the forums appear to all be non functional anymore *(with coloured smokes). It appears that you need to "fake this" and upon a condition you need to create and pop a smoke near the AI?

If anyone has any details on this subject matter especially the muzzle, that would be great if not oh well. Thanks.

Share this post

Link to post
Share on other sites



the mouth, or end for discharge, of the barrel of a gun, pistol, etc.


Place a unit in the editor, give it whatever weapons/grenades/etc. you wish. Paste this code in its init field:

this addEventHandler ["Fired", {
	params ["_unit", "_weapon", "_muzzle"];
	hint format ["%1 | %2",_weapon,_muzzle];

Everytime you fire/use a weapon, the event handler will post a hint telling you the relevant weapon and muzzle.


I placed a generic rifleman. Firing the MX rifle gives this result:


arifle_MX_F | arifle_MX_F


The weapon and muzzle names are the same.


Throwing an RGO grenade gives this result:


Throw | HandGrenadeMuzzle


The weapon is "Throw." The muzzle is "HandGrenadeMuzzle."


So, as is so often the case with video games, things aren't literal translations from the real world. You don't throw a grenade in Arma. You fire your Throw, and the relevant projectile comes out of its muzzle, which is named depending on the type of throwable you have selected.

  • Like 2
  • Thanks 1

Share this post

Link to post
Share on other sites

Thanks for the response. I basically figured that is what muzzle was, but attempting to review with other items like IR grenades that dont list muzzle in the muzzle name I was getting confused. Your hint script will be very beneficial for finding all sorts of information, thanks again. So I dont know why, but I assume that I must have moved my trigger slightly when I tested the white smoke, or something else is slightly different between the white and coloured smokes. Maybe execution time?

I found out that the trigger needs a delay, Or the unit to throw the nade must be stopped, either or, the unit to throw the smoke was moving into the trigger area and the trigger held the code, a simple 'is present' check. As I said it was just simple for the sake of being simple. After your response reaffirming its possible I noticed the NPC no longer performed. Watching it again I noticed the npc was not fully stopped by the time my hint was coming up. Adding the one second delay to the trigger gave him time to stop, I assume now for that function the NPC on foot needs to be fully stopped. I assume I must have moved the trigger ever so slightly towards the move waypoint when I tried to run color smokes. Without some complicated debug, I didnt notice exactly how close the hint after execution was coming up from the time the NPC stopped. 

I guess since a player can throw a nade while moving i didnt think that the NPC couldn't. 

Learned a lot thank you. 

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now