Forum Jump :

Author Message


Posts: 1589
Rank:


Level: Member

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

 
#195673 Posted at 2017-01-05 23:26        
     
Why all that "mess"?
I'm not sure you have to mix checks for key pressed + unit selected !

[] spawn {
  while {true} do {
   sleep 0.5;
   if (unit1 in groupSelectedUnits unit1) then {
     waitUntil { !(unit1 in groupSelectedUnits unit1) ); // optional
     unit1 doMove getPos h1;
   };
  };
};

If you want only one unit selected as condition:
[unit1] isEqualTo groupSelectedUnits unit1


or even:
in radio alpha:
unit1 doMove getpos h1

:-|

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