JDog 11 Posted July 25, 2009 (edited) First... I cannot for the life of me make an AI pilot fire the main gun of an aircraft. I want an aircraft to shoot at a ground target/marker with the machinegun. Whether I try calling the name of the pilot of the name of the aircraft. I've tried these: unit fire "GAU12"; unit fire ["GAU12",""] And I've tried removing all other weapons and giving him a destroy waypoint or doTarget/doFire command... nothing works. I can make it fire any other weapon - bombs, missiles - but not the gun. Any help please? Also two others: 2) When trying to play a SP mission I made coop with a friend, the AI squadmates won't disembark the vehicle we start in. Thoughts? 3) Is it possible to make a script WRITE to a file? Like to record inputs and actions taken/used? Thanks! Edited July 25, 2009 by JDog Share this post Link to post Share on other sites
Ghost 40 Posted July 25, 2009 use the selectweapon command http://community.bistudio.com/wiki/selectWeapon then dotarget http://community.bistudio.com/wiki/doTarget Share this post Link to post Share on other sites
JDog 11 Posted July 25, 2009 Sorry, tried selectWeapon also. No go. Share this post Link to post Share on other sites
Ghost 40 Posted July 25, 2009 ok so you named your manned aircraft unit and in a trigger or script have unit selectweapon "gau12"; unit dotarget target; unit fire "gau12"; something along those lines and it does not work? Share this post Link to post Share on other sites
JDog 11 Posted July 25, 2009 (edited) It does not work. It just stops the plane from firing any other weapon, so it passes by harmlessly. Even if I remove all other weapons, he won't use the machine gun. I got him to start dropping bombs on a 100% chance now, but gotta position the target so the line of 2 "MOVE" waypoints goes right through it, with a doTarget mixed in, otherwise the plane will come in at some curve and cant hit it so won't even fire. unit doFire target; doesnt work either ---------- Post added at 01:52 AM ---------- Previous post was at 01:42 AM ---------- Haha so out of frustration I through this jumble into a trigger... plane doWatch T1; plane doTarget T1; plane selectWeapon "GAU12"; plane doFire T1; plane fire "GAU12"; And guess what... he drops a bomb every single time. One out of 3 times he'll throw in 2 rockets immediately beforehand. Edited July 25, 2009 by JDog Share this post Link to post Share on other sites
kylania 568 Posted July 26, 2009 I'm having doFire troubles as well. Even though the wiki says that doFire won't work against an object (ie, target) it does work if run from a trigger, but it doesn't work from a script? I'm trying to get an AI to fire on a TargetE. Share this post Link to post Share on other sites