Results 1 to 4 of 4

Thread: seek and destroy waypoint

  1. #1
    Master Gunnery Sergeant Kommiekat's Avatar
    Join Date
    Aug 3 2009
    Location
    Hong Kong
    Posts
    1,091

    seek and destroy waypoint

    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

  2. #2
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    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.

    Code:
    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:-
    Code:
    _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.

    Code:
    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.

    Code:
    {deletevehicle _x} foreach crew helo1; deletevehicle helo1;{deletevehicle _x} foreach crew helo2; deletevehicle helo2;
    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
    Last edited by twirly; Sep 15 2011 at 07:45. Reason: Clarity

    "Learn by doing!" - Quoted from a post by Imutep

    OUTERRA - OUTERRA - OUTERRA - OUTERRA - BLOWMIND!

  3. #3
    Master Gunnery Sergeant Kommiekat's Avatar
    Join Date
    Aug 3 2009
    Location
    Hong Kong
    Posts
    1,091
    Author of the Thread
    Thanks Twirly. You're one of the most helpful here.

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

    KK

  4. #4
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •