Jump to content
Richie

Dayz style heli crash sites

Recommended Posts

Not sure if it correct way but it works, the AI spawn, just in the rpt give the same crashsite number......

Infantry spawns using the A3EAI thx second_coming

//Infantry spawns using the A3EAI thx second_coming
_crashObj = format ["Crashsite_%1",_crash_amount];
[_crashObj,_crashpos,75,3,2,false,300] call A3EAI_createCustomInfantryQueue;  
diag_log text format ["[Crashsite]: Creating AI at %1 (%2)",_crashObj,_crashpos]; 

insert code between

_crashObj_final = _crashObj createVehicle _crashpos;

insert here

_fire = "test_EmptyObjectForFireBig" createVehicle _crashpos;

Share this post


Link to post
Share on other sites
On 6/29/2017 at 9:45 PM, truemc said:

Thanks but helicrshes spawn outside map....

soz for the late reply

btw what map are you using....

_crashpos = [rms_mapcenter_pos, 100, 15000,15,0,30,0] call BIS_fnc_findSafePos;

try this, and let me know plz

_crashpos = [rms_mapcenter_pos, 100, 12000,15,0,30,0] call BIS_fnc_findSafePos;

 

cheers

naoted

 

Share this post


Link to post
Share on other sites
8 hours ago, natoed said:

soz for the late reply

btw what map are you using....

_crashpos = [rms_mapcenter_pos, 100, 15000,15,0,30,0] call BIS_fnc_findSafePos;

try this, and let me know plz

_crashpos = [rms_mapcenter_pos, 100, 12000,15,0,30,0] call BIS_fnc_findSafePos;

 

cheers

naoted

 

I use Chernarus

Share this post


Link to post
Share on other sites

16:02:11 Warning Message: Script \x\addons\helicrash\init\fn_init.sqf not found
16:02:16 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. a3_characters_f

*?*

Share this post


Link to post
Share on other sites
On 7/11/2017 at 10:09 AM, Heinz said:

16:02:11 Warning Message: Script \x\addons\helicrash\init\fn_init.sqf not found
16:02:16 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. a3_characters_f

*?*

The second message is unrelated to the first btw and can be ignored. As far as the heli crash script goes, I agree with @natoed, I updated to the script he's linked too. Works great!

Share this post


Link to post
Share on other sites

       Add these lines in @natoed`s HeliCrash.sqf after:

 _fire attachto [_crashObj_final, [0,0,-1]];  

to make it more easier to find the loot ;)

 

         _grass1 = "ClutterCutter" createVehicle _crashpos;
        _grass1 attachto [_crashObj_final, [5,5,0]]; 
        
        _grass2 = "ClutterCutter" createVehicle _crashpos;
        _grass2 attachto [_crashObj_final, [5,-5,0]]; 
        
        _grass3 = "ClutterCutter" createVehicle _crashpos;
        _grass3 attachto [_crashObj_final, [-5,5,0]]; 
        
        _grass4 = "ClutterCutter" createVehicle _crashpos;
        _grass4 attachto [_crashObj_final, [-5,-5,0]]; 

Share this post


Link to post
Share on other sites

@DrokzI couldn't find the heliCrash.sqf from the OP, but I grabbed the heliCrash.pbo linked by @natoed I've tested this on my A2 server,( just the nearestObjects check and the while loop by its self and not the full script though), not on an A3 server but I don't see why it wouldn't work.

Please let me know if there's any issues.

Spoiler

//#################################################
//### UKGZ 2016 by rvg?! & TheStainlessSteelRat ###
//#################################################

rms_crashsite_amount = [8,15];            // Amount of crashsites
rms_crashsite_loot_amount = [2,5];        // Amount of lootpiles close to each crashsite
_minDistance = 200; // Minimum distance from other wrecks as defined in the array rms_wrecks.

rms_wrecks = ["Land_Wreck_BMP2_F","Land_Wreck_BRDM2_F","Land_Wreck_HMMWV_F","Land_Wreck_Skodovka_F","Land_Wreck_CarDismantled_F","Land_Wreck_Truck_F","Land_Wreck_Car2_F",
"Land_Wreck_Car_F","Land_Wreck_Car3_F","Land_Wreck_Hunter_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad2_F","Land_Wreck_UAZ_F","Land_Wreck_Truck_dropside_F",
"Land_Wreck_Van_F","Land_Wreck_Heli_Attack_01_F"];

rms_guns =  ["ruger_pistol_epoch","ruger_pistol_epoch_snds_F","ruger_pistol_epoch_pointer_F","1911_pistol_epoch","hgun_ACPC2_F","hgun_ACPC2_snds_F","hgun_P07_F",
"hgun_P07_snds_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_01_snds_F","hgun_Pistol_heavy_01_MRD_F","hgun_Pistol_heavy_02_F","hgun_Pistol_heavy_02_Yorris_F",
"hgun_Rook40_F","hgun_Rook40_snds_F","hgun_Pistol_Signal_F","hgun_P07_khk_F","hgun_Pistol_01_F","Hatchet","CrudeHatchet","MultiGun",
"arifle_Mk20_F","arifle_Mk20_plain_F","arifle_Mk20C_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_F","arifle_Mk20_GL_plain_F","arifle_Mk20C_ACO_F","arifle_Mk20C_ACO_pointer_F",
"arifle_Mk20_pointer_F","arifle_Mk20_Holo_F","arifle_Mk20_ACO_F","arifle_Mk20_ACO_pointer_F","arifle_Mk20_MRCO_F","arifle_Mk20_MRCO_plain_F","arifle_Mk20_MRCO_pointer_F",
"arifle_Mk20_GL_MRCO_pointer_F","arifle_Mk20_GL_ACO_F","arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_TRG20_Holo_F","arifle_TRG20_ACO_pointer_F",
"arifle_TRG20_ACO_Flash_F","arifle_TRG20_ACO_F","arifle_TRG21_ACO_pointer_F","arifle_TRG21_ARCO_pointer_F","arifle_TRG21_MRCO_F","arifle_TRG21_GL_MRCO_F",
"arifle_TRG21_GL_ACO_pointer_F","hgun_PDW2000_F","hgun_PDW2000_snds_F","hgun_PDW2000_Holo_F","hgun_PDW2000_Holo_snds_F","SMG_01_F","SMG_01_Holo_F","SMG_01_Holo_pointer_snds_F",
"SMG_01_ACO_F","SMG_02_F","SMG_02_ACO_F","SMG_02_ARCO_pointg_F","m4a3_EPOCH","m16_EPOCH","m16Red_EPOCH","m249_EPOCH","m249Tan_EPOCH","LMG_03_F","arifle_AKS_F","arifle_CTAR_blk_F",
"arifle_CTAR_hex_F","arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTAR_GL_hex_F","arifle_CTAR_GL_ghex_F","arifle_CTAR_blk_ACO_Pointer_F","arifle_CTAR_blk_Pointer_F",
"arifle_CTAR_blk_ACO_F","arifle_CTAR_GL_blk_ACO_F","arifle_CTAR_blk_ARCO_Pointer_F","arifle_CTAR_blk_ACO_Pointer_Snds_F","arifle_CTAR_GL_blk_ACO_Pointer_Snds_F","arifle_CTAR_blk_ARCO_Pointer_Snds_F",
"arifle_CTAR_blk_ARCO_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_CTARS_blk_Pointer_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",
"SMG_05_F","ChainSaw","ChainSawB","ChainSawG","ChainSawP","ChainSawR","l85a2_epoch","l85a2_ris_epoch","l85a2_ris_ng_epoch","l85a2_pink_epoch","l85a2_ugl_epoch",
"LMG_Mk200_F","LMG_Mk200_MRCO_F","LMG_Mk200_pointer_F","arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_Katiba_C_ACO_pointer_F","arifle_Katiba_C_ACO_F",
"arifle_Katiba_ACO_F","arifle_Katiba_pointer_F","arifle_Katiba_ACO_pointer_F","arifle_Katiba_ARCO_F","arifle_Katiba_ARCO_pointer_F","arifle_Katiba_GL_ACO_F",
"arifle_Katiba_GL_ARCO_pointer_F","arifle_Katiba_GL_ACO_pointer_F","arifle_Katiba_GL_Nstalker_pointer_F","arifle_Katiba_GL_ACO_pointer_snds_F",
"arifle_Katiba_C_ACO_pointer_snds_F","arifle_Katiba_ACO_pointer_snds_F","arifle_Katiba_ARCO_pointer_snds_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F",
"arifle_MX_SW_F","arifle_MXM_F","arifle_MX_pointer_F","arifle_MX_Holo_pointer_F","arifle_MX_Hamr_pointer_F","arifle_MX_ACO_pointer_F","arifle_MX_ACO_F",
"arifle_MX_GL_ACO_F","arifle_MX_GL_ACO_pointer_F","arifle_MX_GL_Hamr_pointer_F","arifle_MXC_Holo_F","arifle_MXC_Holo_pointer_F","arifle_MX_SW_pointer_F",
"arifle_MX_SW_Hamr_pointer_F","arifle_MXM_Hamr_pointer_F","arifle_MXC_ACO_F","arifle_MXC_Holo_pointer_snds_F","arifle_MXC_SOS_point_snds_F",
"arifle_MXC_ACO_pointer_snds_F","arifle_MXC_ACO_pointer_F","arifle_MX_ACO_pointer_snds_F","arifle_MX_RCO_pointer_snds_F","arifle_MX_GL_Holo_pointer_snds_F",
"arifle_MXM_SOS_pointer_F","arifle_MXM_RCO_pointer_snds_F","arifle_MXM_DMS_F","arifle_MXC_Black_F","arifle_MX_Black_F","arifle_MX_GL_Black_F",
"arifle_MX_SW_Black_F","arifle_MXM_Black_F","arifle_MX_GL_Black_Hamr_pointer_F","arifle_MX_Black_Hamr_pointer_F","arifle_MX_SW_Black_Hamr_pointer_F",
"LMG_Mk200_LP_BI_F","LMG_Mk200_BI_F"];

fn_rnd_num = {

_low = _this select 0;
_high = _this select 1; 
_calc = _high - _low;
_rnd_num = round(random _calc) + _low;

_rnd_num

};

_size = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");

rms_mapcenter_pos = [_size/2,_size/2,0];

_crash_amount = rms_crashsite_amount call fn_rnd_num;

_i = 0;
while {_i <= _crash_amount} do {
    _validPos = true;
    _crashpos = [rms_mapcenter_pos, 100, 15000,15,0,30,0] call BIS_fnc_findSafePos;
    
    if (count (nearestObjects [_crashpos,rms_wrecks, _minDistance]) > 0) then {_validPos = false;uiSleep 0.5;};
    
    if (_validPos) then {
        _i = _i + 1;

        _loot_amount = rms_crashsite_loot_amount call fn_rnd_num;
        
        rms_wrecks call BIS_fnc_arrayshuffle;
        _crashObj = rms_wrecks call BIS_fnc_SelectRandom;
        
        _crashObj_final = _crashObj createVehicle _crashpos;
        
        _fire = "test_EmptyObjectForFireBig" createVehicle _crashpos;
        _fire attachto [_crashObj_final, [0,0,-1]];  
        
        _crashObj_final setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
        
        for "_crashloot" from 1 to _loot_amount do {
        
            _lootpos = [_crashpos,2,10,0,0,30,0] call BIS_fnc_findSafePos;
            
            _crate0 = createVehicle ["groundWeaponHolder", _lootpos, [], 0, "can_collide"];
                    
            rms_guns call BIS_fnc_arrayshuffle;
            _lootObj = rms_guns call BIS_fnc_SelectRandom;
            
            _ammo = getarray(configFile >> "cfgWeapons" >> _lootObj >> "magazines" );
                        
            _crate0 addItemCargoGlobal [_lootobj, 1]; 
            _crate0 addItemCargoGlobal [_ammo select 0, 3];
            
            _crate0 setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
        
        };
    
    diag_log format ["[RMS] Crashsite at %1 with %2 lootpiles ",_crashpos,_loot_amount];
    };
};

 

Share this post


Link to post
Share on other sites
Just now, salival said:

@DrokzI couldn't find the heliCrash.sqf from the OP, but I grabbed the heliCrash.pbo linked by @natoed I've tested this on my A2 server just the nearestObjects check and the while loop by its self and not the full script though, not on an A3 server but I don't see why it wouldnt work.

Please let me know if there's any issues.

  Reveal hidden contents

//#################################################
//### UKGZ 2016 by rvg?! & TheStainlessSteelRat ###
//#################################################

rms_crashsite_amount = [8,15];            // Amount of crashsites
rms_crashsite_loot_amount = [2,5];        // Amount of lootpiles close to each crashsite
_minDistance = 200; // Minimum distance from other wrecks as defined in the array rms_wrecks.

rms_wrecks = ["Land_Wreck_BMP2_F","Land_Wreck_BRDM2_F","Land_Wreck_HMMWV_F","Land_Wreck_Skodovka_F","Land_Wreck_CarDismantled_F","Land_Wreck_Truck_F","Land_Wreck_Car2_F",
"Land_Wreck_Car_F","Land_Wreck_Car3_F","Land_Wreck_Hunter_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad2_F","Land_Wreck_UAZ_F","Land_Wreck_Truck_dropside_F",
"Land_Wreck_Van_F","Land_Wreck_Heli_Attack_01_F"];

rms_guns =  ["ruger_pistol_epoch","ruger_pistol_epoch_snds_F","ruger_pistol_epoch_pointer_F","1911_pistol_epoch","hgun_ACPC2_F","hgun_ACPC2_snds_F","hgun_P07_F",
"hgun_P07_snds_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_01_snds_F","hgun_Pistol_heavy_01_MRD_F","hgun_Pistol_heavy_02_F","hgun_Pistol_heavy_02_Yorris_F",
"hgun_Rook40_F","hgun_Rook40_snds_F","hgun_Pistol_Signal_F","hgun_P07_khk_F","hgun_Pistol_01_F","Hatchet","CrudeHatchet","MultiGun",
"arifle_Mk20_F","arifle_Mk20_plain_F","arifle_Mk20C_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_F","arifle_Mk20_GL_plain_F","arifle_Mk20C_ACO_F","arifle_Mk20C_ACO_pointer_F",
"arifle_Mk20_pointer_F","arifle_Mk20_Holo_F","arifle_Mk20_ACO_F","arifle_Mk20_ACO_pointer_F","arifle_Mk20_MRCO_F","arifle_Mk20_MRCO_plain_F","arifle_Mk20_MRCO_pointer_F",
"arifle_Mk20_GL_MRCO_pointer_F","arifle_Mk20_GL_ACO_F","arifle_SDAR_F","arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_TRG20_Holo_F","arifle_TRG20_ACO_pointer_F",
"arifle_TRG20_ACO_Flash_F","arifle_TRG20_ACO_F","arifle_TRG21_ACO_pointer_F","arifle_TRG21_ARCO_pointer_F","arifle_TRG21_MRCO_F","arifle_TRG21_GL_MRCO_F",
"arifle_TRG21_GL_ACO_pointer_F","hgun_PDW2000_F","hgun_PDW2000_snds_F","hgun_PDW2000_Holo_F","hgun_PDW2000_Holo_snds_F","SMG_01_F","SMG_01_Holo_F","SMG_01_Holo_pointer_snds_F",
"SMG_01_ACO_F","SMG_02_F","SMG_02_ACO_F","SMG_02_ARCO_pointg_F","m4a3_EPOCH","m16_EPOCH","m16Red_EPOCH","m249_EPOCH","m249Tan_EPOCH","LMG_03_F","arifle_AKS_F","arifle_CTAR_blk_F",
"arifle_CTAR_hex_F","arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTAR_GL_hex_F","arifle_CTAR_GL_ghex_F","arifle_CTAR_blk_ACO_Pointer_F","arifle_CTAR_blk_Pointer_F",
"arifle_CTAR_blk_ACO_F","arifle_CTAR_GL_blk_ACO_F","arifle_CTAR_blk_ARCO_Pointer_F","arifle_CTAR_blk_ACO_Pointer_Snds_F","arifle_CTAR_GL_blk_ACO_Pointer_Snds_F","arifle_CTAR_blk_ARCO_Pointer_Snds_F",
"arifle_CTAR_blk_ARCO_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_CTARS_blk_Pointer_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",
"SMG_05_F","ChainSaw","ChainSawB","ChainSawG","ChainSawP","ChainSawR","l85a2_epoch","l85a2_ris_epoch","l85a2_ris_ng_epoch","l85a2_pink_epoch","l85a2_ugl_epoch",
"LMG_Mk200_F","LMG_Mk200_MRCO_F","LMG_Mk200_pointer_F","arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_Katiba_C_ACO_pointer_F","arifle_Katiba_C_ACO_F",
"arifle_Katiba_ACO_F","arifle_Katiba_pointer_F","arifle_Katiba_ACO_pointer_F","arifle_Katiba_ARCO_F","arifle_Katiba_ARCO_pointer_F","arifle_Katiba_GL_ACO_F",
"arifle_Katiba_GL_ARCO_pointer_F","arifle_Katiba_GL_ACO_pointer_F","arifle_Katiba_GL_Nstalker_pointer_F","arifle_Katiba_GL_ACO_pointer_snds_F",
"arifle_Katiba_C_ACO_pointer_snds_F","arifle_Katiba_ACO_pointer_snds_F","arifle_Katiba_ARCO_pointer_snds_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F",
"arifle_MX_SW_F","arifle_MXM_F","arifle_MX_pointer_F","arifle_MX_Holo_pointer_F","arifle_MX_Hamr_pointer_F","arifle_MX_ACO_pointer_F","arifle_MX_ACO_F",
"arifle_MX_GL_ACO_F","arifle_MX_GL_ACO_pointer_F","arifle_MX_GL_Hamr_pointer_F","arifle_MXC_Holo_F","arifle_MXC_Holo_pointer_F","arifle_MX_SW_pointer_F",
"arifle_MX_SW_Hamr_pointer_F","arifle_MXM_Hamr_pointer_F","arifle_MXC_ACO_F","arifle_MXC_Holo_pointer_snds_F","arifle_MXC_SOS_point_snds_F",
"arifle_MXC_ACO_pointer_snds_F","arifle_MXC_ACO_pointer_F","arifle_MX_ACO_pointer_snds_F","arifle_MX_RCO_pointer_snds_F","arifle_MX_GL_Holo_pointer_snds_F",
"arifle_MXM_SOS_pointer_F","arifle_MXM_RCO_pointer_snds_F","arifle_MXM_DMS_F","arifle_MXC_Black_F","arifle_MX_Black_F","arifle_MX_GL_Black_F",
"arifle_MX_SW_Black_F","arifle_MXM_Black_F","arifle_MX_GL_Black_Hamr_pointer_F","arifle_MX_Black_Hamr_pointer_F","arifle_MX_SW_Black_Hamr_pointer_F",
"LMG_Mk200_LP_BI_F","LMG_Mk200_BI_F"];

fn_rnd_num = {

_low = _this select 0;
_high = _this select 1; 
_calc = _high - _low;
_rnd_num = round(random _calc) + _low;

_rnd_num

};

_size = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");

rms_mapcenter_pos = [_size/2,_size/2,0];

_crash_amount = rms_crashsite_amount call fn_rnd_num;

_i = 0;
while {_i <= _crash_amount} do {
    _validPos = true;
    _crashpos = [rms_mapcenter_pos, 100, 15000,15,0,30,0] call BIS_fnc_findSafePos;
    
    if (count (nearestObjects [_crashpos,rms_wrecks, _minDistance]) > 0) then {_validPos = false;uiSleep 0.5;};
    
    if (_validPos) then {
        _i = _i + 1;

        _loot_amount = rms_crashsite_loot_amount call fn_rnd_num;
        
        rms_wrecks call BIS_fnc_arrayshuffle;
        _crashObj = rms_wrecks call BIS_fnc_SelectRandom;
        
        _crashObj_final = _crashObj createVehicle _crashpos;
        
        _fire = "test_EmptyObjectForFireBig" createVehicle _crashpos;
        _fire attachto [_crashObj_final, [0,0,-1]];  
        
        _crashObj_final setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
        
        for "_crashloot" from 1 to _loot_amount do {
        
            _lootpos = [_crashpos,2,10,0,0,30,0] call BIS_fnc_findSafePos;
            
            _crate0 = createVehicle ["groundWeaponHolder", _lootpos, [], 0, "can_collide"];
                    
            rms_guns call BIS_fnc_arrayshuffle;
            _lootObj = rms_guns call BIS_fnc_SelectRandom;
            
            _ammo = getarray(configFile >> "cfgWeapons" >> _lootObj >> "magazines" );
                        
            _crate0 addItemCargoGlobal [_lootobj, 1]; 
            _crate0 addItemCargoGlobal [_ammo select 0, 3];
            
            _crate0 setVariable ["LAST_CHECK", (diag_tickTime + 14400)];
        
        };
    
    diag_log format ["[RMS] Crashsite at %1 with %2 lootpiles ",_crashpos,_loot_amount];
    };
};

 

Yea thats the one i use. So even better. Thx ill give it a try! 

Share this post


Link to post
Share on other sites
On 4/12/2018 at 3:51 AM, godmode8 said:

need fixed .pbo :)

try here https://github.com/natoed/Oceanic--1-Epoch-Zurvival-Chernarus-Redux/blob/master/%40epochhive/addons/helicrash.pbo

note: change loot to sort your needs

HeliCrashes.sqf change line 30 from

this

rms_mapcenter_pos = [6865.42,0,9218.16]; //[_size/2,_size/2,0];

to

rms_mapcenter_pos = [_size/2,_size/2,0];

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...