masterfulninja 10 Posted September 19, 2013 I'm trying to get two attack helis to take down a defensive tower (killing the static defenses on top) but they keep strafing using the guns primarily. Ive seen them use rockets occasionally, sometimes they do take the building down, but not reliably. Im sure there's a script to limit the vehicles AI weapon choice, anyone know what it is? Share this post Link to post Share on other sites
Tajin 349 Posted September 19, 2013 This might interest you: https://community.bistudio.com/wiki/fireAtTarget Share this post Link to post Share on other sites
masterfulninja 10 Posted September 20, 2013 Ive looked at the link you provided and Ive tried running heli1 fireAtTarget [mg1,"HellfireLauncher"]; from a called script. I know the script is activating because of the help text byt im still not seeing any missiles or rockets. Have i got the syntax wrong? Share this post Link to post Share on other sites
Gekkibi 11 Posted September 20, 2013 (edited) Try using the same method I used with GKB_fnc_randomAAFire: _unit doWatch _direction; _unit fire (_unit weaponsTurret [0] select 0); (use your static object instead of position [_direction in my example] when using doWatch) Not sure if it works with helicopters, and unfortunately can't test this right now... Edited September 20, 2013 by Gekkibi Share this post Link to post Share on other sites
masterfulninja 10 Posted September 20, 2013 _unit fire (_unit weaponsTurret [0] select 0); The default order on the gunship is gun, missiles, rockets. So a 2 instead of a 0? In which place? Share this post Link to post Share on other sites
Gekkibi 11 Posted September 20, 2013 You'd have to check which turret it is first, assignedVehicleRole. Share this post Link to post Share on other sites
masterfulninja 10 Posted September 20, 2013 (edited) Ah, nevermind. 2 is indeed the rockets. Edited September 20, 2013 by masterfulninja Share this post Link to post Share on other sites
masterfulninja 10 Posted September 20, 2013 Sigh, well i got my script working but even though i have the pilots target and look at the mg, then fire a missile, it still doesn't track. I'm guessing i will have to use a fireattarget like Tajin suggested... But I still cant get that command to work. heli1 fireAtTarget [mg1,"HellfireLauncher"]; is the syntax im using, im not sure "HellFirelauncher" is the right operand for the Skalpel ATGM but my searches havent turned up a Skalpel classname... Share this post Link to post Share on other sites
Gekkibi 11 Posted September 20, 2013 Skalpel ATGM is not a rocket. Try to create a laser marker where the CSW is located... PS. What helicopter are you using? Share this post Link to post Share on other sites
masterfulninja 10 Posted September 20, 2013 (edited) MI-48 I know its not a rocket, initially i wanted rockets to destroy a tower but since the heli needs to be perfectly aligned to fire rockets ive given up on that idea and ill just missile the thing. The missiles track and follow where the gunner is looking, when i have the script fire them and im the gunner they curve to where im looking, so no need for a laser pointer. (i guess?) I thought a dowatch and dotarget followed by a manual missile fire would lead to a hit. Sometimes the AI autofires missiles from a distance on their own, when they do they hit. So i know the vehicle is capable of hits. But they dont always fire missiles and dont always fire at all -_- Edited September 20, 2013 by masterfulninja Share this post Link to post Share on other sites
Tajin 349 Posted September 20, 2013 weapons[] = {"gatling_30mm", "missiles_SCALPEL", "rockets_Skyfire"}; As seen here: http://browser.six-projects.net/cfg_vehicles/Heli_Attack_02_base_F/config?version=72 So "missiles_SCALPEL" is what you need. Share this post Link to post Share on other sites
Gekkibi 11 Posted September 20, 2013 The classname for the weapon is "missiles_SCALPEL". Edit: Damn, ninja'd... ;) Share this post Link to post Share on other sites
masterfulninja 10 Posted September 21, 2013 Alright, Ive got the fireattarget command working with "missiles_SCALPEL", the missiles fire on command but still aren't tracking. Ive tried using dowatch, dotarget, assignedTarget, and laserTarget, none seem to be working. heli1 doWatch mg1; mg1 = assignedTarget heli1; heli1 dotarget mg1; mg1 = laserTarget heli1; Share this post Link to post Share on other sites
masterfulninja 10 Posted September 22, 2013 Well, I've even tried just scripting the cannon to fireattarget to see if it would aim at my targets and it wont even do that, just fires blindly into nothing. I don't get what I'm missing here, i guess ill just give up on helicopters... Share this post Link to post Share on other sites