Richie Posted April 19, 2015 Report Share Posted April 19, 2015 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 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] mgm, DirtySanchez, Scorpi and 22 others 25 Link to comment Share on other sites More sharing options...
Andrew_S90 Posted April 19, 2015 Report Share Posted April 19, 2015 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 Richie 1 Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 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. Link to comment Share on other sites More sharing options...
Halvhjearne Posted April 19, 2015 Report Share Posted April 19, 2015 _spawnCenter = [10088,9045,0]; //Center of your map (usually in mission.sqm) not all maps center is in the same position, but you can get ceter position of any map like this: getMarkerPos "center" NuFaN 1 Link to comment Share on other sites More sharing options...
machine6fd Posted April 19, 2015 Report Share Posted April 19, 2015 riche are you spawning loot on the ground or in crates? Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 riche are you spawning loot on the ground or in crates? On the ground on both sides of the crash. Link to comment Share on other sites More sharing options...
PAR4NA Posted April 19, 2015 Report Share Posted April 19, 2015 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? Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 Updated to now support all maps :) Thank you Andrew_S90 for the code. Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 Where do I add? No need now, redownload it and it supports all maps :) Link to comment Share on other sites More sharing options...
mgm Posted April 19, 2015 Report Share Posted April 19, 2015 Nice one Richie, thanks for sharing and improving Link to comment Share on other sites More sharing options...
PAR4NA Posted April 19, 2015 Report Share Posted April 19, 2015 sniff sniff .... I'd just add the coordinates. hahaha I will use the new version ty Richie Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 sniff sniff .... I'd just add the coordinates. hahaha I will use the new version ty Richie I still use fixed coordinates on my server, use it how you like :) Link to comment Share on other sites More sharing options...
PAR4NA Posted April 19, 2015 Report Share Posted April 19, 2015 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" Link to comment Share on other sites More sharing options...
spartan Posted April 19, 2015 Report Share Posted April 19, 2015 Thank you Richie I really appreciate this I have been waiting in anticipation since you first mentioned it and all wrapped up in a drop in pbo too doesn't get much better. :) Richie 1 Link to comment Share on other sites More sharing options...
Buliwyf Posted April 19, 2015 Report Share Posted April 19, 2015 This is how to get the center of each map: _size = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); _center = [_size/2,_size/2,0]; ;) Richie 1 Link to comment Share on other sites More sharing options...
spartan Posted April 19, 2015 Report Share Posted April 19, 2015 Not sure why I am getting this : Script x\addons\helicrash\init\fn_init.sqf not found No changes have been made to your scripts so could there be something else it would not be happy with ? Link to comment Share on other sites More sharing options...
cyncrwler Posted April 19, 2015 Report Share Posted April 19, 2015 Not sure why I am getting this : Script x\addons\helicrash\init\fn_init.sqf not found Same here. Path looks right in the config.cpp. Not sure what's up. Link to comment Share on other sites More sharing options...
Fleischer111 Posted April 19, 2015 Report Share Posted April 19, 2015 Same here. Path looks right in the config.cpp. Not sure what's up. the same with me Link to comment Share on other sites More sharing options...
Richie Posted April 19, 2015 Author Report Share Posted April 19, 2015 I'll have a look but i don't see why you would get that error, the path is correct, anyone else have it or anyones working normally ? I have no idea how many are using it but it works for me. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 19, 2015 Report Share Posted April 19, 2015 Try this one helicrash.zip Link to comment Share on other sites More sharing options...
Fleischer111 Posted April 19, 2015 Report Share Posted April 19, 2015 Try this one helicrash.zip Unfortunately, even with this version Warning Message: Script x\addons\helicrash\init\fn_init.sqf not found Link to comment Share on other sites More sharing options...
Liqu1dShadow Posted April 19, 2015 Report Share Posted April 19, 2015 can you put mas weapons and stuff into this? Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted April 20, 2015 Report Share Posted April 20, 2015 I have been looking forward to trying this out and appreciate the opportunity to do so. I am also getting the same error: 1:02:33 Warning Message: Script x\addons\helicrash\init\fn_init.sqf not found Link to comment Share on other sites More sharing options...
Floyd Posted April 20, 2015 Report Share Posted April 20, 2015 See OP. Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 20, 2015 Report Share Posted April 20, 2015 Fixed. Tested and confirmed working. See OP for fixed file. Ghostrider-GRG 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now