OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: trooper543 on 27 Oct 2007, 14:13:49

Title: Request Help - Information being passed by one unit to another group
Post by: trooper543 on 27 Oct 2007, 14:13:49
Hi there All

Currently trying to establish if a unit can pass on information of enmy units to another group. What i am tryding to do is a have a spotter plane / helicopter at 1000 + up in the air circling the  area and reporting enemy postions back to troops on the ground. Is this possible do, or is this something that i would need a script to do.

It would be nice to have the Spotter Aircraft call out postions and direction of movement
Please note that the Spotter Aircraft and Grousp are not connected

Any help would be most appreciated
Title: Re: Request Help - Information being passed by one unit to another group
Post by: Spooner on 27 Oct 2007, 15:54:02
The only way to do it automatically would be to have the spotter aircraft in the same group as the soldiers. If you are happy using someone else's script, then something like GroupLink II shares information between groups for you.

To do it yourself, I'd go through the list of nearTargets (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=n#nearTargets) for the plane every few seconds and for each one, reveal (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=r#reveal) it to the group of soldiers. If you want the aircraft to call out positions and directions, then there are a few functions (http://www.ofpec.com/ed_depot/index.php?action=list&game=ArmA&type=fu&cat=xyz) at OFPEC that could help: SPON_directionName, GetRCoord and/or GridCoord. I think you'd need to make sure the server view distance was enough to allow a plane at 1000+ metres up in the air to actually see anything on the ground.
Title: Re: Request Help - Information being passed by one unit to another group
Post by: trooper543 on 27 Oct 2007, 16:16:48
Thanks for that Spooner !

I will give the Grouplink 11 a try and see if that will work.

this for a SP mission mate , i wouldnt know where to begin for craeting a multiplayer mission  :dunno: ??? :dunno:



But thanks a million for the help much appreciated

Title: Re: Request Help - Information being passed by one unit to another group
Post by: Spooner on 27 Oct 2007, 17:09:09
Still, in SP if the player set viewdistance to 500m, then a plane at 1000m altitude wouldn't see anything on the ground. If you are relying on the plane being able to spot things from that range, you probably need to use setViewDistance (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#setViewDistance) or you know some player is going to complain that the mission isn't working properly ::).