Jump to content

Dayz style heli crash sites


Richie

Recommended Posts

Hi

 

Awesome script !

 

Here is some modifications i've made to fit more my way

 

First, i've set a random number of crash (here, i got between 5 and 10 crash on each restart)

_crashNum = (floor(random 6) + 5);

Second, the loot pile number, i've set it to have between 3 et 5

_lootNum = (floor(random 3) + 3);

The loot array, i've redo it completly, to have less "high" weapons, and more "small" things (the much the item repeat, the much chance to have it)

_loot = [
	"ChainSaw",
	"CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts","CircuitParts",
	"JackKit","JackKit","JackKit","JackKit","JackKit",
	"ItemLockbox",
	"ItemCompass","ItemCompass","ItemCompass","ItemCompass","ItemCompass","ItemCompass","ItemCompass",
	"ItemGPS","ItemGPS","ItemGPS","ItemGPS",
	"VehicleRepair","VehicleRepair","VehicleRepair",
	"ItemWatch","ItemWatch","ItemWatch","ItemWatch","ItemWatch",
	"Binocular","Binocular","Binocular","Binocular","Binocular","Binocular","Binocular",
	"NVG_EPOCH","NVG_EPOCH","NVG_EPOCH","NVG_EPOCH",
	"srifle_GM6_F",
	"srifle_LRR_F",
	"srifle_EBR_F","srifle_EBR_F","srifle_EBR_F",
	"srifle_DMR_01_F","srifle_DMR_01_F","srifle_DMR_01_F","srifle_DMR_01_F",
	"sr25_epoch","sr25_epoch","sr25_epoch","sr25_epoch","sr25_epoch",
	"arifle_Katiba_F","arifle_Katiba_F","arifle_Katiba_F","arifle_Katiba_F","arifle_Katiba_F",
	"arifle_MXC_F","arifle_MXC_F","arifle_MXC_F","arifle_MXC_F","arifle_MXC_F","arifle_MXC_F","arifle_MXC_F",
	"arifle_MXM_F","arifle_MXM_F","arifle_MXM_F","arifle_MXM_F",
	"LMG_Mk200_F","LMG_Mk200_F","LMG_Mk200_F",
	"arifle_MX_SW_F","arifle_MX_SW_F","arifle_MX_SW_F","arifle_MX_SW_F",
	"srifle_DMR_02_F",
	"srifle_DMR_04_F",
	"srifle_DMR_05_blk_F",
	"MMG_01_hex_F",
	"MMG_02_camo_F",
	"m249_EPOCH","m249_EPOCH",
	"m107_EPOCH",
	"m16_EPOCH","m16_EPOCH","m16_EPOCH","m16_EPOCH","m16_EPOCH","m16_EPOCH",
	"m4a3_EPOCH","m4a3_EPOCH","m4a3_EPOCH","m4a3_EPOCH","m4a3_EPOCH","m4a3_EPOCH",
	"M14_EPOCH","M14_EPOCH","M14_EPOCH",
	"AKM_EPOCH","AKM_EPOCH","AKM_EPOCH",
	"FoodBioMeat","FoodBioMeat","FoodBioMeat","FoodBioMeat","FoodBioMeat",
	"FoodSnooter","FoodSnooter","FoodSnooter","FoodSnooter","FoodSnooter",
	"ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout",
	"scam_epoch","scam_epoch","scam_epoch","scam_epoch","scam_epoch",
	"honey_epoch","honey_epoch","honey_epoch",
	"ItemSodaOrangeSherbet","ItemSodaOrangeSherbet","ItemSodaOrangeSherbet","ItemSodaOrangeSherbet","ItemSodaOrangeSherbet",
	"ItemSodaBurst","ItemSodaBurst","ItemSodaBurst","ItemSodaBurst","ItemSodaBurst",
	"ItemSodaPurple","ItemSodaPurple","ItemSodaPurple","ItemSodaPurple","ItemSodaPurple",
	"Rangefinder",
	"ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated"
];

To have the loot pile randomly around the helicrash, i use a random generation for the crate createVehicle function

_val = [-6,-5,-4,-3,3,4,5,6];
_posCrate = _val call BIS_fnc_SelectRandom;
_posCrate2 = _val call BIS_fnc_SelectRandom;

_crate0 = createVehicle ["weaponHolderSimulated", _vehHeli modelToWorld [(random 10) - _posCrate, (random 10) - _posCrate2, 0], [], 0, "CAN_COLLIDE"];

Same for the setPos on crate

_posNumb = _val call BIS_fnc_SelectRandom;
_posNumb2 = _val call BIS_fnc_SelectRandom;
_crate0 setPos [(getPos _crate0 select 0) + _posNumb, (getPos _crate0 select 1) + _posNumb2, 0];

I've also remove the seconde _crate, so i only have _crate0

 

Finally, i've use the code of Halv so i don't have heli crash all together sometimes

_allpositions = [];

vSpawnCrashes = {
    for "_j" from 1 to _crashNum do {
        _posOfCrash = _spawnCenter;
		
        while{true}do{
	    _posOfCrash = [_spawnCenter,_min,_max,_mindist,_water,20,_shoremode] call BIS_fnc_findSafePos; // find a random loc
	    if({_posOfCrash distance _x < 2000}count _allpositions < 1 && _posOfCrash distance _spawnCenter > 2000 || count _allpositions < 1)exitWith{};
        };
        _allpositions pushBack _posOfCrash;
    };
};

That's it, the result is quite good, and i'm happy with it ^^

 

Thanks Richie for your script !

Link to comment
Share on other sites

  • 3 weeks later...

Noticed there was a slight dip in CPS every min or so when monitoring through ASM after a few weeks of testing I set max crash sites to 8 and the dip has went away. With the current state of Arma 3 and Epoch we need all we can get so I thought I would share.

Link to comment
Share on other sites

Noticed there was a slight dip in CPS every min or so when monitoring through ASM after a few weeks of testing I set max crash sites to 8 and the dip has went away. With the current state of Arma 3 and Epoch we need all we can get so I thought I would share.

 

I've no idea why, the script runs once at restart and never again until the following restart.

Link to comment
Share on other sites

  • 2 weeks later...

Hi all, just dropped this pbo into epoch hive addons folder as per the instructions, only im not seeing any crash site, even using infistar to look, nor am i getting anything in my rpt saying its loaded. We have just changed to Chernarus map  so just want to double check if i must i put centre map coords in for cherno or is it drop the pbo in and play right away? And if i do need to put the coords in, will that explain why its not working?

 

Thanks in advance

Link to comment
Share on other sites

Hi all, just dropped this pbo into epoch hive addons folder as per the instructions, only im not seeing any crash site, even using infistar to look, nor am i getting anything in my rpt saying its loaded. We have just changed to Chernarus map  so just want to double check if i must i put centre map coords in for cherno or is it drop the pbo in and play right away? And if i do need to put the coords in, will that explain why its not working?

 

Thanks in advance

 

I put in the coordinates for Altis into the HeliCrashes.sqf file inside the PBO, repacked it and the script worked fine.

 

From OP:

Map center points, thank you Aale and San :)

Chernarus:    [6968.66, 324.481, 8345.91]

Altis:              [14939.9, 0.0534991, 15083.3]

Bornholm:      [10058.3, 117.542, 9015.85]

Stratis:           [4031.66, 110.605, 4222.18]

Taviana          [12800,0,12800]

Link to comment
Share on other sites

Uhg, didn't see the updated version, trying now.

 

***All seems to be working now, we gots lootz!

 

Heavy, are you using the one in the OP? i still cant see anything on the map, nor my rpt after entering centre coords for cherno :(

Link to comment
Share on other sites

Hi again folks, so i have tried Richie's OP version and Darth's version of this, dropped the pbo into epochhive/addons and nothing is happening, nothing on the map and not a mention of it in my rpt.  All i touched inside the pbo was added center coords for cherno, changed the max distance thing from 12000 to 7100 and lowered the loot to 7 from 10. Anyone have any idea's? Really want to use this, considering the ease of installation, and how it works perfect for some and not others... im totally stumped lol.

 

u66d_zpsh0bsr5ne.png

 

Thanks in advance

 

 

EDIT: ok so i was checking the client rpt lol, checked server rpt and im getting this "12:41:13 Warning Message: Script x\addons\helicrash\init\fn_init.sqf not found" using the one Darth posted, was there a solution to this?

 

EDIT2: so its finally started working on its own lol, dunno how but its working like a charm now :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...