OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Delta83_DK on 20 Jan 2012, 23:04:07

Title: Marker following group
Post by: Delta83_DK on 20 Jan 2012, 23:04:07
Hi Guys.

I am trying to make a marker follow a group, so I can track them on the map.

I can make it work with a single unit with this command :

Code: [Select]
"Marker_Man1" SetMarkerType "InfantryTeam"
"Marker_Man1" SetMarkerColor "ColorBlue"
"Marker_Man1" SetMarkerPos GetPos Man1

But I want it to work with every unit in a group, so I tried this code :

Code: [Select]
{_x SetMarkerPos "Marker_EnemyGrp1"} GetPos ForEach units group1
But nothing happens, any ideas?
Title: Re: Marker following group
Post by: F2kSel on 21 Jan 2012, 15:07:54
First the code is wrong it should be

Code: [Select]
{"Marker_EnemyGrp1" SetMarkerPos  getpos _x} ForEach units group1
However it will only display one marker for the whole group you will need to create a separate marker for each unit.
Title: Re: Marker following group
Post by: Delta83_DK on 21 Jan 2012, 18:11:59
Thx for reply  :)