[aps]gnat 28 Posted February 20, 2005 Similar to Trenchfeet's question, anyone aware of a detectable flag to say when an AI is doing an attack run or has selected or been assigned a target ? I'm looking for a scripted way to get rid of aircraft AI doing dive bomb runs which really sux for large planes. Share this post Link to post Share on other sites
Footmunch 0 Posted February 20, 2005 You can get hold of the 'behaviour' of a unit. If there's no enemy around it will be SAFE, if there are targets nearby it will be AWARE. If the unit is firing/lining up it'll be COMBAT, etc Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 20, 2005 hmmmmm ..... ok, thx Footmunch ............ definitely worth experimenting with that option ..... Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 20, 2005 You can get hold of the 'behaviour' of a unit. ..... I thought there was a command to GetBehaviour .......... but doesnt seem to be any such command. Footmunch, Is there any way to get this info ? FYI, Was playing some more and found I could CARPET BOMB using the B-52 and AI not perfect but definely worth more playing. (Changed B52 bombs to "burst=10") So long as your plane has a Pilot/Commander and a Gunner and the formation will overfly the target, a simple; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this Flyinheight 250; this disableAI "target" works fine (weird I know!). AI gunner will drop bombs early to impact target (needs fine tuning, they are currently a little early), and best of all the Pilot doesnt change altitude. Share this post Link to post Share on other sites
Footmunch 0 Posted February 20, 2005 Gnat @ Feb. 20 2005,17:20)]You can get hold of the 'behaviour' of a unit. ..... I thought there was a command to GetBehaviour .......... but doesnt seem to be any such command. The command is: Quote[/b] ]behaviour unitOperand types: Â Â unit: Object Type of returned value: Â Â String Description: Â Â Behaviour mode of given unit ( "CARELESS", "SAFE", "AWARE", "COMBAT", "STEALTH" ) Example: Â Â behaviour player Taken from the command reference available at OFPEC. You disableAI-ed the plane? You could try it on (driver this) instead. The gunner might stay 'alert', but the pilot may fly on. Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 21, 2005 Taken from the command reference available at OFPEC. DUH ! ..... thanks. Couldn't see for looking .... Quote[/b] ]You could try it on (driver this) instead. I dont need to state "driver" seems to work without doing that, pilot stays straight-and-level. Gunner must still stay alert because he initiates bomb drops. Share this post Link to post Share on other sites