本帖最后由 FFUR2007SLX2_5 于 2010-11-20 22:36 编辑
改换sqf,也许这是我所知道的最后方法了......
////follow2.sqf
////使用[跟踪者,被跟踪者] execVM "follow2.sqf"
Private ["_x","_y","_xs","_ys","_follower","_BeingFollowed","_BFGroup","_num","_fxs","_fys"];
_x=[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10];
_y=[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10];
_xs=round (random 20);
_ys=round (random 20);
_follower=_this select 0;
_BeingFollowed=_this select 1;
_BFGroup=group _BeingFollowed;
_num=count units _BFGroup;
if (_num>1) then {goto "Check"} else {goto "Exit"};
#Check;
if (isMultiplayer) then {goto "Start"};
#Start;
_fxs=_x select _xs;
_fys=_y select _ys;
_follower move [(getpos leader _BFGroup select 0)+_fxs,(getpos Leader _BFGroup select 1)+_fys,getpos leader _BFGroup select 2];
sleep 1;
goto "Start";
#Exit;
exit; |