Jump to content

Recommended Posts

Hey guys I use the ETG Heli crash/supply drop script in just about every ravage mission I create and the creator and I have ran into a issue with the supply crate falling/clipping through the ground once it lands though sometimes if it hit a tree before the ground it will not clip through. If anyone is willing to help or check the script out for any possible changes that could be made that would be great.  here is the fncrashdrop.sqf. This is the section I think needs adjusting  (waituntil {(getPos _cargo select 2) < 20}; 
 detach _cargo;)

Spoiler

/*
 Filename:   fn_crashdrop.sqf
 Author:   Kellojo
 Description:  Heli crash and drop script main function - Part of the ETG script collection
 Link: http://www.armaholic.com/page.php?id=29519
*/

_mode = [_this, 0, 0, [0]] call BIS_fnc_param;

_time = 4900;          //Time between every heli crash/supply drop in seconds (integer)
_markertp = "n_service";       //Type of marker? (https://community.bistudio.com/wiki/cfgMarkers) (string - leave empty if no marker is wanted)
_fire = true;          //Should fire be around the helicrashsite ? (true/false)
_ai = false;           //AI? (true/false)
_mapcenter = [10000.622,10003.933];      //Edit this coordinate it should be roughly the center of the map you are playing on (this one is for Altis)
_centerrad = 12000;         //Radius around the _CenterOfMap (make sure its covering the whole map - Integer)
_rpt = true;          //Writes debug information to the rpt file. (true/false)

_MaxAmmount = 6;         //Ammount of Magazines and Items that can spawn at one lootpile
_MaxItem = 6;          //Max ammount of individual items
_MaxMag = 6;          //Max ammount of individual magazines
_MaxWeap = 4;          //Max ammount of individual weapons
_MaxBpack = 6;

//Add or remove item classnames to the array to add them to the loot table
_Backpacks =   ['B_AssaultPack_khk','B_AssaultPack_dgtl','B_AssaultPack_rgr','B_AssaultPack_sgg','B_AssaultPack_blk','B_AssaultPack_cbr','B_AssaultPack_mcamo','B_Kitbag_mcamo','B_Kitbag_sgg','B_Kitbag_cbr','B_Bergen_sgg','B_Bergen_mcamo','B_Bergen_rgr','B_Bergen_blk','B_FieldPack_blk','B_FieldPack_ocamo','B_FieldPack_oucamo','B_FieldPack_cbr','B_Carryall_ocamo','B_Carryall_oucamo','B_Carryall_mcamo','B_Carryall_oli','B_Carryall_khk','B_Carryall_cbr','B_OutdoorPack_blk','B_OutdoorPack_tan','B_OutdoorPack_blu','B_HuntingBackpack','B_UAV_01_backpack_F'];
_Weapons =    ["srifle_EBR_F","LMG_Mk200_F","SMG_02_F","srifle_LRR_F","hgun_ACPC2_F","hgun_P07_F","arifle_MXC_F","arifle_TRG21_F","srifle_DMR_04_F","srifle_DMR_05_blk_F","srifle_DMR_01_ACO_F","srifle_GM6_F","arifle_Katiba_F","hgun_PDW2000_F","srifle_DMR_02_F","srifle_DMR_03_khaki_F","launch_RPG7_F","arifle_MX_SW_F","CUP_srifle_CZ750","CUP_srifle_M24_ghillie","CUP_srifle_ksvk","CUP_sgun_Saiga12K","CUP_srifle_SVD","CUP_srifle_VSSVintorez_pso","CUP_sgun_AA12","CUP_arifle_AK47","CUP_arifle_AK74","CUP_arifle_AKS74","CUP_arifle_FNFAL_railed","CUP_srifle_L129A1_HG","CUP_srifle_M107_Base","CUP_srifle_M110","CUP_arifle_M16A4_Aim_Laser","CUP_arifle_M4A1_camo_Aim","CUP_srifle_MK12SPR_LeupoldM3LR","CUP_lmg_m249_para","CUP_launch_RPG7V","CUP_arifle_Sa58RIS2","CUP_arifle_Mk17_STD","CUP_hgun_M9_snds","CUP_hgun_Phantom_Flashlight_snds","CUP_arifle_CZ805_A2_Holo_Laser","arifle_ARX_hex_ACO_Pointer_Snds_F","arifle_SPAR_03_khk_F","arifle_MXM_Black_F"];
_Items =    ["MineDetector","ToolKit","Muzzle_snds_H","Muzzle_snds_L","Muzzle_snds_M","Muzzle_snds_B","optic_Arco","optic_Hamr","optic_ACO_grn","optic_Holosight","optic_SOS","acc_flashlight","acc_flashlight_pistol","muzzle_snds_acp","optic_Nightstalker","optic_tws","optic_DMS","optic_LRPS","muzzle_snds_338_black","muzzle_snds_93mmg","optic_Holosight_blk_F","rvg_franta","rvg_spirit","rvg_rice","rvg_milk","rvg_tire","rvg_matches","rvg_antiRad","rvg_canisterFuel_Empty","rvg_plasticBottle","CUP_Mxx_camo","CUP_optic_PSO_1","CUP_optic_kobra","CUP_muzzle_PBS4","CUP_muzzle_snds_M9","CUP_SVD_camo_g","CUP_optic_LeupoldMk4","CUP_optic_CompM2_Black","CUP_optic_RCO","CUP_muzzle_snds_M110","CUP_muzzle_snds_M14","CUP_muzzle_snds_M16","CUP_muzzle_snds_SCAR_H","V_TacVest_blk_POLICE","V_TacVest_oli","V_PlateCarrier1_rgr"];
_magazines =   ["20Rnd_762x51_Mag","200Rnd_65x39_cased_Box","30Rnd_45ACP_Mag_SMG_01","7Rnd_408_Mag","9Rnd_45ACP_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag","10Rnd_127x54_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_762x54_Mag","5Rnd_127x108_APDS_Mag","30Rnd_65x39_caseless_green","30Rnd_9x21_Mag","10Rnd_338_Mag","RPG7_F","ClaymoreDirectionalMine_Remote_Mag","APERSTripMine_Wire_Mag","DemoCharge_Remote_Mag","IEDUrbanSmall_Remote_Mag","100Rnd_65x39_caseless_mag","CUP_10Rnd_762x51_CZ750","CUP_5Rnd_762x51_M24","CUP_5Rnd_127x108_KSVK_M","CUP_8Rnd_B_Saiga12_74Slug_M","CUP_8Rnd_B_Saiga12_74Pellets_M","CUP_10Rnd_762x54_SVD_M","CUP_10Rnd_9x39_SP5_VSS_M","CUP_20Rnd_B_AA12_Pellets","CUP_20Rnd_B_AA12_74Slug","CUP_30Rnd_762x39_AK47_M","CUP_30Rnd_545x39_AK_M","CUP_20Rnd_762x51_FNFAL_M","CUP_20Rnd_762x51_L129_M","CUP_10Rnd_127x99_m107","CUP_20Rnd_762x51_B_M110","CUP_30Rnd_556x45_Stanag","CUP_20Rnd_556x45_Stanag","CUP_100Rnd_TE4_Red_Tracer_556x45_M249","CUP_PG7V_M","CUP_30Rnd_Sa58_M","CUP_20Rnd_762x51_B_SCAR","CUP_15Rnd_9x19_M9","CUP_18Rnd_9x19_Phantom","CUP_20Rnd_B_AA12_HE"];  
_aiunits =    [" I_G_officer_F", "I_G_Soldier_A_F","I_G_Soldier_LAT_F","I_G_Soldier_M_F","I_G_Soldier_GL_F"];     //Add or remove unit classnames for more or less ai

//random timer + calls in new drop/crash
if (_mode == 1) exitwith {
 sleep (round (random _time));
 [2] call fn_crashdrop;
};

//creates a drop/crash
if (_mode == 2) exitwith {
 
 //Get data
 _cord1 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos;
 sleep 0.5;
 _cord2 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos;
 sleep 0.5;
 _cord3 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos;
 sleep 0.5;
 _cord4 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos;
 sleep 0.5;
 _cord5 = [_mapcenter, 1, _centerrad, 3, 0, 600, 0] call BIS_fnc_findSafePos;
 
 //Spawn heli & cargo
 _veh = [[0,0,0], 180,"I_Heli_light_03_unarmed_F",independent] call bis_fnc_spawnvehicle;
 _cargo = "Box_NATO_AmmoVeh_F" createVehicle [0,0,0];
 _grp = group (_veh select 0);
 
 veh = _veh;
 cargo = _cargo;
 
 clearMagazineCargoGlobal _cargo;
 clearWeaponCargoGlobal _cargo;
 clearItemCargoGlobal _cargo;
 clearBackpackCargoGlobal _cargo;
 
 {
  _x disableAI "AUTOTARGET";
  _x disableAI "TARGET";
  _x disableAI "SUPPRESSION";
  removeBackpackGlobal _x;
  removeAllWeapons _x;
 } forEach units (_veh select 2);
 
 //Spawn loot
 _weapc = 0;
 _weapcount = round (random _MaxWeap);
 while {_weapc < _weapcount} do {
  sleep 0.1;
  _weapc = _weapc + 1;
  _curi = _Weapons call BIS_fnc_selectRandom;
  _ammount = 1;
  _mag = getArray (configFile / "CfgWeapons" / _curi / "magazines");
  _cargo addWeaponCargoGlobal [_curi,_ammount];
  _cargo addMagazineCargoGlobal [(_mag select 0),round random 8];
 };

 
 _magc = 0;
 _magcount = round (random _MaxMag);
 while {_magc < _magcount} do {
  sleep 0.1;
  _magc = _magc + 1;
  _curi = _magazines call BIS_fnc_selectRandom;
  _cargo addMagazineCargoGlobal [_curi,round (random 5)]; 
 };

 
 _ic = 0;
 _ic = round (random _MaxItem);
 while {_ic < _ic} do {
  sleep 0.1;
  _ic = _ic + 1;
  _curi = _Items call BIS_fnc_selectRandom;
  _ammount = 1;
  _cargo addItemCargoGlobal [_curi,_ammount]; 
 };

 
 _bpackc = 0;
 _backcount = round (random _MaxBpack);
 while {_bpackc < _backcount} do {
  sleep 0.1;
  _bpackc = _bpackc + 1;
  _curi = _Backpacks call BIS_fnc_selectRandom;
  _ammount = 1;
  _cargo addBackpackCargoGlobal [_curi,_ammount]; 
 };
 
 (_veh select 0) setSlingLoad _cargo;

 //Set waypoints
 ETG_tvehdrop = false;
 ETG_tvehcrash = false;

 _wp = _grp addWaypoint [_cord1, 0];
 _wp setWaypointType "move";
 _wp setWaypointBehaviour "CARELESS";
 (_veh select 0) flyInHeight 225;
 [_grp,1]setWaypointSpeed "FULL";
 
 _wp = _grp addWaypoint [_cord2, 0];
 _wp setWaypointType "move";
 _wp setWaypointBehaviour "CARELESS";
 _wp setWaypointStatements ['true', "ETG_tvehdrop = true;"];
 
 _wp = _grp addWaypoint [_cord3, 0];
 _wp setWaypointType "move";
 _wp setWaypointBehaviour "CARELESS";
 
 _wp = _grp addWaypoint [_cord4, 0];
 _wp setWaypointType "move";
 _wp setWaypointBehaviour "CARELESS";
 
 _wp = _grp addWaypoint [_cord5, 0];
 _wp setWaypointType "move";
 _wp setWaypointBehaviour "CARELESS";
 _wp setWaypointStatements ['true', "ETG_tvehcrash = true;"];
 
 waituntil {ETG_tvehdrop};
 
 //Unload
 (_veh select 0) flyInHeight 100;
 (_veh select 0) setSlingLoad objNull;
 _chute = "B_Parachute_02_F" createVehicle position _cargo;
 _cargo attachTo [_chute,[0, 0, -1.2]];
 
 _smoke = "SmokeShellRed" createVehicle position _cargo;
 _smoke attachto [_cargo,[0,0,0]];
 sleep 10;
 _smoke setDamage 1;
 deleteVehicle _smoke;
 
 _smoke = "SmokeShellRed" createVehicle position _cargo;
 _smoke attachto [_cargo,[0,0,0]];
 
 waituntil {(getPos _cargo select 2) < 20}; 
 detach _cargo;
 sleep 4;
 deleteVehicle _chute;
 _smoke = "SmokeShellRed" createVehicle position _cargo;
 _smoke attachto [_cargo,[0,0,0]];
 
 if (_rpt) then {
  diag_log "###ETG Heli Crash and Drop Script by Kellojo###";
  diag_log format ["###Cargodrop position: %1",position _cargo];
  diag_log "###End###";
 };

 if !(isNil "_markertp") then {
  if !(isNil "ETG_HCADS_dropMarker") then {
   deleteMarker ETG_HCADS_dropMarker;
  };
  ETG_HCADS_dropMarker = createMarker ["",position _cargo];
  ETG_HCADS_dropMarker setMarkerType _markertp;
 };
 
 if (_ai) then {
 _hcunits = [position _cargo, EAST, _aiunits,[],[],[],[],[],180] call BIS_fnc_spawnGroup;
  _hcg = group (leader _hcunits);
  _hcg addWaypoint [position _cargo, 0];
  [_hcg, 0] setWaypointType "GUARD";
  [_hcg, 0] setWaypointBehaviour "AWARE";
  {
   removeBackpackGlobal _x;
   removeAllWeapons _x;
   _curW = _weapons call BIS_fnc_selectRandom;
   [_x,_curW, 5] call BIS_fnc_addWeapon;
  } forEach units _hcunits;
 };
 
 //Wait for crash & crash
 waituntil {ETG_tvehcrash  || (getDammage (_veh select 0) > 0.2)};
 (_veh select 0) setDamage 1;
 
 waituntil {(getPos (_veh select 0) select 2) < 1};
 sleep 10;
 
 _crashpos = position (_veh select 0);
 _crashrot = getDir (_veh select 0);
 sleep 2;
 deleteVehicle (_veh select 0);
 
 if !(isNil "_markertp") then {
  ETG_HCADS_dropMarker = createMarker ["",_crashpos];
  ETG_HCADS_dropMarker setMarkerType _markertp;
 };
 
 _cheli = createVehicle ["Land_Wreck_Heli_Attack_01_F",_crashpos,[], 0, "can_collide"];
 _cheli setDir _crashrot;
 _cheli setPos [position _cheli select 0,position _cheli select 1, 0.1];
 _cheli setVectorUp surfaceNormal position _cheli;
 _smokeeff = createVehicle ["test_EmptyObjectForSmoke",position _cheli,[], 0, "can_collide"];
 _smokeeff attachTo [_cheli, [0.5, -2, 1] ];
 _fireeff = createVehicle ["Campfire_burning_F",_crashpos,[], 0, "can_collide"];
 
 if (_ai) then {
  _hcunits = [position _cheli, EAST, _aiunits,[],[],[],[],[],180] call BIS_fnc_spawnGroup;
  _hcg = group (leader _hcunits);
  _hcg addWaypoint [position _cargo, 0];
  [_hcg, 0] setWaypointType "GUARD";
  [_hcg, 0] setWaypointBehaviour "AWARE";
  {
   removeBackpackGlobal _x;
   removeAllWeapons _x;
   _curW = _weapons call BIS_fnc_selectRandom;
   [_x,_curW, 5] call BIS_fnc_addWeapon;
  } forEach units _hcunits;
 };
 
 if (_rpt) then {
  diag_log "###ETG Heli Crash and Drop Script by Kellojo###";
  diag_log format ["###Helicrash position: %1",_crashpos];
  diag_log "###End###";
 };
 
 _weapc = 0;
 _maxweapc = round (random _MaxWeap);
 _whold = createVehicle ["Box_IND_Wps_F",_crashpos,[], 25, "none"];
 clearMagazineCargoGlobal _whold;
 clearWeaponCargoGlobal _whold;
 clearItemCargoGlobal _whold;
 clearBackpackCargoGlobal _whold;
 while {_weapc < _maxweapc} do {
  _weapc = _weapc + 1;
  _curri = _Weapons call BIS_fnc_selectRandom;
  _Ammount = 1;
  _whold addWeaponCargoGlobal [_curri,_Ammount];
  _mag = getArray (configFile / "CfgWeapons" / _curri / "magazines");
  _whold addMagazineCargoGlobal [(_mag select 0),round random 6];
 };

 _magc = 0;
 _maxmagc = round (random _MaxMag);
 _whold = createVehicle ["Box_IND_Wps_F",_crashpos,[], 25, "none"];
 clearMagazineCargoGlobal _whold;
 clearWeaponCargoGlobal _whold;
 clearItemCargoGlobal _whold;
 clearBackpackCargoGlobal _whold;
 while {_magc < _maxmagc} do {
  _magc = _magc + 1;
  _curri = _magazines call BIS_fnc_selectRandom;
  _Ammount = round (random _MaxItem);

  _whold addMagazineCargoGlobal [_curri,_Ammount]; 
 };

 _ic = 0;
 _maxic = round (random _MaxItem);
 _whold = createVehicle ["Box_East_Grenades_F",_crashpos,[], 25, "none"];
 clearMagazineCargoGlobal _whold;
 clearWeaponCargoGlobal _whold;
 clearItemCargoGlobal _whold;
 clearBackpackCargoGlobal _whold;
 while {_ic < _maxic} do {
  _ic = _ic + 1;
  _curri = _Items call BIS_fnc_selectRandom;
  _Ammount = 1;
  _whold addItemCargoGlobal [_curri,_Ammount]; 
 };

 _bpackc = 0;
 _maxbpackc = round (random _MaxBpack);
 _whold = createVehicle ["Box_East_Grenades_F",_crashpos,[], 25, "none"];
 clearMagazineCargoGlobal _whold;
 clearWeaponCargoGlobal _whold;
 clearItemCargoGlobal _whold;
 clearBackpackCargoGlobal _whold;
 while {_bpackc < _maxbpackc} do {
  _bpackc = _bpackc + 1;
  _curri = _Backpacks call BIS_fnc_selectRandom;
  _Ammount = 1;
  clearBackpackCargoGlobal _whold;
  _whold addBackpackCargoGlobal [_curri,_Ammount]; 
 };

 [1] call fn_crashdrop;
};

 

 

 

Share this post


Link to post
Share on other sites

@Gill93,

Dude, much better to use spoiler tags for that code....it hurts my eyes. ^^  :shocked:

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, EO said:

@Gill93,

Dude, much better to use spoiler tags for that code....it hurts my eyes. ^^  :shocked:

lol srry about tht

Share this post


Link to post
Share on other sites
24 minutes ago, Gill93 said:

I think needs adjusting  (waituntil {(getPos _cargo select 2) < 20}; 
 detach _cargo;)

Hello there Gill93 !

 

Is this part of the code? (the quote)

Did you test it?

 

change and check  :

waitUntil {getPos _cargo select 2 < 0};
          
detach _cargo;
_chute disableCollisionWith _cargo;   

_time = time + 6;
waitUntil {time > _time};       
if (!isNull _chute) then {deleteVehicle _chute};

This is part of my  :

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
Just now, GEORGE FLOROS GR said:

Hello there Gill93 !

 

Is this part of the code? (the quote)

Did you test it?

 

check and change  :


waitUntil {getPos _cargo select 2 < 0};
          
detach _cargo;
_chute disableCollisionWith _cargo;   

_time = time + 6;
waitUntil {time > _time};       
if (!isNull _chute) then {deleteVehicle _chute};

This is part of my  :

 

oh thanks man I will definitely try that out keep up the good work (:

  • Thanks 1

Share this post


Link to post
Share on other sites

My Ravage MP mission is now released on bohemia forums!:

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

haleks I love this mission,

 

Was wondering if there is any way to get zombies not to walk through buildings.  If you run out of ammo and run in a building, lock the door, the zombies walk right through the walls and get you anyway. No way of waiting for other help to arrive to help you.

 

Share this post


Link to post
Share on other sites
10 hours ago, Big Daddy Grimm said:

haleks I love this mission,

 

Was wondering if there is any way to get zombies not to walk through buildings.  If you run out of ammo and run in a building, lock the door, the zombies walk right through the walls and get you anyway. No way of waiting for other help to arrive to help you.

 

 

Ive never seen Zombies walk through walls, which mission was this on?

Share this post


Link to post
Share on other sites

Zeds walking through walls is extremely rare but it can happen, especially on modded terrains (Cheranus Redux for instance has a few concrete barriers that don't work on AI).

 

What is way too common though, is AI walking through closed doors. Honestly, this is BI's job. We know already that it can be fixed, just place an AI or a Zed in a building, lock all doors with the Eden module and, surprise, it works!

The best course of action is to file a bug report and be vocal about it - hopefully we will see a definitive fix one of these days.

  • Like 3

Share this post


Link to post
Share on other sites

The snake got the solution for open the door :)

  • Like 3

Share this post


Link to post
Share on other sites
4 hours ago, damsous said:

The snake

 

The animals generally , spawned depending scripts can also open doors.!

Share this post


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

мод хороший . нет перевязочного пакета .

 

Please type in English as this is an English speaking forum.

Share this post


Link to post
Share on other sites

@bomga1983: What Roadki11 said. ^^

Right now google trad tells me "mod good. no dressing bag"...

 

I'm pretty sure you didn't mean that, did you?

a6fe54a624da59e55fe1957e090a7153--cute-t

  • Haha 3

Share this post


Link to post
Share on other sites

Hi @haleks,

Any news about the bleeding system you mentioned further back? 

I'm just curious, you know :icon_biggrin:

 

Btw nice update, I like the idea of zombie hordes.

Share this post


Link to post
Share on other sites

@haleks

Any idea how the loot "randomization" works?

 

In other words, how often does loot in an area (inside luggages, trash bins, piles, and wreckages) get randomized?

Share this post


Link to post
Share on other sites

Also does anyone know how to speed up the nighttime in MP and SP missions?

Share this post


Link to post
Share on other sites
23 часа назад, галекс сказал

@bomga1983: что Roadki11 сказал. ^^

Прямо сейчас Google трад говорит мне:"мод хороший. не одевая мешок".

 

Я почти уверен, что ты не это имел в виду, не так ли?

a6fe54a624da59e55fe1957e090a7153 -- cute-t

мод хороший .

Share this post


Link to post
Share on other sites

The 5 steps to Infection...

Spoiler

4973EEAC7C94390ABE3E526CBBEDBB996074E8020E775B047832BFDAE308BF777C1D2E5CC1E883D087131EDA803A44145D0FC3DF0F9D7930F8333F69212653DDD541594694C1010CC9314B1513C4B07A163D7EA838DB59458688E2D5958E58E6CB07F63A

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites

 

12 hours ago, lv1234 said:

Also does anyone know how to speed up the nighttime in MP and SP missions?

 

Share this post


Link to post
Share on other sites
12 hours ago, lv1234 said:

Also does anyone know how to speed up the nighttime in MP and SP missions?

If you want day & Night to cycle faster you will need to increase the Time Acceleration in one of the ravage modules cannot remember what one atm but the default level is x4 you will want to increase to x5 or higher.

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

×