Jump to content
bLAcKmAgE87

flyInHeight not limited to any particular height

Recommended Posts

?imw=5000&imh=5000&ima=fit&impolicy=Lett

However... they will fly up automatically quite a bit before settling back into their designated height.

 

Spoiler

	
	
	tarZ = []  ;
	tarZ pushBack targetAnimal ;

	triggerFireN = 1 ; 

	private _area = ( vehicles inAreaArray 'ladyS' ) ;   
	private _alsocount = count ( allUnits inAreaArray 'ladyS' );    
	private _alsocountV = count ( vehicles inAreaArray 'ladyS' ); 


	
	

	private _modulZX = modulZX ;
	private _modulZS = modulZS ;
	_modulXXs = ( modulXX ) ;
	_modulXX = ( _modulXXs - 1) ;


	
	hint ( str modulZX + " z " + str modulXX  + " x " + str modulZS + " s " + str racksModulZ  + " r " + str racksModulZZ  + " r ." );
	//sleep 7 ;


	_groups = [] ; 
	_objects = [] ; 
	_Vehicles = [] ;   
	{   
		_Vehicles pushBack _x  ;   
	} forEach _area ;  
	private _namr = 'jop_' ;  
	private _namr2 = 'zop_' ;    
	
	
	private _count = 1 ;    
	private _blam  = '' ;  
	private _blamo  = '' ;    
	{     	
		
		_blam = _namr +  (str _count) ; 
		   
		_x setName _blam ; 
		
		stag = _count ;
		
		_x = missionNamespace setVariable[_blam, _x];     
		_groups pushback  _blam ;    
		_objects pushback  _blam ;   

		_count = _count + 1;  
		
	} forEach  _Vehicles  ;   
_count = _count - 1;   

_startSen2 = 'jop_'  ;     
_startTar2 = 'leadOne' ;     
        
private _finSen2 = '';      
private _finTar2 = '';     
private _mySpot = getPos leadOne  ;   
private _doubleCo = 0 ;   

   
what = ( _mySpot  select 0 )  ;   
what2 = ( _mySpot  select 1 )   ;  
  

hold = what ; 
hold2 = what2 ; 

stepper  = 1 ;


stepperx  = 1 ;
_bang = 1 ;
_hox = 0 ;
_waitTimeToFireAfterData = 3 ;
hint ('firing in ' + str _waitTimeToFireAfterData) ;
sleep _waitTimeToFireAfterData  ;


wallx = 1 ; 



ranCirRad = 12;
ranCirInner = 330 ;

_markerTargetZ = createMarker['targetZone', ( _mySpot )] ;
_markerTargetZ setMarkerShape 'ELLIPSE';	
_markerTargetZ setMarkerSize [ ranCirRad , ranCirRad];

for [{private _i = 1},{ _i <= _modulZX    },{_i = _i + 1}] do
{    
	
	scopeName 'forShoot' ;
	for [{private _j = 0},{ _j < _modulZS    },{ _j = _j + 1}] do
	{         
		_randomZ = random 610  ; 
		_randomXY = random ranCirRad ;
		
		
		_randomXY = _randomXY + ranCirInner ;
		private _centerZ = _mySpot getPos [ _randomXY , _randomZ ] ;
		
		
		
		passSx = ( _centerZ  select 0 )   ;
		passSy = ( _centerZ  select 1 )    ;
		
		
		sweet = _j ; 
		if( sweet == _modulXX && _i == _modulZX ) then 
		{
			breakTo 'forShoot' ; //this shit sux and causes it to move around from _i
		} ;

		
		
		if(_hox == 1 ) then
		{	
			wallx = wallx + _modulZX ; 
			_bang = wallx ; 
		} ;
		if( _hox == 0 ) then
		{	
			
				
			_bang = _i ;
			_hox = 1 ; 
		} ;

			
		

		what = passSx ;  
		what2 = passSy  ; 
	
		_finSen2 = _startSen2 + str ( _bang ) +'' ;  
    
		_finTar2 = _startTar2 ;
      
		_finSen2 = missionNamespace getVariable [_finSen2 , objNull];    

		_finTar2 = missionNamespace getVariable  [_finTar2 , objNull ];   
		
		_finTar2 setPos[ what , what2 , getPos leadOne select 2 ];   

		_myShot = getPos leadOne ;

		_faze = _finSen2 getDir targetAnimal ;
		
		_faze = _faze ;
		
	
		distanceTo = _finSen2 distance2D targetAnimal ;


		private _myCur = getPosASL _finSen2 ;
		private _bop = 33 * _i ;

		
		sleep .01 ;

		
		_nowX =  floor ( _myCur select 0 )   ; 
		_nowY = floor ( _myCur select 1 )  ;
		_nowZ =  ( _myCur select 2 ) + _bop ;
		_newPosAB = [_nowX,_nowY,_nowZ] ;

		private _posZ = _newPosAB; 

		
		
		_finSen2 action ["engineOn", vehicle _finSen2 ];
		_finSen2  allowFleeing 0;


		



		 _finSen2 move getPosATL _finSen2;
		_finSen2 flyInHeight 4 ;

		_finSen2 disableAI "AUTOCOMBAT" ; 
		
		what = hold ;  
		what2 = hold2; 
		
		
	};

		stepperx  = _i + 1 ;
		_hox = 0 ; 	
		wallx = stepperx ;
		
		
		

};   

hint('finished attempt' ) ;
sleep 2 ;

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×