Jump to content
Sign in to follow this  
Kommiekat

seek and destroy waypoint

Recommended Posts

Hi again,

I've got two attack helicopters flying from the the ocean, one South of Kamenka and one South of Komarova.

There are AA and hostile groups just a little North of those towns for the Attack helicopters to take out.

Problem is, the Attack helicopter at Komarova is also wondering a bit too close to Balota airport and taking out the baddies there which is NOT what I want it to do.

I only have two waypoints for them: SEEK AND DESTROY at the AA locations and the other is placed way South in the ocean as HOLD for them to run out of fuel (I know it sounds cruel, but I won't be needing them and set the fuel levesl quite low. Is there a more merciful way of doing that?).

I've got baddies at Balota set up for a later mission for the player to tend to as an Objective.

Any advice what to do?

Attack helo's are set to AWARE and sometimes fire missiles from off-shore and that is fine, but I want them to play at the waypoint only and return South.

Thanks for your help!

KK

Share this post


Link to post
Share on other sites
Problem is, the Attack helicopter at Komarova is also wondering a bit too close to Balota airport and taking out the baddies there which is NOT what I want it to do.

Try this mate....

Add this to the init of the leaders of the baddies groups.

MakeBaddiesHostile = false; nul = [group this] execVM "test.sqf";

Create a script in your mission folder called test.sqf or whatever you want... and put this in it....

test.sqf:-

_group = _this select 0;

{_x setcaptive true} foreach units _group;
waituntil {MakeBaddiesHostile};
{_x setcaptive false} foreach units _group;

At the waypoint where you want the choppers to start attacking the baddies put this in the On Act.

MakeBaddiesHostile = true;

********

...and the other is placed way South in the ocean as HOLD for them to run out of fuel (I know it sounds cruel, but I won't be needing them and set the fuel levesl quite low. Is there a more merciful way of doing that?

For this part the helos must have names.

If the helos are in the same group...this will delete them when they reach the waypoint. Put it in the waypoint's On Act.

{deletevehicle _x} foreach crew [b]helo1[/b]; deletevehicle [b]helo1[/b];{deletevehicle _x} foreach crew [b]helo2[/b]; deletevehicle [b]helo2[/b];

If they are not in the same group.....well.... I'm sure you'll figure that out!

Hope that helps.

EDIT: The way this will work is the baddies will shoot at the choppers but the choppers won't shoot at the baddies until MakeBaddiesHostile = true

Edited by twirly
Clarity

Share this post


Link to post
Share on other sites

Thanks Twirly. You're one of the most helpful here.

I'll test it out and get back to you later!

KK

Share this post


Link to post
Share on other sites

Hope it works for you...

Just to let you know...I just made a change to the code....probably since you've read it. I had a variable name that was wrong.

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  

×