Jump to content
bLAcKmAgE87

spawn some airborne waves

Recommended Posts

init.sqf

 

// 		init.sqf by bLAcKmAgE87

_markersC = allMapMarkers;
allCounts = count (_markersC) ;
allCounts = allCounts  ;
_marks = allCounts ;
heads = 40 ;
_heads = heads ; 
droppingAlt = 1000 ;
_heights = droppingAlt ;
[_marks,_heads,_heights] execVM "spawner.sqf";

	

//notice that is does not read the marker names but guesses
//which sucks because markers can have all sorts of non-automatic namess

spawner.sqf...
 

params ["_marks","_heads","_heights"];


//break things apart while connecting objects 
//so far i got to work pretty well except with circles...which are just treated like any other square
//try and get all markers and types and names		 
	 
marksup = _marks ;
headsup =  _heads ;
droppingAltZ = _heights ; 

private _countZ = 0 ;
for [{ _i = 0 }, { _i < headsup }, { _i = _i + 1 }] do
{
	
	

	
	
	
	_groupZ = createGroup east ;
	
	_namelessZ  = "zol_"+ (str _countZ) ; 
	_groupZ setGroupId [(str _namelessZ)]; 
	
	private _blah = "" ; 
	private _nameZ = "zoz_" ;
	_blah = _nameZ +  (str _countZ);

	bob = floor (random marksup );
	private _blotch = "";
	_blotch = missionNamespace getVariable [ _blotch , objNull];
	_blotch = "marker_" + (str  bob );
	 
	_sizeZone = markerSize _blotch ;
	_sizeZoneX = (_sizeZone select 0)  ;
	_sizeZoneY = (_sizeZone select 1) ;
	

	ranSel = floor (random 4 );
	randX = 0 ;	
	randY = 0 ;	
	bun1 = 0 ;
	bun2 = 0 ;
	negHyp = 0 ; 
	if(ranSel == 0) then
	{
		randX = (random _sizeZoneX ) ;
		randY = (random (_sizeZoneY)  ) ;	
				
	};
	if(ranSel == 1) then
	{
		
		randX = -(random (_sizeZoneX) ) ;		
		randY = (random (_sizeZoneY)  ) ;
		bun1 = 1 ;	
		negHyp = 1 ;
	
	};
	if(ranSel == 2) then
	{
		randX = (random _sizeZoneX ) ;	
		randY = -(random (_sizeZoneY)  ) ;	
		bun2 = 1 ;	
	};
	if(ranSel == 3) then
	{
		randX = -(random (_sizeZoneX) ) ;	
		randY = -(random (_sizeZoneY)  ) ;
		bun1 = 1 ;
		bun2 = 1 ;
		negHyp = 1 ;		
	};

	legToMarkx = ( randX )  ;
	legToMarky = ( randY )  ;
	
	
	private _posW  = markerPos _blotch  ;
	
	
	dixP = (markerDir _blotch);
	dixP = ( (360 - (dixP) ) - 90) ;
	
	dixPP = ( (atan( legToMarky / legToMarkx) )) ;

	squd = (legToMarkx ^ 2) + (legToMarky ^ 2) ;
	squd = sqrt squd ;
	if(negHyp == 1) then
	{ 
		squd = -(squd) ;
	};
	negHyp = 0 ; 
	legZx =  0  ;
 	legZy =  0  ;

	dixx =  (dixP + dixPP - 90)   ;
	legZxT =  (squd * (cos dixx ) )   ;
 	legZyT =  (squd * (sin dixx ) )  ;
	
		legZx = legZxT    ;
 		legZy = legZyT    ;
	
 	

	rah1 =  0 ; 
	rah2 =  0 ;
	whatx =   0 ;     
	whaty =   0 ;       
	whatz =   0 ;

	 
	rah1 = ( legZx  ); 
	rah2 = ( legZy  ) ;
	if(bun1 == 1) then
	{
		rah1 = (rah1) ;
	};

	
	if(bun2 == 1) then
	{
		rah2 = (rah2) ;
	};

	whatx = ( _posW select 0) + (rah1)  ;     
	whaty = ( _posW select 1) + (rah2)   ;       
	whatz =  droppingAltZ  ;



	private _posNew = [(whatx),(whaty),(whatz)] ;
	_blah = missionNamespace getVariable [ _blah , objNull];
 	
	 _blah = (_groupZ) createUnit [ "O_sniper_F" , _posNew,[],0,"CAN_COLLIDE" ];   
	
	_blah setFormDir ( _blah getRelDir player) ;
	_blah spawn bis_fnc_tracebullets ;
	[_blah] execVM "dresser.sqf" ;
  	sleep (.4); 
	_countZ = _countZ + 1 ;
	
	randX = 0 ;	
	randY = 0 ;	
	bun1 = 0 ;
	bun2 = 0 ;
	
};




....dresser.sqf

 

// 		 dresser.sqf by bLAcKmAgE87

params ["_blah"];
// "Exported from Arsenal by bLAcKmAgE87";

// "[!] UNIT MUST BE LOCAL [!]";
if (!local _blah) exitWith {};

// "Remove existing items";
removeAllWeapons _blah;
removeAllItems _blah;
removeAllAssignedItems _blah;
removeUniform _blah;
removeVest _blah;
removeBackpack _blah;
removeHeadgear _blah;
removeGoggles _blah;

// "Add weapons";
_blah addWeapon "arifle_AK12_GL_F";
_blah addPrimaryWeaponItem "optic_ERCO_blk_F";
_blah addPrimaryWeaponItem "30Rnd_762x39_AK12_Mag_F";
_blah addWeapon "hgun_ACPC2_F";
_blah addHandgunItem "muzzle_snds_acp";
_blah addHandgunItem "acc_flashlight_pistol";
_blah addHandgunItem "9Rnd_45ACP_Mag";

// "Add containers";
_blah forceAddUniform "TCGM_M_OctocamoSuit_HexU";
_blah addVest "min_rf_lite_vest_M_black";
_blah addBackpack "B_Parachute";

// "Add binoculars";
_blah addMagazine "Laserbatteries";
_blah addWeapon "Laserdesignator_02";

// "Add items to containers";
for "_i" from 1 to 2 do {_blah addItemToUniform "FirstAidKit";};
_blah addItemToUniform "MineDetector";
for "_i" from 1 to 2 do {_blah addItemToUniform "9Rnd_45ACP_Mag";};
for "_i" from 1 to 3 do {_blah addItemToUniform "30Rnd_762x39_AK12_Mag_F";};
for "_i" from 1 to 3 do {_blah addItemToUniform "1Rnd_HE_Grenade_shell";};
_blah addGoggles "mef_od_shemagh";

// "Add items";
_blah linkItem "ItemMap";
_blah linkItem "ItemCompass";
_blah linkItem "ItemWatch";
_blah linkItem "ItemRadio";
_blah linkItem "O_UavTerminal";



Just wanted to share with ya'll a good example of how to break up some of the script and make it more useful for stuff. Just put any marker down. And create three files....init.sqf , spawner.sqf, and dresser.sqf ... and change it up...
The markers can be turned in any direction... any size... you can also just spawn them on the floor...
Virtual North... is weird.. but there ya go. 
They should also be facing you... for some serious combat.

this one uses "Octocamo" so try and develop your own airborne suit.. don't forget your p bag or he'll drop 

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

×