MulleDK19 21 Posted February 22, 2014 (edited) The ARMA 2 way doesn't seem to work in ARMA 3. I've tried at least a dozen different things trying to make AIs throw a smoke grenade. _unit fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"]; _unit fire ["Throw","SmokeShellMuzzle","SmokeShell"]; _unit fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShellGreen"]; _unit fire ["Throw","SmokeShellMuzzle","SmokeShellGreen"]; _unit fire ["SmokeShellMuzzle","SmokeShellGreenMuzzle","SmokeShellGreen"]; _unit fire ["Throw","SmokeShellGreenMuzzle","SmokeShellGreen"]; And a bunch of different combinations with forceWeaponFire and the "UseWeapon" action. Edited February 22, 2014 by MulleDK19 code block Share this post Link to post Share on other sites
dr_strangepete 6 Posted February 22, 2014 (edited) unit action ["useWeapon", unit, unit, 9]; //weapon index 7 is hand grenade got my AI to throw his smokegrenade using UseWeapon, so maybe combine that with switchmagazine and you can choose your smoke round. UseMagazine also seems to let you define what round you are throwing, but its not clear if you have to use the index method shown or can substitute a class name...i dont have a minute to test that yet... --edit: Got it, you can use: https://community.bistudio.com/wiki/magazinesDetail and UseMagazine theres probably an easier way? Edited February 22, 2014 by dr_strangepete Share this post Link to post Share on other sites
MulleDK19 21 Posted February 22, 2014 (edited) unit action ["useWeapon", unit, unit, 9]; //weapon index 7 is hand grenadegot my AI to throw his smokegrenade using UseWeapon, so maybe combine that with switchmagazine and you can choose your smoke round. UseMagazine also seems to let you define what round you are throwing, but its not clear if you have to use the index method shown or can substitute a class name...i dont have a minute to test that yet... --edit: Got it, you can use: https://community.bistudio.com/wiki/magazinesDetail and UseMagazine theres probably an easier way? Yup, that works, thanks! Though, it seems kinda stupid to me that magazinesDetail returns an array of strings. Why was it not made to return an array of arrays? It hurts my head just thinking about having to parse the strings in SQF just to get the ids. Not to mention the fact that the command returns the display name, not the class name. Hmpf. I'm gonna make myself a throwGrenade function. Something a la [player, "SmokeShellGreen"] call MTP_fnc_throwGrenade; Edited February 22, 2014 by MulleDK19 Share this post Link to post Share on other sites
dr_strangepete 6 Posted February 22, 2014 there may infact be a command that gives the answer you want, i just can't find it at the moment, the new commands aren't well documented or integrated into the wiki...this would be a great time for Killzone_Kid to pop-in.......anytime now....hrm..... Share this post Link to post Share on other sites
MulleDK19 21 Posted February 22, 2014 Already made my function. It works wonderfully. simply [ai, "SmokeShell"] call MTP_fnc_throwGrenade; and the AI throws. Now I just need to spend a few more minutes to make it throw sub types if the unit doesn't have the specified type. Share this post Link to post Share on other sites
duanebjh 10 Posted February 25, 2014 Gday guys, im going to ask the noobest of noob questions here, but is it at all possible to hold my hand through implementing the function you guys just worked out in like 10 minutes. ive been struggling with this for a week using what appears to be the old arma2 way of having the ai toss a smoke granade...... player fire ["smokeshellmuzzle","smokeshellmuzzle","smokeshell"]; but i just could never get it to work. If you guys have got it happening can you please, as i asked before, walk me through how to get it to happen. Ill be so happy ill pour you all bourbons... and drink them for you if i must. Cheers In Advance Duane Share this post Link to post Share on other sites
KingoftheSandbox 10 Posted February 28, 2014 who needs functions?^^ https://community.bistudio.com/wiki/forceWeaponFire Share this post Link to post Share on other sites