Jigsor 176 Posted December 28, 2012 Does anybody have any idea what condition can be used if an AI aircraft is running low or out of ammo. I know this can be done for fuel. The sensor will be used to have an AI aircraft land at an airfield to rearm. The AI already announces when out of ammo. This should be a general condition and not specific to which type of ammo as varying aircraft types have many types of guns although the cannon is the main concern. Is this possible? Share this post Link to post Share on other sites
iceman77 19 Posted December 28, 2012 You could try something like this..idk how it would work for vehicles. I'm sure someone will have a better solution though. if (someAmmo unitName) then {hint format ["%1", someAmmo unitName]} else {hint format ["%1", someAmmo unitName]}; returns the amount of ammo... Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted December 29, 2012 (edited) waitUntil {(_aircrft ammo "MaverickLauncher") == 0}; or if ((_aircrft ammo "CMFlareLauncher") == 0) then {hint "no flares left"}; The command works for vehicles. However only for the vehicle's gunners' weapons - aka those returned by "weapons vehicle". So you may want to check that before stringing some conditions together with && or and Edited December 29, 2012 by Mattar_Tharkari Share this post Link to post Share on other sites
Jigsor 176 Posted December 31, 2012 I can work with that. Thanks for the suggestions Iceman77 and Mattar_Tharkari Share this post Link to post Share on other sites