katipo66 94 Posted February 13, 2016 Im making a mission that has a jet on a guard waypoint for ambience, this works really good, but i was wondering if its possible to make better? eg Russian Air Force better! Currently i have this in the jets init: nul = this spawn { while {alive _this} do { _this setFuel 1; sleep 60 } }; nul = this spawn { while {alive _this} do { (vehicle _this) setvehicleammo 1; sleep 50} }; allowing it endless fuel and ammunition... this works really good and the jet comes and goes when needed, but for impact i would like it to also attack infantry with missile and bombs, even if infantry are in buildings and are known about. Currently the jet does attack infantry out in the open with 20mm shells and thats awesome but this mission has units spawn in (random) buildings also.. I have used this along with the above in the planes init this removeMagazines "300Rnd_20mm_shells"; but jet will just ignore infantry altogether. I use no other mods than CBA and im on stable. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 13, 2016 You could put the setFuel and setAmmo commands inside a single loop, for simplicity. To have them attack infantry simply put this into a file called "shootme.sqf" or whatever you like: params ["_target"]; _laserT = createVehicle ["LaserTargetW", [0,0,0], [], 0, "NONE"]; _laserT attachto [_target, [0, 0, 0]]; _cleanUp = [_target, _laserT] spawn { waituntil {!alive (_this select 0)}; deletevehicle (_this select 1); true }; If your aircraft is blufor then the name of the laser target should be "LaserTargetW". For east use "LaserTargetE", for independent use "LaserTargetI". Call this "shootme.sqf" from the units init line or from wherever you prefer like this: _bombToTheFace = [this] execVM "shootme.sqf"; Note that this might also force other armed ground vehicles to fire at the unit. Cheers 1 Share this post Link to post Share on other sites
katipo66 94 Posted February 13, 2016 Hey Grumpy OM, Thanks for the detailed reply, i tried that but it doesnt seem to work, jet just flies around area in guard behavior but drops no bombs and fires no missiles. Scenario is AAF vs FIA with friendly set to nobody in the INTEL area, i have LaserTargetI setup in the script I got a test mission here Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 13, 2016 Ah, I see. You applied it to the jet, so the lasertarget is being attached to the jet. You need to apply it to every unit you want the jet to shoot, should have been more specific here. Remove the sqf execution from the jet and use this in the jets init instead: {if (side _x isEqualTo west) then {_bombToTheFace = [_x] execVM "shootme.sqf"}} foreach allUnits; Cheers Share this post Link to post Share on other sites
katipo66 94 Posted February 13, 2016 Ok great, i will test first chance. Cheers EDIT: This works great, just need to remember if the jet is Independent & not friendly to Blufor then you need to use "LaserTargetE" 1 Share this post Link to post Share on other sites
KSAssler 0 Posted March 7, 2016 I'm sorry, cause I'm not able to create new Topics yet, but I've got a similar problem since 1.56 with the vanilla hellcat.It doesn't attack any unit, no matter if the enemy is infantry, vehicle or another heli.Several CSAT enemies (infantry team, ifrit) on the ground and Orca in the air.Hellcat pilots with max skill and wp seek&destroy (openfire&aware)The hellcat comes from 1000m away and when the enemies are revealed - it stops and hovers till it's shot down!?When there are backdoor gunners, they try to engage, but the pilot never tries to use the main weapons of the heli.When the heli is a Littlebird, all works as in former versions:The heli reveals the enemies itself, flies away, turns around and attacks with minigun and rockets.The hellcat did the same in a self made mission before 1.56.Now It seems that it doesn't 'want' to engage and cancels any attack and the seek&destroy - movement.The only way to force an attack is with some step-by-step commands like...reveal, dowatch, dotarget, dofire... in a script, but this is absurd!When I board a vehicle, the hellcat aborts the attack and falls back in 'do-nothing-routine' without any attack.THANKS VERY MUCH! Share this post Link to post Share on other sites
mrcurry 470 Posted March 7, 2016 First off KSAssler: If you want help, give people a chance to answer. Don't go spamming old topics with the same post. 1 post is enough. Now about the problem at hand. I'm not home right now but I'll look into this tonight. In the meantime, are you using the camouflaged or green version of the hellcat? Share this post Link to post Share on other sites
KSAssler 0 Posted March 7, 2016 Thanks mrcurry for your reply. Sorry for my impatience :( I'm using the camouflaged Version (vanilla) First time I noticed this odd behaviour because this Heli was part of a Mission (Altis on fire by Meatball) Then I tried it on an empty airfield with only a few units and the Hellcat acts in the same way - no attack, just hovering Share this post Link to post Share on other sites
mrcurry 470 Posted March 7, 2016 Ok, I can confirm it seems to be a bug. The problem seems to be that a Hellcat Pilot will not engage targets, even those assigned by the player. I have not been able to reproduce the effect with any other vehicles but I put a bug report in the appropriate forum. Link to: Bug report Share this post Link to post Share on other sites
Vrae 6 Posted February 26, 2018 Okey, so thanks to the people here I arrived at a solution I used a 'sphere 100cm' object (without the texture so it is invisible) to hang the laser target on, in the init I put: _laserTarget = "LaserTargetE" createVehicle (getposatl this); _laserTarget attachTo [this, [0, 0, 0]]; _EHmissle = _laserTarget addEventHandler ["IncomingMissile", {[(_this select 0)] spawn {sleep 10; deletevehicle (_this select 0);};}]; the enemy craft should lock on the laser target, drop a misslie on it, 10 seconds after the laser is deleted so the plane can move to another target I copy the ball/sphere wherever I need the enemy to blow a hole, thanks Share this post Link to post Share on other sites
avibird 1 36 Posted February 26, 2018 This may be a simple approach but it worked in ofp days. I used to put a destructible items within a building for example barrels around the perimeter of the buildings then I would put destroy waypoints on each of the items followed by indestructible item in the middle of the building like a flagpole and place a final destroy Waypoint there. I usually used a group of helicopters to attack the buildings. It worked great back then. My script in knowledge has improved very slightly over the years but I think it should still work. ? Share this post Link to post Share on other sites