Jump to content
Sign in to follow this  
weedman

Making AI aircraft drop flares

Recommended Posts

Hey all

just a quick one, does anyone know how to make an ai aircraft drop flares and if so can you increase the intervals of the drop?.

Kind regards

Share this post


Link to post
Share on other sites

sorry to bump my thread, did countless hours of searching and no luck, please someone help me with this i am at a loose end here.

Edited by weedman

Share this post


Link to post
Share on other sites

thankyou ever so much nikita320106, however throws me a error "missing ]". Before you ask yes i did rename my c130 to _hely but no luck, can you improvise a bit and can you increase the flare count?

Edited by weedman

Share this post


Link to post
Share on other sites

I think it's this:

_hely action ["useWeapon", _hely, driver _hely, 0];

too many quote marks.

Add flares to the AH64D

Weapon Class(1) = CMFlareLauncher

Magazine Class(1) = 60Rnd_CMFlareMagazine

See if the usual addMagazine / addMagazineTurret works?

Not tried it meself.

edit - I notice the AH1Z has a 120Rnd_CMFlareMagazine

Edited by PELHAM

Share this post


Link to post
Share on other sites

You might have to use a logic to "perform" the action. What I use in a script:

_firelogic action ["useWeapon", _chopper, driver _chopper, 0];

where _firelogic refers to a game logic. Not sure if required, I just did it this way.

Share this post


Link to post
Share on other sites

This works well in a trigger:

heli1 action ["useWeapon", heli1, driver heli1, 0];

just name the helicopter heli1.

Can anyone advise a loop to make it do it every 5 seconds - I cant get an sqf loop to work with this:

while {alive _heli1} do {
_heli1 action ["useWeapon", _heli1, driver _heli1, 0];
sleep 5;
};

edit: Is the above a loop? I can find many in sqs but no good examples for sqf - which should I be using?

Edited by PELHAM
additional info

Share this post


Link to post
Share on other sites

Cracked it - Xeno you're my Hero! He mentions this infinite loop here:

http://forums.bistudio.com/showthread.php?t=79556&highlight=infinite+loop

AH64D

To load extra flares:

{this addMagazineTurret ["60Rnd_CMFlareMagazine",[-1]];} forEach [1,2,3,4,5,6,7,8];

This gives 13.5mins / 810 seconds flying time with flares for the script below.

30 pairs flares x 3 seconds x 9 magazines = 810

Name helicopter h2

To eject a pair of flares every 3 seconds:

BlaBla = {
   while {alive h2} do {
       sleep 3;
       h2 action ["useWeapon", h2, driver h2, 0];
   };
};
call BlaBla;

CAUTION: you need a sleep in a loop or the game crashes - too many CPU cycles.

Looks cool against a night / dusk / early morning sky.

I have seen video of older Apaches without the modern missile launch detection system using this constant flare ejection over high threat areas. Nice to be able to replicate it.

edit:The launcher on the AH64D will take the 120Rnd_CMFlare_Chaff_Magazine from the F35B. So to add chaff and flares to the AH64D do:

this removeMagazineTurret ["60Rnd_CMFlareMagazine",[-1]]; {this addMagazineTurret ["120Rnd_CMFlare_Chaff_Magazine",[-1]];} forEach [1,2,3];

Edited by PELHAM

Share this post


Link to post
Share on other sites

Pelham is there an update for this as its no longer running on my updated ArmA2/OA these days.

Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×