tinter 186 Posted July 14, 2014 As it says in the title, it would be nice to know if there's some way to get tanks to fire main gun at infantry, even if it's just a looping script. As of now I haven't even been able to find a script that makes them fire their main gun at all, with or without a target. Share this post Link to post Share on other sites
Lala14 135 Posted July 14, 2014 (edited) the fire command allows you to force an AI to fire a specific weapon and blah blah blah --Edit forceWeaponFire seems to be a better option Edited July 14, 2014 by Lala14 Share this post Link to post Share on other sites
redarmy 424 Posted July 14, 2014 How do you get the classname of a main gun from a modded tank? Share this post Link to post Share on other sites
SilentSpike 84 Posted July 14, 2014 Use the config viewer in the editor. You can also retrieve weapons dynamically via script if you know the config structure. Share this post Link to post Share on other sites
asuseroako 17 Posted July 14, 2014 As it says in the title, it would be nice to know if there's some way to get tanks to fire main gun at infantry, even if it's just a looping script. As of now I haven't even been able to find a script that makes them fire their main gun at all, with or without a target. Have you tried attaching an enemy car to the target unit then do a deleteCollection? Share this post Link to post Share on other sites
Lala14 135 Posted July 14, 2014 (edited) isnt deleteCollection just hideObject? anyway there was posted there on the foreWeaponFire page about dynamically getting the weapon by ffur2007slx2_5 _weapon = (weapons _veh) select 3; _mode = (getarray (configfile >> "cfgweapons" >> _weapon >> "modes")) select 0; if (_mode == "this") then {_mode = _weapon;}; (driver _veh) forceWeaponFire [_weapon, _mode]; //Force a CAS fire a rocket. we could modify this with the "modded" tank value by doing _veh = _this select 0; //or we could do a if (vehicle player != player) then { _veh = vehicle player; _weapon = (weapons _veh) select 0; //select Cannon _mode = (getarray (configfile >> "cfgweapons" >> _weapon >> "modes")) select 0; if (_mode == "this") then {_mode = _weapon;}; (gunner _veh) forceWeaponFire [_weapon, _mode]; //Force cannon to fire which for tanks is usually the first weapon which would be 0. Edited July 14, 2014 by Lala14 Share this post Link to post Share on other sites