Jump to content
Sign in to follow this  
avibird 1

Is there a way to limit the planes LOS and or target ranges!

Recommended Posts

My new problem of the day! How to limit a planes LOS and or target range to keep a plane in a set location for CAS during a dynamic mission!

I am almost done with this combat support script for a mission I am working on. One of the last things I need to complete is CAS with jets. Helicopters work fine because the LOS is less then the jets and they will stay pretty close to the area called in for support during the mission. The planes will fly all over the map engaging enemy units and FOB's.

The issue is my mission is open sandbox with random enemy patrols and FOB's around the map using DAC script. The main targets are all the towns on the map and you need to liberate one town at a time like in domination (which I still love as a mission) PS the mission is called Domination company of heroes.

Is there a way to limit the planes LOS or target range without making a whole new script to control the target elements of the planes.

I have tryed different combat modes blue,white,green and yellow, I have tryed using this command - waypointAttachVehicle vehicle player, which should make the jets follow the player but does not work on the jets. I have tryed the "HOLD" waypoint and it works somewhat at times but reduces the combat efficiency of the jets. Like always thanks for any input on this. AVIBIRD

Share this post


Link to post
Share on other sites

Having aircraft flying around wasting fuel and CPU resources is never a good idea but if thats what you want you need a loop running to setBehaviour "CARELESS" and setCombatMode "BLUE" then to switch it back.

while {alive nameJet} do {
if (CASvar == 0) then {groupNameJet setBehaviour "CARELESS"; groupNameJet setCombatMode "BLUE";
//set a current waypoint
};
if (CASvar == 1) then {
//set a current waypoint
if (nameJet distance player < 500) then {groupNameJet setBehaviour "AWARE"; groupNameJet setCombatMode "RED"};
sleep 5;
};
}

set the varaiable CASvar =0 or CASvar=1 with an addaction or something?

Better method is this bomb / strafe & hunt / strafe single pass:

XoHCZ6WUSGo

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2266988&viewfull=1#post2266988

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2267304&viewfull=1#post2267304

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2267989&viewfull=1#post2267989

Edited by Mattar_Tharkari

Share this post


Link to post
Share on other sites

Can also use this to make sure they never run out of fuel;

nul = this spawn { while {alive _this} do { _this setFuel 1; sleep 60 } };

Share this post


Link to post
Share on other sites
Having aircraft flying around wasting fuel and CPU resources is never a good idea but if thats what you want you need a loop running to setBehaviour "CARELESS" and setCombatMode "BLUE" then to switch it back.

while {alive nameJet} do {
if (CASvar == 0) then {groupNameJet setBehaviour "CARELESS"; groupNameJet setCombatMode "BLUE";
//set a current waypoint
};
if (CASvar == 1) then {
//set a current waypoint
if (nameJet distance player < 500) then {groupNameJet setBehaviour "AWARE"; groupNameJet setCombatMode "RED"};
sleep 5;
};
}

set the varaiable CASvar =0 or CASvar=1 with an addaction or something?

Better method is this bomb / strafe & hunt / strafe single pass:

XoHCZ6WUSGo

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2266988&viewfull=1#post2266988

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2267304&viewfull=1#post2267304

http://forums.bistudio.com/showthread.php?143761-A10-gun-run-script&p=2267989&viewfull=1#post2267989

Hey Mattar That's not want I was going for as well as I need to get keep the CPU resources at the best possiable level due to the dynamic nature of the mission I am working on. What I am trying to get to work is CAS in my current AO using jets. Helicoppers work fine but the jets just target anything in they LOS. The issue is my mission is open sandbox with multiple random enemy FOB's and patrols all over the map. If I am trying to take a town and need CAS with the jets they will hit a few targets sometimes but will fly off to hunt other targets not in my current AO. The Jets will only give you CAS ~ 3 minutes then return to base and get deleted from the mission. If you want to recall the jet CAS you must wait ~ 25 minutes to do so. If the jets were to just fly around on blue combat mode there will jsut get shot down from the random partols and FOB's on the map. I have seen other CAS with jets stay in the AO but the mision were not very dynamic in nature linear kill that then go here and destroy that. Maybe this can't be done with a simple fix and anything over that is over my paygrade and would be like pissing in the wind lol for me. AVIBIRD

I also have a similar script already in the mission for a single A10 to drop a payload on a target if needed. I was trying to get a squad of fighters to attack a main city/town before the ground units would move in. Could I add a few more planes to your script? I am checking out your demo now(:

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites

Well all the above is why the preferred method is to spawn a jet then delete it after you have finished with it. The auto flares usually keep it safe from harm and delete it with this:

{deleteVehicle (vehicle _x)} foreach units _groupName; {deletevehicle _x} foreach units _groupName;

That script I posted for you can be called as often as you like and wherever you like - it's as dynamic as you please - edit it however you want, I don't mind at all.

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  

×