Jump to content
Sign in to follow this  
tilyard

Limiting the range of Static AA and preventing convoy shooting

Recommended Posts

Hi I'm working on a mission where a little bird must play the role of over looking a convoy and relaying the position back to team leader.

I'm using ACE and the AA seems to be attacking the little bird before I can get close to the convoy, so my question is

Is there a way I can limit the AA range, perhaps with a trigger or script to make it not attack unless I enter that area with the little bird? But once I leave the area i want it to seize fire until I enter it again.

I would also like the same thing done for the Convoy in which the little bird must follow, so I don't know how to set the trigger since the convoy is consantly moving and I'd like it to be a 300-500m range in which if the little bird enters, the convoy will fire.

Edited by tilyard

Share this post


Link to post
Share on other sites

Maybe change behaviour of AA(when you are out of range to careles, AA should not attack). Or remove ammo when you are far away from AA and add when you are close.

Edited by tom3kb

Share this post


Link to post
Share on other sites

I don't know how to do this, still need a reply :)

Share this post


Link to post
Share on other sites

well, the first thing that comes to mind is use "setCaptive" command. make it true so player in heli wont get shot at. set to false for open season :)

something like this.

/*
  Changes setcaptive statis so player will only get shot at when within specified range of vehicle
=====================================================================================================
           //      Execute with: execVM "cap_range.sqf";    //  
*/
private ["_far","_near","_convoy"];

_far = 0;
_near = 0;

// name of truck in convoy to check distance
_convoy = truck1;

while {true} do {

// if player is within 300 meters and in an aircraft shot him down. if not, dont shoot.
if ((vehicle player) distance _convoy > 300 || !(vehicle player isKindOf "Air")) then {_near = 0; _far = _far +1} else {_near = _near +1};; 

    	if (_far == 1) then {player setCaptive true; hint "FAR"}; 

	if (_near == 1) then {_far = 0; player setCaptive false; hint "NEAR"};
sleep 1;
};

PS - the hints in script are just to show that its working. I would delete them when you have it all setup and ready for others to play.

OPTION 2:

use "attachto" command http://community.bistudio.com/wiki/attachTo

trigger1 attachTo [truck1]; 

and attach a trigger to a vehicle in convoy and in the condition field put

(vehicle player) in thislist && vehicle player isKindOf "Air" 

(that way only player in heli can trip trigger not a player on ground near convey if you want) then in on activation field put

{player setCaptive false} forEaach thislist

on deactivation field put

{player setCaptive true}  forEaach thislist

Edited by Nimrod_Z

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  

×