Jump to content

Recommended Posts

Testing befor the Update

adding loot for CUP and Ravage

sE2tCvmJRmeAITXMwI1Kiw.png

aSobm5RPTSarjXl2D5k4KA.png

yN80temWTHSKW93LW4Bdkg.png

adding loot for CUP and Ravage

  • Like 1

Share this post


Link to post
Share on other sites

For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.
Don't try to open this with the simple notepad.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/download/v7.5.4.html

and also use the extra pluggins
(this way will be better , it will give also some certain collours to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

  • Like 1

Share this post


Link to post
Share on other sites

 

Changelog:
 

Version 3.0
Fixed an error to spawn correctly the Attachments
There is availale loot for Vanilla , Unsung , CUP , Ravage and combination of this.

Share this post


Link to post
Share on other sites

Hi I have suggestions you may be like to consider in any of your following updates.

May be you could add a spawn chance option, so a user could choose how rare a piece of loot is. 

Also an addon version would be nice ... it took me forever how to find out how to use a script (surely many users dont know).

 

  • Thanks 1

Share this post


Link to post
Share on other sites
10 hours ago, Schreber said:

suggestions

 

Hello Schreber!

 

An addon version sound nice , i haven't think of this !

 

In this last script , i tried to fix everything more clear , for everyone to be able to edit this , by their own needs.

 

For the rarity of the items :

you can adjust this , by putting double (or more) items  (x2) of this kind that you want more.

 

For the ammount of the items :

you can adjust this , by changing the last number on theese lines:

//lootitems5 items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
lootitems5 = "groundweaponHolder" createVehicle _lootPos5; lootitems5 addItemCargo [_items_loot2, 2];

 

Share this post


Link to post
Share on other sites

Hey there George,

 

i need some help at your script. I want the random Crashsites to spawn a marker too, so that every player can see it on the map. Is this possible?

 

Thnx for your help!

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, CptStampede said:

random Crashsites to spawn a marker too

 

Hello there CptStampede !

 

Yes , it is possible . Hold on to fix this.!

Share this post


Link to post
Share on other sites
40 minutes ago, CptStampede said:

I want the random Crashsites to spawn a marker too

 

 

37 minutes ago, GEORGE FLOROS GR said:

Yes , it is possible . Hold on to fix this.!

 

 

You have to add this , at the bottom of the code:

// Create a Marker at the Crashsite
_GF_marker = createMarker ["Crashsite",getPos _crashsite];
_GF_marker setMarkerType "mil_marker";  //  https://community.bistudio.com/wiki/cfgMarkers
_GF_marker setMarkerSize [1,1];
_GF_marker setMarkerColor "ColorYellow";
_GF_marker setMarkerText "Crashsite";   //  name text

Just if it is possible confirm this.

Thanks !

Share this post


Link to post
Share on other sites

Thnx George yes it works. But i changed number of crashsites in the script and it shows just 1 chrashsite on the map. Any ideas?

 

Thnx

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, CptStampede said:

it shows just 1 chrashsite on the map

 

Hold on I 'll check it and tell you.

Share this post


Link to post
Share on other sites
1 hour ago, CptStampede said:

it shows just 1

 

Now it's working

 

TESTED

//	Create a Marker at the Crashsite
//	https://community.bistudio.com/wiki/cfgMarkers
{
	if (typeOf _x in _Wrecks_array) then 
	{
		_marker = createMarkerLocal ["Crashsite" + str(_forEachIndex), getPos _x];
		_marker setMarkerShapeLocal "ICON";
		_marker setMarkerTypeLocal "mil_marker";	
		_marker setMarkerColorLocal "ColorYellow";
		_marker setMarkerSizeLocal [1,1];
		_marker setMarkerTextLocal "Crashsite"; 
	}; 
} 
forEach allMissionObjects "All";

 

Share this post


Link to post
Share on other sites
19 minutes ago, GEORGE FLOROS GR said:

TESTED

 

The FULL code , with Markers for every Crashsite:

 
 
 
//________________  Author : [GR]GEORGE F ___________ 01.04.18 _____________
 
/*
https://forums.bohemia.net/forums/topic/212505-crashsites_gf-script/
// Please keep the Credits or add them to your Diary
 
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.
Don't try to open this with the simple notepad.
 
You can open this ex:
with notepad++
https://notepad-plus-plus.org/download/v7.5.4.html
 
and also use the extra pluggins
(this way will be better , it will give also some certain collours to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680
 
or use any other program for editing .
*/
 
if(!isServer) exitWith {};
 
systemchat "C r a s h s i t e s   I n i t i a l i z i n g";
 
private ["_marker","_x"];
_x = 0;
 
//Number of the crashsites to spawn (on random)
for "_x" from 0 to (2 + (random 6)) do {
 
//The position of the crashsites will be random
GF_random_pos = [] call BIS_fnc_randomPos;
 
//Wrecks at the crashsites
_Wrecks_array = [
            "Plane_Fighter_03_wreck_F",
            "Land_UWreck_Heli_Attack_02_F",
            "Land_Wreck_Heli_Attack_01_F",
            "Land_Wreck_Heli_Attack_02_F",
            "Land_Wreck_Plane_Transport_01_F",
            "Plane_Fighter_01_wreck_F",
            "Plane_Fighter_02_wreck_F",
            "Plane_Fighter_04_wreck_F",
            "Land_Wreck_Commanche_F"
            ];
_Wrecks = selectRandom _Wrecks_array;
 
_crashsite = _Wrecks createVehicle GF_random_pos;
 
 
//Type of loot
_weapons_Loot = [
            //LightMachineGuns
            "arifle_MX_SW_Black_F",
            "arifle_MX_SW_F",
            "LMG_Mk200_F",
            "LMG_Zafir_F",
            "LMG_03_F",            
            "MMG_01_hex_F",
            "MMG_01_tan_F",
            "MMG_02_black_F",
            "MMG_02_camo_F",
            "MMG_02_sand_F",
            //Apex
            "LMG_03_F",
 
            //AssaultRifles
            "arifle_Katiba_C_F",
            "arifle_Katiba_F",
            "arifle_Katiba_GL_F",
            "arifle_Mk20_F",
            "arifle_Mk20_GL_F",
            "arifle_Mk20_GL_plain_F",
            "arifle_Mk20_plain_F",
            "arifle_Mk20C_F",
            "arifle_Mk20C_plain_F",
            "arifle_MX_Black_F",
            "arifle_MX_F",
            "arifle_MX_GL_Black_F",
            "arifle_MX_GL_F",
            "arifle_MXC_Black_F",
            "arifle_MXC_F",
            "arifle_SDAR_F",
            "arifle_TRG20_F",
            "arifle_TRG21_F",
            "arifle_TRG21_GL_F",           
            //Apex AssaultRifles
            "arifle_AK12_F",
            "arifle_AK12_GL_F",
            "arifle_AKM_F",
            "arifle_AKM_FL_F",
            "arifle_AKS_F",
            //AK x2
            "arifle_AK12_F",
            "arifle_AK12_GL_F",
            "arifle_AKM_F",
            "arifle_AKM_FL_F",
            "arifle_AKS_F",
            //
            "arifle_ARX_blk_F",
            "arifle_ARX_ghex_F",
            "arifle_ARX_hex_F",
            "arifle_CTAR_blk_F",
            "arifle_CTAR_hex_F",
            "arifle_CTAR_ghex_F",
            "arifle_CTAR_GL_blk_F",
            "arifle_CTARS_blk_F",
            "arifle_CTARS_hex_F",
            "arifle_CTARS_ghex_F",
            "arifle_SPAR_01_blk_F",
            "arifle_SPAR_01_khk_F",
            "arifle_SPAR_01_snd_F",
            "arifle_SPAR_01_GL_blk_F",
            "arifle_SPAR_01_GL_khk_F",
            "arifle_SPAR_01_GL_snd_F",
            "arifle_SPAR_02_blk_F",
            "arifle_SPAR_02_khk_F",
            "arifle_SPAR_02_snd_F",        
            "arifle_SPAR_03_blk_F",
            "arifle_SPAR_03_khk_F",
            "arifle_SPAR_03_snd_F",
            "arifle_MX_khk_F",
            "arifle_MX_GL_khk_F",
            "arifle_MXC_khk_F",
            "arifle_MXM_khk_F",
 
            //SniperRifles
            "arifle_MXM_Black_F",
            "arifle_MXM_F",
            "srifle_DMR_01_F",
            "srifle_DMR_02_camo_F",
            "srifle_DMR_02_F",
            "srifle_DMR_02_sniper_F",
            "srifle_DMR_03_F",
            "srifle_DMR_03_khaki_F",
            "srifle_DMR_03_multicam_F",
            "srifle_DMR_03_tan_F",
            "srifle_DMR_03_woodland_F",
            "srifle_DMR_04_F",
            "srifle_DMR_04_Tan_F",
            "srifle_DMR_05_blk_F",
            "srifle_DMR_05_hex_F",
            "srifle_DMR_05_tan_f",
            "srifle_DMR_06_camo_F",
            "srifle_DMR_06_olive_F",
            "srifle_EBR_F",
            "srifle_GM6_camo_F",
            "srifle_GM6_F",
            "srifle_LRR_camo_F",
            "srifle_LRR_F",        
            //Apex SniperRifles
            "srifle_LRR_tna_F",
            "srifle_GM6_ghex_F",
            "srifle_DMR_07_blk_F",
            "srifle_DMR_07_hex_F",
            "srifle_DMR_07_ghex_F",
           
            // Launchers
            "launch_NLAW_F",
            "launch_RPG32_F",
            "launch_RPG32_ghex_F",
            "launch_RPG7_F",
            "launch_RPG7_F",    //x2
            "launch_Titan_F",
            "launch_I_Titan_F",
            "launch_O_Titan_ghex_F",
            "launch_O_Titan_F",
            "launch_B_Titan_F",
            "launch_B_Titan_tna_F",
            "launch_Titan_short_F",
            "launch_O_Titan_short_F",
            "launch_O_Titan_short_ghex_F",
            "launch_I_Titan_short_F",
            "launch_B_Titan_short_F",
            "launch_B_Titan_short_tna_F"           
            ]call BIS_fnc_selectRandom;
           
 
_sideweapons_loot = [
            //Pistols
            "hgun_ACPC2_F",
            "hgun_P07_F",
            "hgun_Pistol_heavy_01_F",
            "hgun_Pistol_heavy_02_F",
            "hgun_Pistol_Signal_F",
            "hgun_Rook40_F",
            //Apex
            "hgun_Pistol_01_F",
            "hgun_P07_khk_F",
 
            //SubMachineGuns
            "hgun_PDW2000_F",
            "SMG_01_F",
            "SMG_02_F",
            "SMG_05_F"     
            ]call BIS_fnc_selectRandom;
 
 
_items_loot1 = [
            //for RyanZombies
            //"RyanZombiesAntiVirusTemporary_Item",
            //"RyanZombiesAntiVirusCure_Item",
           
            //Vanilla          
            "ToolKit",
            "MediKit",
            "FirstAidKit",
            "FirstAidKit",         
            //Tools
            "Binocular",
            "Rangefinder",         
            "Laserdesignator",
            "Laserdesignator_02",
            "Laserdesignator_03"
            ]call BIS_fnc_selectRandom;
   
   
_items_loot2 = [
            //Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
            "ItemCompass",
            "ItemWatch",
            "ItemRadio",
            "ItemGPS",
            "ItemMap",
            //x2
            "ItemCompass",
            "ItemWatch",
            "ItemRadio",
            "ItemGPS",
            "ItemMap",
            //PointerAttachments
            "acc_flashlight",
            "acc_pointer_IR",
            //BipodAttachments
            "bipod_01_F_blk",
            "bipod_01_F_mtp",
            "bipod_01_F_snd",
            "bipod_02_F_blk",
            "bipod_02_F_hex",
            "bipod_02_F_tan",
            "bipod_03_F_blk",
            "bipod_03_F_oli",
            //Apex
            "bipod_01_F_khk",
            //MuzzleAttachments
            "muzzle_snds_338_black",
            "muzzle_snds_338_green",
            "muzzle_snds_338_sand",
            "muzzle_snds_93mmg",
            "muzzle_snds_93mmg_tan",
            "muzzle_snds_acp",
            "muzzle_snds_B",
            "muzzle_snds_H",
            "muzzle_snds_H_MG",
            "muzzle_snds_H_SW",
            "muzzle_snds_L",
            "muzzle_snds_M",
            //Apex
            "muzzle_snds_H_khk_F",
            "muzzle_snds_H_snd_F",
            "muzzle_snds_58_blk_F",
            "muzzle_snds_m_khk_F",
            "muzzle_snds_m_snd_F",
            "muzzle_snds_B_khk_F",
            "muzzle_snds_B_snd_F",
            "muzzle_snds_58_wdm_F",
            "muzzle_snds_65_TI_blk_F",
            "muzzle_snds_65_TI_hex_F",
            "muzzle_snds_65_TI_ghex_F",
            "muzzle_snds_H_MG_blk_F",
            "muzzle_snds_H_MG_khk_F",
            //OpticAttachments
            "optic_Aco",
            "optic_ACO_grn",
            "optic_ACO_grn_smg",
            "optic_Aco_smg",
            "optic_AMS",
            "optic_AMS_khk",
            "optic_AMS_snd",
            "optic_Arco",
            "optic_DMS",
            "optic_Hamr",
            "optic_Holosight",
            "optic_Holosight_smg",
            "optic_KHS_blk",
            "optic_KHS_hex",
            "optic_KHS_old",
            "optic_KHS_tan",
            "optic_LRPS",
            "optic_MRCO",
            "optic_MRD",
            "optic_Nightstalker",
            "optic_NVS",
            "optic_SOS",
            "optic_tws",
            "optic_tws_mg",
            "optic_Yorris",
            //Apex
            "optic_Arco_blk_F",
            "optic_Arco_ghex_F",
            "optic_DMS_ghex_F",
            "optic_Hamr_khk_F",
            "optic_ERCO_blk_F",
            "optic_ERCO_khk_F",
            "optic_ERCO_snd_F",
            "optic_SOS_khk_F",
            "optic_LRPS_tna_F",
            "optic_LRPS_ghex_F",
            "optic_Holosight_blk_F",
            "optic_Holosight_khk_F",
            "optic_Holosight_smg_blk_F",
           
            //NVG
            "NVGoggles",
            "NVGoggles_INDEP",
            "NVGoggles_OPFOR",
            //Apex
            "O_NVGoggles_hex_F",
            "O_NVGoggles_urb_F",
            "O_NVGoggles_ghex_F",
            "NVGoggles_tna_F"
            ]call BIS_fnc_selectRandom;
 
   
_items_loot3 = [
            //Flares
            "Chemlight_blue",
            "Chemlight_green",
            "Chemlight_red",
            //Smokes
            "SmokeShell",
            "SmokeShellBlue",
            "SmokeShellGreen",
            "SmokeShellOrange",
            "SmokeShellPurple",
            "SmokeShellRed",
            "SmokeShellYellow",
            "1Rnd_Smoke_Grenade_shell",
            "1Rnd_SmokeBlue_Grenade_shell",
            "1Rnd_SmokeGreen_Grenade_shell",
            "1Rnd_SmokeOrange_Grenade_shell",
            "1Rnd_SmokePurple_Grenade_shell",
            "1Rnd_SmokeRed_Grenade_shell",
            "1Rnd_SmokeYellow_Grenade_shell",
            "3Rnd_Smoke_Grenade_shell",
            "3Rnd_SmokeBlue_Grenade_shell",
            "3Rnd_SmokeGreen_Grenade_shell",
            "3Rnd_SmokeOrange_Grenade_shell",
            "3Rnd_SmokePurple_Grenade_shell",
            "3Rnd_SmokeRed_Grenade_shell",
            "3Rnd_SmokeYellow_Grenade_shell",
            //Explosives
            "HandGrenade",
            "MiniGrenade",
            "B_IR_Grenade",
            "O_IR_Grenade",
            "I_IR_Grenade",
            "1Rnd_HE_Grenade_shell",
            "3Rnd_HE_Grenade_shell",
            "APERSBoundingMine_Range_Mag",
            "APERSMine_Range_Mag",
            "APERSTripMine_Wire_Mag",
            "ClaymoreDirectionalMine_Remote_Mag",
            "DemoCharge_Remote_Mag",
            "IEDLandBig_Remote_Mag",
            "IEDLandSmall_Remote_Mag",
            "IEDUrbanBig_Remote_Mag",
            "IEDUrbanSmall_Remote_Mag",
            "SatchelCharge_Remote_Mag",
            "SLAMDirectionalMine_Wire_Mag"
            ]call BIS_fnc_selectRandom;
           
           
//Position of the loot at the crashsite            
_lootPos1 = _crashsite getRelPos [8, 1];
_lootPos2 = _crashsite getRelPos [8, 3];
_lootPos3 = _crashsite getRelPos [8, 5];
_lootPos4 = _crashsite getRelPos [8, 7];
_lootPos5 = _crashsite getRelPos [8, 9];
_lootPos6 = _crashsite getRelPos [8, 11];
 
_lootPos8 = _crashsite getRelPos [4, 1];
//you can spawn an item next to the wreck , like an ammobox  _lootPos8
 
_array1 = [
/*
            "Box_IND_Ammo_F",
            "Box_IND_Wps_F",
            "Box_IND_AmmoOrd_F",
            "Box_IND_Grenades_F",
            "Box_IND_WpsLaunch_F",
            "Box_IND_WpsSpecial_F",
            "Box_IND_Support_F"
*/
            //Respawn
            "B_Respawn_Sleeping_bag_blue_F",
            "B_Respawn_Sleeping_bag_brown_F",
            "B_Respawn_TentDome_F",
            "B_Respawn_Sleeping_bag_F",
            "B_Respawn_TentA_F"
            ];
_Wrecks1 = selectRandom _array1;
_crashsite1 = _Wrecks1 createVehicle _lootPos8;
 
sleep 1;
 
//addweaponcargo    addItemCargo    addMagazineCargo
 
//lootitems1 spawn weapons
lootitems1 = "groundweaponHolder" createVehicle _lootPos1; lootitems1 addweaponcargo [_weapons_Loot, 1];
 
//lootitems2 spawn sideweapons
lootitems2 = "groundweaponHolder" createVehicle _lootPos2; lootitems2 addweaponcargo [_sideweapons_loot, 2];
 
//lootitems3 spawn only mags
lootitems3 = "groundweaponHolder" createVehicle _lootPos3; lootitems3 addweaponcargo [_weapons_Loot, 0];
 
//lootitems4 items 1
lootitems4 = "groundweaponHolder" createVehicle _lootPos4; lootitems4 addweaponcargo [_items_loot1, 2];
 
//lootitems5 items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
lootitems5 = "groundweaponHolder" createVehicle _lootPos5; lootitems5 addItemCargo [_items_loot2, 2];
 
//lootitems6 items 2 Here ONLY :Flares , Smokes , Explosives
lootitems6 = "groundweaponHolder" createVehicle _lootPos6; lootitems6 addMagazineCargo [_items_loot3, 2];
 
 
// Spawn weapon's mag
_magazines = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom;
lootitems1 addMagazineCargoGlobal [_magazineClass, 2];  //2 mags
 
// Spawn sideweapon's mag
_magazines = getArray (configFile / "CfgWeapons" / _sideweapons_loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom;
lootitems2 addMagazineCargoGlobal [_magazineClass, 2];  //2 mags
   
// Spawn only magazines
_magazines = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom;
lootitems3 addMagazineCargoGlobal [_magazineClass, 3];  //3 mags
 
sleep 1;
 
 
//https://community.bistudio.com/wiki/setParticleClass
_particle1 = "#particlesource" createVehicleLocal getpos _crashsite;
_particle1 setParticleClass "MediumSmoke";
_particle1 attachTo [_crashsite,[0,0,0]];
 
 
//https://community.bistudio.com/wiki/setParticleFire
//source setParticleFire [coreIntensity, coreDistance, damageTime]
_particle2 = "#particlesource" createVehicleLocal (getPos _crashsite);
_particle2 setParticleClass "BigDestructionSmoke";
_particle2 setParticleFire [0.3,1.0,0.1];
 
//MediumSmoke   ObjectDestructionSmoke  ObjectDestructionFire1Smallx
//SmallDestructionSmoke SmallDestructionFire MediumDestructionFire MediumDestructionSmoke BigDestructionFire BigDestructionSmoke
 
sleep 1;
 
//Create a Crater   (Crater , CraterLong , CraterLong_small)
createVehicle ["CraterLong", getPos _crashsite, [], 0, "CAN_COLLIDE"];
 
 
//  Create a Marker at the Crashsite
//  https://community.bistudio.com/wiki/cfgMarkers
{
    if (typeOf _x in _Wrecks_array) then
    {
        _marker = createMarkerLocal ["Crashsite" + str(_forEachIndex), getPos _x];
        _marker setMarkerShapeLocal "ICON";
        _marker setMarkerTypeLocal "mil_marker";   
        _marker setMarkerColorLocal "ColorYellow";
        _marker setMarkerSizeLocal [1,1];
        _marker setMarkerTextLocal "Crashsite";
    };
}
forEach allMissionObjects "All";
 
 
};
systemchat "C r a s h s i t e s   S p a w n e d";

 

  • Like 1

Share this post


Link to post
Share on other sites

So now everything works as it has too. One last thing to finish this up... When the crashsites spawn on a big grass field it is very difficult to see all the stuff around it. My idea was to spawn a "Large_ClutterCutter_F" to hide the grass so the people can see the loot much better... I tried this here:

 

Quote

// Create a ClutterCutter to erase Clutter around Crashsites
createVehicle ["Land_ClutterCutter_large_F", getPos _crashsite, [], 0, "CAN_COLLIDE"];

 

But it doesnt work, all the grass is still there on the ground. Any ideas?

 

thnx for reading

Edited by CptStampede
  • Like 1

Share this post


Link to post
Share on other sites
11 minutes ago, CptStampede said:

// Create a ClutterCutter to erase Clutter around Crashsites

 

Yes , this should be added as an option.

Nice idea , i 'll check and tell you !

 

( hold on - going to check )

 

Thank you CptStampede!

 

Share this post


Link to post
Share on other sites
1 hour ago, CptStampede said:

// Create a ClutterCutter to erase Clutter around Crashsites

 

 

This is an updated version of the script , with the following options :

(the official update will be soon in Armaholic )

 

Cut the grass around the Crashsites and

Create a Marker for the Crashsites .

JNGWfd3DSqOG_U81o6ITBA.pngfmLs4jEiSBqEvBl0l9nkWA.png

 




//________________  Author : [GR]GEORGE F ___________ 03.05.18 _____________

/*
________________ GF Crashsites Script ________________

https://forums.bohemia.net/forums/topic/212505-crashsites_gf-script/

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain collours to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/



if(!isServer) exitWith {};


_1_Grass_Cutter			= true;		//	Cut the grass around the Crashsites 
_2_Create_Markers		= true;		//	Create a Marker for the Crashsites		


systemchat "C r a s h s i t e s   I n i t i a l i z i n g";

private ["_marker","_x"];
_x = 0;

//Number of the crashsites to spawn (on random)
for "_x" from 0 to (2 + (random 6)) do {

//The position of the crashsites will be random
GF_random_pos = [] call BIS_fnc_randomPos;

//Wrecks at the crashsites
_Wrecks_array = [
			"Plane_Fighter_03_wreck_F",
			"Land_UWreck_Heli_Attack_02_F",
			"Land_Wreck_Heli_Attack_01_F",
			"Land_Wreck_Heli_Attack_02_F",
			"Land_Wreck_Plane_Transport_01_F",
			"Plane_Fighter_01_wreck_F",
			"Plane_Fighter_02_wreck_F",
			"Plane_Fighter_04_wreck_F",
			"Land_Wreck_Commanche_F"
			];
_Wrecks = selectRandom _Wrecks_array;

_crashsite = _Wrecks createVehicle GF_random_pos;


//Type of loot
_weapons_Loot = [
			//LightMachineGuns
			"arifle_MX_SW_Black_F",
			"arifle_MX_SW_F",
			"LMG_Mk200_F",
			"LMG_Zafir_F",
			"LMG_03_F",				
			"MMG_01_hex_F",
			"MMG_01_tan_F",
			"MMG_02_black_F",
			"MMG_02_camo_F",
			"MMG_02_sand_F",
			//Apex
			"LMG_03_F",

			//AssaultRifles
			"arifle_Katiba_C_F",
			"arifle_Katiba_F",
			"arifle_Katiba_GL_F",
			"arifle_Mk20_F",
			"arifle_Mk20_GL_F",
			"arifle_Mk20_GL_plain_F",
			"arifle_Mk20_plain_F",
			"arifle_Mk20C_F",
			"arifle_Mk20C_plain_F",
			"arifle_MX_Black_F",
			"arifle_MX_F",
			"arifle_MX_GL_Black_F",
			"arifle_MX_GL_F",
			"arifle_MXC_Black_F",
			"arifle_MXC_F",
			"arifle_SDAR_F",
			"arifle_TRG20_F",
			"arifle_TRG21_F",
			"arifle_TRG21_GL_F",			
			//Apex AssaultRifles
			"arifle_AK12_F",
			"arifle_AK12_GL_F",
			"arifle_AKM_F",
			"arifle_AKM_FL_F",
			"arifle_AKS_F",
			//AK x2
			"arifle_AK12_F",
			"arifle_AK12_GL_F",
			"arifle_AKM_F",
			"arifle_AKM_FL_F",
			"arifle_AKS_F",
			//
			"arifle_ARX_blk_F",
			"arifle_ARX_ghex_F",
			"arifle_ARX_hex_F",
			"arifle_CTAR_blk_F",
			"arifle_CTAR_hex_F",
			"arifle_CTAR_ghex_F",
			"arifle_CTAR_GL_blk_F",
			"arifle_CTARS_blk_F",
			"arifle_CTARS_hex_F",
			"arifle_CTARS_ghex_F",
			"arifle_SPAR_01_blk_F",
			"arifle_SPAR_01_khk_F",
			"arifle_SPAR_01_snd_F",
			"arifle_SPAR_01_GL_blk_F",
			"arifle_SPAR_01_GL_khk_F",
			"arifle_SPAR_01_GL_snd_F",
			"arifle_SPAR_02_blk_F",
			"arifle_SPAR_02_khk_F",
			"arifle_SPAR_02_snd_F",			
			"arifle_SPAR_03_blk_F",
			"arifle_SPAR_03_khk_F",
			"arifle_SPAR_03_snd_F",
			"arifle_MX_khk_F",
			"arifle_MX_GL_khk_F",
			"arifle_MXC_khk_F",
			"arifle_MXM_khk_F",

			//SniperRifles
			"arifle_MXM_Black_F",
			"arifle_MXM_F",
			"srifle_DMR_01_F",
			"srifle_DMR_02_camo_F",
			"srifle_DMR_02_F",
			"srifle_DMR_02_sniper_F",
			"srifle_DMR_03_F",
			"srifle_DMR_03_khaki_F",
			"srifle_DMR_03_multicam_F",
			"srifle_DMR_03_tan_F",
			"srifle_DMR_03_woodland_F",
			"srifle_DMR_04_F",
			"srifle_DMR_04_Tan_F",
			"srifle_DMR_05_blk_F",
			"srifle_DMR_05_hex_F",
			"srifle_DMR_05_tan_f",
			"srifle_DMR_06_camo_F",
			"srifle_DMR_06_olive_F",
			"srifle_EBR_F",
			"srifle_GM6_camo_F",
			"srifle_GM6_F",
			"srifle_LRR_camo_F",
			"srifle_LRR_F",			
			//Apex SniperRifles
			"srifle_LRR_tna_F",
			"srifle_GM6_ghex_F",
			"srifle_DMR_07_blk_F",
			"srifle_DMR_07_hex_F",
			"srifle_DMR_07_ghex_F",
			
			// Launchers
			"launch_NLAW_F",
			"launch_RPG32_F",
			"launch_RPG32_ghex_F",
			"launch_RPG7_F",
			"launch_RPG7_F",	//x2
			"launch_Titan_F",
			"launch_I_Titan_F",
			"launch_O_Titan_ghex_F",
			"launch_O_Titan_F",
			"launch_B_Titan_F",
			"launch_B_Titan_tna_F",
			"launch_Titan_short_F",
			"launch_O_Titan_short_F",
			"launch_O_Titan_short_ghex_F",
			"launch_I_Titan_short_F",
			"launch_B_Titan_short_F",
			"launch_B_Titan_short_tna_F"			
			]call BIS_fnc_selectRandom;
			

_sideweapons_loot = [
			//Pistols
			"hgun_ACPC2_F",
			"hgun_P07_F",
			"hgun_Pistol_heavy_01_F",
			"hgun_Pistol_heavy_02_F",
			"hgun_Pistol_Signal_F",
			"hgun_Rook40_F",
			//Apex
			"hgun_Pistol_01_F",
			"hgun_P07_khk_F",

			//SubMachineGuns
			"hgun_PDW2000_F",
			"SMG_01_F",
			"SMG_02_F",
			"SMG_05_F"		
			]call BIS_fnc_selectRandom;


_items_loot1 = [
			//for RyanZombies
			//"RyanZombiesAntiVirusTemporary_Item",
			//"RyanZombiesAntiVirusCure_Item",
			
			//Vanilla			
			"ToolKit",
			"MediKit",
			"FirstAidKit",
			"FirstAidKit", 			
			//Tools
			"Binocular",
			"Rangefinder",			
			"Laserdesignator",
			"Laserdesignator_02",
			"Laserdesignator_03"
			]call BIS_fnc_selectRandom;
	
	
_items_loot2 = [
			//Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS",
			"ItemMap",
			//x2
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS",
			"ItemMap",
			//PointerAttachments
			"acc_flashlight",
			"acc_pointer_IR",
			//BipodAttachments
			"bipod_01_F_blk",
			"bipod_01_F_mtp",
			"bipod_01_F_snd",
			"bipod_02_F_blk",
			"bipod_02_F_hex",
			"bipod_02_F_tan",
			"bipod_03_F_blk",
			"bipod_03_F_oli",
			//Apex
			"bipod_01_F_khk",
			//MuzzleAttachments
			"muzzle_snds_338_black",
			"muzzle_snds_338_green",
			"muzzle_snds_338_sand",
			"muzzle_snds_93mmg",
			"muzzle_snds_93mmg_tan",
			"muzzle_snds_acp",
			"muzzle_snds_B",
			"muzzle_snds_H",
			"muzzle_snds_H_MG",
			"muzzle_snds_H_SW",
			"muzzle_snds_L",
			"muzzle_snds_M",
			//Apex
			"muzzle_snds_H_khk_F",
			"muzzle_snds_H_snd_F",
			"muzzle_snds_58_blk_F",
			"muzzle_snds_m_khk_F",
			"muzzle_snds_m_snd_F",
			"muzzle_snds_B_khk_F",
			"muzzle_snds_B_snd_F",
			"muzzle_snds_58_wdm_F",
			"muzzle_snds_65_TI_blk_F",
			"muzzle_snds_65_TI_hex_F",
			"muzzle_snds_65_TI_ghex_F",
			"muzzle_snds_H_MG_blk_F",
			"muzzle_snds_H_MG_khk_F",
			//OpticAttachments
			"optic_Aco",
			"optic_ACO_grn",
			"optic_ACO_grn_smg",
			"optic_Aco_smg",
			"optic_AMS",
			"optic_AMS_khk",
			"optic_AMS_snd",
			"optic_Arco",
			"optic_DMS",
			"optic_Hamr",
			"optic_Holosight",
			"optic_Holosight_smg",
			"optic_KHS_blk",
			"optic_KHS_hex",
			"optic_KHS_old",
			"optic_KHS_tan",
			"optic_LRPS",
			"optic_MRCO",
			"optic_MRD",
			"optic_Nightstalker",
			"optic_NVS",
			"optic_SOS",
			"optic_tws",
			"optic_tws_mg",
			"optic_Yorris",
			//Apex
			"optic_Arco_blk_F",
			"optic_Arco_ghex_F",
			"optic_DMS_ghex_F",
			"optic_Hamr_khk_F",
			"optic_ERCO_blk_F",
			"optic_ERCO_khk_F",
			"optic_ERCO_snd_F",
			"optic_SOS_khk_F",
			"optic_LRPS_tna_F",
			"optic_LRPS_ghex_F",
			"optic_Holosight_blk_F",
			"optic_Holosight_khk_F",
			"optic_Holosight_smg_blk_F",
			
			//NVG
			"NVGoggles",
			"NVGoggles_INDEP",
			"NVGoggles_OPFOR",
			//Apex
			"O_NVGoggles_hex_F",
			"O_NVGoggles_urb_F",
			"O_NVGoggles_ghex_F",
			"NVGoggles_tna_F"
			]call BIS_fnc_selectRandom;

	
_items_loot3 = [
			//Flares
			"Chemlight_blue",
			"Chemlight_green",
			"Chemlight_red",
			//Smokes
			"SmokeShell",
			"SmokeShellBlue",
			"SmokeShellGreen",
			"SmokeShellOrange",
			"SmokeShellPurple",
			"SmokeShellRed",
			"SmokeShellYellow",
			"1Rnd_Smoke_Grenade_shell",
			"1Rnd_SmokeBlue_Grenade_shell",
			"1Rnd_SmokeGreen_Grenade_shell",
			"1Rnd_SmokeOrange_Grenade_shell",
			"1Rnd_SmokePurple_Grenade_shell",
			"1Rnd_SmokeRed_Grenade_shell",
			"1Rnd_SmokeYellow_Grenade_shell",
			"3Rnd_Smoke_Grenade_shell",
			"3Rnd_SmokeBlue_Grenade_shell",
			"3Rnd_SmokeGreen_Grenade_shell",
			"3Rnd_SmokeOrange_Grenade_shell",
			"3Rnd_SmokePurple_Grenade_shell",
			"3Rnd_SmokeRed_Grenade_shell",
			"3Rnd_SmokeYellow_Grenade_shell",
			//Explosives
			"HandGrenade",
			"MiniGrenade",
			"B_IR_Grenade",
			"O_IR_Grenade",
			"I_IR_Grenade",
			"1Rnd_HE_Grenade_shell",
			"3Rnd_HE_Grenade_shell",
			"APERSBoundingMine_Range_Mag",
			"APERSMine_Range_Mag",
			"APERSTripMine_Wire_Mag",
			"ClaymoreDirectionalMine_Remote_Mag",
			"DemoCharge_Remote_Mag",
			"IEDLandBig_Remote_Mag",
			"IEDLandSmall_Remote_Mag",
			"IEDUrbanBig_Remote_Mag",
			"IEDUrbanSmall_Remote_Mag",
			"SatchelCharge_Remote_Mag",
			"SLAMDirectionalMine_Wire_Mag"
			]call BIS_fnc_selectRandom;
			
			
//Position of the loot at the crashsite				
_lootPos1 = _crashsite getRelPos [8, 1];
_lootPos2 = _crashsite getRelPos [8, 3];
_lootPos3 = _crashsite getRelPos [8, 5];
_lootPos4 = _crashsite getRelPos [8, 7];
_lootPos5 = _crashsite getRelPos [8, 9];
_lootPos6 = _crashsite getRelPos [8, 11];

_lootPos8 = _crashsite getRelPos [4, 1];
//you can spawn an item next to the wreck , like an ammobox	 _lootPos8

_array1 = [
/*
			"Box_IND_Ammo_F",
			"Box_IND_Wps_F",
			"Box_IND_AmmoOrd_F",
			"Box_IND_Grenades_F",
			"Box_IND_WpsLaunch_F",
			"Box_IND_WpsSpecial_F",
			"Box_IND_Support_F"
*/
			//Respawn
			"B_Respawn_Sleeping_bag_blue_F",
			"B_Respawn_Sleeping_bag_brown_F",
			"B_Respawn_TentDome_F",
			"B_Respawn_Sleeping_bag_F",
			"B_Respawn_TentA_F"
			];
_Wrecks1 = selectRandom _array1;
_crashsite1 = _Wrecks1 createVehicle _lootPos8;

sleep 1;

//addweaponcargo	addItemCargo	addMagazineCargo

//lootitems1 spawn weapons
lootitems1 = "groundweaponHolder" createVehicle _lootPos1; lootitems1 addweaponcargo [_weapons_Loot, 1];

//lootitems2 spawn sideweapons
lootitems2 = "groundweaponHolder" createVehicle _lootPos2; lootitems2 addweaponcargo [_sideweapons_loot, 2];

//lootitems3 spawn only mags
lootitems3 = "groundweaponHolder" createVehicle _lootPos3; lootitems3 addweaponcargo [_weapons_Loot, 0];

//lootitems4 items 1
lootitems4 = "groundweaponHolder" createVehicle _lootPos4; lootitems4 addweaponcargo [_items_loot1, 2];

//lootitems5 items 2 Here ONLY :items , PointerAttachments , BipodAttachments , MuzzleAttachments , OpticAttachments , NVG
lootitems5 = "groundweaponHolder" createVehicle _lootPos5; lootitems5 addItemCargo [_items_loot2, 2];

//lootitems6 items 2 Here ONLY :Flares , Smokes , Explosives
lootitems6 = "groundweaponHolder" createVehicle _lootPos6; lootitems6 addMagazineCargo [_items_loot3, 2];


// Spawn weapon's mag
_magazines = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom; 
lootitems1 addMagazineCargoGlobal [_magazineClass, 2];	//2 mags

// Spawn sideweapon's mag
_magazines = getArray (configFile / "CfgWeapons" / _sideweapons_loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom; 
lootitems2 addMagazineCargoGlobal [_magazineClass, 2];	//2 mags
	
// Spawn only magazines
_magazines = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines");
_magazineClass = _magazines call bis_fnc_selectRandom; 
lootitems3 addMagazineCargoGlobal [_magazineClass, 3];	//3 mags

sleep 1;


//https://community.bistudio.com/wiki/setParticleClass
_particle1 = "#particlesource" createVehicleLocal getpos _crashsite;
_particle1 setParticleClass "MediumSmoke";
_particle1 attachTo [_crashsite,[0,0,0]];


//https://community.bistudio.com/wiki/setParticleFire
//source setParticleFire [coreIntensity, coreDistance, damageTime] 
_particle2 = "#particlesource" createVehicleLocal (getPos _crashsite);
_particle2 setParticleClass "BigDestructionSmoke";
_particle2 setParticleFire [0.3,1.0,0.1];

//MediumSmoke	ObjectDestructionSmoke	ObjectDestructionFire1Smallx
//SmallDestructionSmoke	SmallDestructionFire MediumDestructionFire MediumDestructionSmoke BigDestructionFire BigDestructionSmoke

sleep 1;

//Create a Crater	(Crater , CraterLong , CraterLong_small)
createVehicle ["CraterLong", getPos _crashsite, [], 0, "CAN_COLLIDE"];


if (_1_Grass_Cutter) then {

//	systemchat "_1_Grass_Cutter";

//	Cut the grass around the Crashsites 

_Grass_Cutter_pos = _crashsite getRelPos [12, 6];
createVehicle ["Land_ClutterCutter_large_F", _Grass_Cutter_pos, [], 0, "CAN_COLLIDE"]; 
createVehicle ["Land_ClutterCutter_large_F", _crashsite, [], 0, "CAN_COLLIDE"]; 
};

if (_2_Create_Markers) then {

//	systemchat "_2_Create_Markers";

//	Create a Marker for the Crashsites
//	Select your marker here:	
//	https://community.bistudio.com/wiki/cfgMarkers
{
	if (typeOf _x in _Wrecks_array) then 
	{
		_marker = createMarkerLocal ["Crashsite" + str(_forEachIndex), getPos _x];
		_marker setMarkerShapeLocal "ICON";
		_marker setMarkerTypeLocal "mil_marker";	
		_marker setMarkerColorLocal "ColorYellow";
		_marker setMarkerSizeLocal [1,1];
		_marker setMarkerTextLocal "Crashsite"; 
	}; 
} 
forEach allMissionObjects "All";
};


};
systemchat "C r a s h s i t e s   S p a w n e d";

 

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

thnx George i will change this and im up to release my map in the next few minutes :)

  • Thanks 1

Share this post


Link to post
Share on other sites
3 minutes ago, CptStampede said:

thnx George i will change this and im up to release my map in the next few minutes :)

 

Thanks also and with the release of your mission ,

if you like share here

and here :

 

Thanks CptStampede !

Share this post


Link to post
Share on other sites
1 hour ago, CptStampede said:

So here it is:

 

Thank you very much and well done CptStampede !

 

C5E35E981E542A1D5F6E9F7F791020AC97185060

  • Like 1

Share this post


Link to post
Share on other sites

Hello George

So in this line 451 to 467

Spoiler

_array1 = [
/*
            "Box_IND_Ammo_F",
            "Box_IND_Wps_F",
            "Box_IND_AmmoOrd_F",
            "Box_IND_Grenades_F",
            "Box_IND_WpsLaunch_F",
            "Box_IND_WpsSpecial_F",
            "Box_IND_Support_F"
*/
            //Respawn
            "B_Respawn_Sleeping_bag_blue_F",
            "B_Respawn_Sleeping_bag_brown_F",
            "B_Respawn_TentDome_F",
            "B_Respawn_Sleeping_bag_F",
            "B_Respawn_TentA_F"
            ];

If I understant correctly, it can spawn the loot inside the box instead of the loot on the ground ?

Also the part about Respawn ? Is this for SP or MP, I don't understand what is ?

Thank you

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, MisterOth said:

spawn the loot inside the box

 

Hello there MisterOth !

 

In this array ,  you can spawn objects ( almost everything ).

 

If it is an item container ( it has an option for inventory )

then you can also set the desired items inside  or loot from the arrays lists.

 

You can see an example from my Cargo airdrop script :

 

 

 

2 hours ago, MisterOth said:

for SP or MP

Yes , you can add this script in both.

 

 

For anything that you might  want feel free to ask !

 

See you !

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello George me again,

 

since Ravage got his way into the Workshop im setting up a simple survival server. So ur Scripts still work on self hosted and spawns markers but they dont show at my Server.  Can u help me with this?

 

Thnx

 

CptStampede

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, CptStampede said:

spawns markers

 

Try to change this :

 

if (typeOf _x in _Wrecks_array) then 
	{
		_marker = createMarker ["Crashsite" + str(_forEachIndex), getPos _x];
		_marker setMarkerShape "ICON";
		_marker setMarkerType "mil_marker";	
		_marker setMarkerColor "ColorYellow";
		_marker setMarkerSize [1,1];
		_marker setMarkerText "Crashsite"; 
	}; 

 

  • Like 1

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

×