Advertisement
Gamenator

Test code

Apr 7th, 2024
1,128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.04 KB | None | 0 0
  1. {null=[]spawn{
  2. if(((vehicle player iskindof "Plane")||(vehicle player iskindof "Helicopter")) && (side player == west))then{
  3.  
  4. _i=10000;    
  5.    
  6.        
  7.   if (( getposatl vehicle player) select 2 > 200) then{    
  8.    private _Z=( getposatl vehicle player) select 2;
  9.      
  10.   for "_i" from 0 to 4 do{  
  11.    if (( getposatl vehicle player) select 2 > 200) then{
  12.      
  13.     private _position = vehicle player getRelPos [900,180];
  14.     private _newPos =_position vectorAdd [0,0,_Z+1000];
  15.  
  16.    
  17.     _missileDir = _newpos vectorFromTo getPosATL vehicle player;    
  18.     _missile = createVehicle ["ammo_Missile_rim162", _newpos, [], 0, "CAN_COLLIDE"];    
  19.     _missile setVectorDirAndUp [_missileDir, [0,0,-1]];    
  20.      
  21.     [_missile, vehicle player] spawn {    
  22.     params ["_missile", "_tgt"];    
  23.     sleep 0.1;    
  24.     _missile setMissileTarget _tgt;    
  25.           };    
  26.     sleep 4;  
  27.     }else{break;};  
  28.   };  
  29.   sleep 7;    
  30.    
  31.     }else{};      
  32.      
  33.    
  34. }
  35. };  }forEach playableUnits;
  36. deletevehicle p1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement