Forum Jump :

Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 60
In-game name: Kobayashi Maru

 
#178443 Posted at 2015-04-02 19:44        
     
Sorry to check this point :What is your opfor_group ?
If you write this in a unit name field, you just create a variable for this unit, even if it's the leader of the group. To create a variable for a group, write in the init (not name) field of the leader:
opfor_group = group this
So, all grouped units will move each time you order something to this group, even if leader dies after that.

If this step is OK, you can't use doMove with a group name. BI functions are precise and you must have a look each time you want to script. There are so much differences with the move , doMove, addWaypoint....
doMove is waiting for a unit or an array of units. So, for a group you must write:
units opfor_group doMove ....

If you don't want to cope with your tons of groups just write:
{ if (side _x == east) then {units _x doMove (getMarkerPos "Blackhawk_Crashed")}} forEach allGroups;

Be sure all red groups (all red units in fact because a unit is also a group) present on map will move to your position.
If you want to restrict at some locla units, add a radius condition:
{ if (side _x == east && (leader _x distance ((getMarkerPos "Blackhawk_Crashed") < 600) then {units _x doMove (getMarkerPos "Blackhawk_Crashed")}} forEach allGroups; // limited up to 600 m

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS