Jump to content
Richie

Dayz style heli crash sites

Recommended Posts

My first release and i'm sure the code could be better, so don't shoot me :P

 

What this does is spawn a fixed number of heli crash sites with random loot round it.

The script works on all maps (Thank you Andrew_S90) and will spawn the crash sites randomly round the map.

 

The loot spawns on both sides of the crash, I did want it spawning 360 degrees but that's over my scripting ability.

The crash sites and loot stay in game until the next restart.

 

What can be changed  :

 

Number of crash sites that spawn - default is 5

Number of loot piles at the crash sites - default is 15

Loot that spawns - Edit the loot array

 

 

Installation :

 

To use simply drop the helicrash.pbo inside @epochhive/addons/ (Same location as a3_epoch_server.pbo and a3_epoch_server_settings.pbo)

No BE filters to edit :)

 

 

https://www.youtube.com/watch?v=2FmTthtULBw&feature=youtu.be

 

 

 

88x31.png

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

 

You may not charge for installing this script !

 

Credits - Richie, TheVampire & xBowBii

 

Download link is Here

 

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]

Share this post


Link to post
Share on other sites

Looks nice but you really should use BIS_fnc_findSafePos instead of selecting from a huge list of coordinates that you want the heli to spawn at.

 

So instead of having to add about a hundred different coordinates by hand, it randomly selects a good area thats customizable..

 

How it would work for your script..

//Variables you can change

_spawnCenter = [10088,9045,0]; //Center of your map (usually in mission.sqm)

_min = 0; // minimum distance from the center position (Number) in meters

_max = 12000; // maximum distance from the center position (Number) in meters

_mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters..
//Low _mindist means helicrashes could spawn near towns or in forests.. higher the number it would be spawning in an open field etc
_water = 0; // water mode 0: cannot be in water , 1: can either be in water or not , 2: must be in water
_shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore


//then in your script instead of...

_posOfCrash = _coords call BIS_fnc_SelectRandom;



//it would be

_posOfCrash = [_spawnCenter,_min,_max,_mindist,_water,20,_shoremode] call BIS_fnc_findSafePos; // find a random loc

_vehHeli setposATL [(_posOfCrash) select 0,(_posOfCrash) select 1,0];

//the "20" inside _posOfCrash would be the max height of a slope in meters it can spawn.. so lower = flatter land but I would keep it at 20 or so :D

Then all you have to do to modify it to your map would be change the center _spawnCenter and the distance

 

 

Hope this helps a bit

Share this post


Link to post
Share on other sites

That would work :) but i prefer fixed coordinates, i like them in funky locations so players have to explore, feel free to modify how you like it though.

 

*Edit*
So it works on all maps i think i'll follow your idea.

Share this post


Link to post
Share on other sites

Looks nice but you really should use BIS_fnc_findSafePos instead of selecting from a huge list of coordinates that you want the heli to spawn at.

 

So instead of having to add about a hundred different coordinates by hand, it randomly selects a good area thats customizable..

 

How it would work for your script..

//Variables you can change

_spawnCenter = [10088,9045,0]; //Center of your map (usually in mission.sqm)

_min = 0; // minimum distance from the center position (Number) in meters

_max = 12000; // maximum distance from the center position (Number) in meters

_mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters..
//Low _mindist means helicrashes could spawn near towns or in forests.. higher the number it would be spawning in an open field etc
_water = 0; // water mode 0: cannot be in water , 1: can either be in water or not , 2: must be in water
_shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore


//then in your script instead of...

_posOfCrash = _coords call BIS_fnc_SelectRandom;



//it would be

_posOfCrash = [_spawnCenter,_min,_max,_mindist,_water,20,_shoremode] call BIS_fnc_findSafePos; // find a random loc

_vehHeli setposATL [(_posOfCrash) select 0,(_posOfCrash) select 1,0];

//the "20" inside _posOfCrash would be the max height of a slope in meters it can spawn.. so lower = flatter land but I would keep it at 20 or so :D

Then all you have to do to modify it to your map would be change the center _spawnCenter and the distance

 

 

Hope this helps a bit

Where do I add?

Share this post


Link to post
Share on other sites
19.04.2015 16:24:27: Jonas (xxxxxxxxxxxx:2304) xxxxxxxxxxxxxxxxxxxxxxxxxxxxx - #4 "1 = "#particlesource" createVehicleLocal getpos _v;
_smoke1 attachTo [_v,[0,0,0],"engine_effect_1"];
_pos = getPos _smoke1;
dele"

19.04.2015 16:24:27: Jonas (xxxxxxxxxxxx:2304) xxxxxxxxxxxxxxxxxxxxxxxxxxxxx - #4 " setParticleClass "ObjectDestructionFire1Smallx";
_source01 attachto [_object,[0,0,0]];

19.04.2015 16:24:24: Jonas (187.10.26.113:2304) 4e2fd5a759f79ee5ab7da8c25bbfd3ba - #4 " setParticleClass "ObjectDestructionFire1Smallx";
_source01 attachto [_object,[0,0,0]];

_source02 = "#particlesource" createVeh"

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...