aeroson

Untitled

Aug 31st, 2013
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1.  
  2. _this setDamage 0.9;
  3. _this allowDamage false;
  4.  
  5. if(!isServer) exitWith {};
  6.  
  7. _anims=["InBaseMoves_Lean1"]; // PUT ANIMS HERE
  8.  
  9.  
  10. _positions=[];
  11. _num = 0;
  12. _maxNum = 10;
  13. while {_num < _maxNum } do {
  14. _marker = format["tp_%1",_num];
  15. if ((getMarkerType _marker) != "" ) then {
  16. _positions set[count _positions, getMarkerPos _marker];
  17. _maxNum = _num + 10;
  18. };
  19. _num = _num + 1;
  20. };
  21.  
  22.  
  23. {
  24. _this disableAi _x;
  25. } forEach ["TARGET","AUTOTARGET","MOVE","ANIM","FSM"];
  26.  
  27. _newMove = {
  28. kng_freeze_anim = (_anims call BIS_fnc_selectRandom);
  29. };
  30.  
  31. call _newMove;
  32.  
  33. _this spawn {
  34. while{true} do {
  35. _this switchMove "InBaseMoves_Lean1";
  36. _this switchMove kng_freeze_anim;
  37. sleep .05;
  38. };
  39. };
  40.  
  41.  
  42. while{true} do {
  43. _r=floor(random(100));
  44. if(_r>10 && count _positions>0) then {
  45. call _newMove;
  46. _this setPos (_positions call BIS_fnc_selectRandom);
  47. sleep 30+random(40);
  48. } else {
  49. call _newMove;
  50. _dist = 5;
  51. _t = (playableUnits call BIS_fnc_selectRandom);
  52. _pos = getPos _t;
  53. _dir = getDir _t;
  54. _pos set[0,(_pos select 0)+sin(_dir)*_dist];
  55. _pos set[1,(_pos select 1)+cos(_dir)*_dist];
  56. _this setPos _pos;
  57. _this setDir (_dir-180);
  58. sleep 0.5;
  59. };
  60. };
Advertisement
Add Comment
Please, Sign In to add comment