Halvhjearne Posted April 26, 2015 Report Share Posted April 26, 2015 The ammo should spawn with the weapon Darth, no idea why RHS weapons would be different, the following code spawns the ammo unless you changed it ? case (isClass (configFile >> "CfgWeapons" >> _item)): { _kindOf = [(configFile >> "CfgWeapons" >> _item),true] call BIS_fnc_returnParents; if ("ItemCore" in _kindOf) then { // Min 1, Max 2 _crate0 addItemCargoGlobal [_item,(floor(random(2)))+1]; _crate1 addItemCargoGlobal [_item,(floor(random(2)))+1]; } else { // One Weapon, Three Mags _crate0 addWeaponCargoGlobal [_item,1]; _crate1 addWeaponCargoGlobal [_item,1]; _cAmmo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines"); { if (isClass(configFile >> "CfgPricing" >> _x)) exitWith { _crate0 addMagazineCargoGlobal [_x,3]; _crate1 addMagazineCargoGlobal [_x,3]; }; } forEach _cAmmo; }; }; thats not exactly correct ... this only spawns ammo for weapons that have a price in the confg, so his problem is most likely this line: if (isClass(configFile >> "CfgPricing" >> _x)) exitWith { try change this block: { if (isClass(configFile >> "CfgPricing" >> _x)) exitWith { _crate0 addMagazineCargoGlobal [_x,3]; _crate1 addMagazineCargoGlobal [_x,3]; }; } forEach _cAmmo; to this: _crate0 addMagazineCargoGlobal [(_cAmmo select 0),3]; _crate1 addMagazineCargoGlobal [(_cAmmo select 0),3]; Link to comment Share on other sites More sharing options...
Darth_Rogue Posted April 27, 2015 Report Share Posted April 27, 2015 That fixed it! Works perfectly now. Although I do have to mention that the weapons that were not spawning ammo at the crashes were listed in cfgPricing. Link to comment Share on other sites More sharing options...
second_coming Posted April 27, 2015 Report Share Posted April 27, 2015 @second_coming: How do I decrease the amount of boots at the scene? Edit the spawn line and change XXX to the number of AI you want to spawn: //Infantry spawns using the A3EAI _CrashName = format ["Crashsite_%1",_j]; [_CrashName,_posOfCrash,75,XXX,2,false,300] call A3EAI_createCustomInfantryQueue; diag_log text format ["[HeliCrash]: Creating AI at %1 (%2)",_CrashName,_posOfCrash]; Link to comment Share on other sites More sharing options...
monkeebhoy Posted April 27, 2015 Report Share Posted April 27, 2015 So this is simply put the pbo in beside your addons and thats it? No need for a line of code int he init.sqf? Link to comment Share on other sites More sharing options...
Richie Posted April 27, 2015 Author Report Share Posted April 27, 2015 So this is simply put the pbo in beside your addons and thats it? No need for a line of code int he init.sqf? Yep :) monkeebhoy 1 Link to comment Share on other sites More sharing options...
Halvhjearne Posted April 27, 2015 Report Share Posted April 27, 2015 That fixed it! Works perfectly now. Although I do have to mention that the weapons that were not spawning ammo at the crashes were listed in cfgPricing. in that case i guess it you change this to mission config? if that is the case, try change this: if (isClass(configFile >> "CfgPricing" >> _x)) exitWith { to this: if (isClass(missionConfigFile>> "CfgPricing" >> _x)) exitWith { Link to comment Share on other sites More sharing options...
jox Posted May 1, 2015 Report Share Posted May 1, 2015 Hi I added the a3eai line second_coming gave us but none spawn, any ideas. cheers Link to comment Share on other sites More sharing options...
cyncrwler Posted May 3, 2015 Report Share Posted May 3, 2015 Hi I added the a3eai line second_coming gave us but none spawn, any ideas. cheers Do you have A3EAI custom spawns set to true? Link to comment Share on other sites More sharing options...
monkeebhoy Posted May 4, 2015 Report Share Posted May 4, 2015 Hey Richie. After going through the simplest install ever and restarting my server i don't see any heli crashes. i changed the co-ords to suit Altis from a previous post on here. Link to comment Share on other sites More sharing options...
Richie Posted May 4, 2015 Author Report Share Posted May 4, 2015 Check your RPT logs, search for the word 'heli' and you should see : "Loading Heli Crashes" "Heli Crashes Loaded" If you see that then it's loaded and working :) Try increasing the number of sites while testing, that way they'll be easier to find when there is more on the map, Altis is huge so 5 could be hard to miss. Link to comment Share on other sites More sharing options...
monkeebhoy Posted May 4, 2015 Report Share Posted May 4, 2015 13:07:42 Warning Message: Script helicrash\init\fn_init.sqf not found thats what i get Link to comment Share on other sites More sharing options...
Richie Posted May 4, 2015 Author Report Share Posted May 4, 2015 Grab it again from the original post, drop it along side the Epoch server.pbo files without any changes. Link to comment Share on other sites More sharing options...
jox Posted May 4, 2015 Report Share Posted May 4, 2015 Yes I have A3EAI custom spawn set to true I have other custom spawns working, do I need a line in the A3EAI custom spawn file. It says in the log creating ai at crashsite but non spawn. Does it work with random crashsites or do they need to be custom placed. Link to comment Share on other sites More sharing options...
monkeebhoy Posted May 4, 2015 Report Share Posted May 4, 2015 Thanks Richie that seems to have worked. Link to comment Share on other sites More sharing options...
jox Posted May 7, 2015 Report Share Posted May 7, 2015 Nvm got it sweet :) Link to comment Share on other sites More sharing options...
Cavadus Posted May 7, 2015 Report Share Posted May 7, 2015 Getting the following error with this script: 13:10:11 BattlEye Server: Player #0 Gaius Cavadus - GUID: d3fa20a0829d05d87bda95025f60cd22 (unverified) 13:10:15 Player Gaius Cavadus connected (id=76561197979455288). 13:10:15 BattlEye Server: Verified GUID (d3fa20a0829d05d87bda95025f60cd22) of player #0 Gaius Cavadus 13:10:22 BattlEye Server: Script Log: #0 Gaius Cavadus (d3fa20a0829d05d87bda95025f60cd22) - #22 "(_this select 0) execVM "\A3\Structures_F\Wrecks\Scripts\Wreck_Heli_Attack_01.sqf"" 13:10:22 Player Gaius Cavadus kicked off by BattlEye: Script Restriction #22 13:10:22 Player Gaius Cavadus disconnected. Every single person that tries to connect gets booted. Link to comment Share on other sites More sharing options...
Richie Posted May 7, 2015 Author Report Share Posted May 7, 2015 Cavadus, at the end of line 23 of your scripts.txt add : !="execVM "\A3\Structures_F\Wrecks\Scripts\"" If that doesn't work try : !="execVM "\A3\Structures_F\Wrecks\Scripts\Wreck_Heli_Attack_01.sqf"" Then save the txt file and join the server, no restart needed for a filter change. Link to comment Share on other sites More sharing options...
R3viv0r Posted May 8, 2015 Report Share Posted May 8, 2015 hi ive installed this tonite and im geting kicked with this error #22 "(_this select 0) execVM "\A3\weapons_f\data\scripts\fire.sqf";" Link to comment Share on other sites More sharing options...
jox Posted May 8, 2015 Report Share Posted May 8, 2015 add this to line 23 in your battle eye scripts filter, !="execVM "\A3\weapons_f\data\scripts\fire.sqf"" Link to comment Share on other sites More sharing options...
R3viv0r Posted May 9, 2015 Report Share Posted May 9, 2015 thank you for tha. when the script spawns the crash sites does it in appearing rpt log cause ive checked my and isnt showing Link to comment Share on other sites More sharing options...
Richie Posted May 9, 2015 Author Report Share Posted May 9, 2015 thank you for tha. when the script spawns the crash sites does it in appearing rpt log cause ive checked my and isnt showing No it doesn't log the location, it will tell you if the script ran, look for these 2 lines : "Loading Heli Crashes" "Heli Crashes Loaded" Link to comment Share on other sites More sharing options...
snafu0185 Posted May 13, 2015 Report Share Posted May 13, 2015 Hey Richie this is awesome loved hunting for helli crashes in dayz keep up the fantastic work Link to comment Share on other sites More sharing options...
WarHammer(DayZ) Posted May 15, 2015 Report Share Posted May 15, 2015 Works great Richie :D thanks for sharing Link to comment Share on other sites More sharing options...
Halvhjearne Posted May 15, 2015 Report Share Posted May 15, 2015 hey richie, a few things i would like to say ... first off i got sick of the crashsites always spawing in the altis desert, basicly on top of eachother, so i decided to change the beginning, to this: _spawnCenter = getMarkerPos "center"; //Center of any map _allpositions = []; for "_j" from 1 to _crashNum do { _posOfCrash = _spawnCenter; while{true}do{ _posOfCrash = [_spawnCenter,0,7000,25,0,20,0] 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; now for a little note, if you add this at the end, you can check where your crashes spawn at: //create marker _marker = createMarker [format["CrashSite_%1",_j],_posOfCrash]; _marker setMarkerType "mil_dot"; _marker setMarkerSize [1.25, 1.25]; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Helicrash"; if you do this on chernarus, you will notice that with 12000 as range it will place most crashes outside the map ... i suggest you lower it to about 6-7k instead to force them inside the map borders. also this gun has a problem and should not be used: "srifle_DMR_03_spotter_F" Link to comment Share on other sites More sharing options...
BoleParty Posted May 15, 2015 Report Share Posted May 15, 2015 Anyone who wants to add this to chernarus map: use this : _spawnCenter = [9528,6535,0]; and this: _max = 7100; and none of the crash sites should spawn in the debug zone. I`ve to say that the count of my crash sites was 13 max while playin with the coordinates so i cant tell if a higher count would result in spawning crash sites in the debug zone. this u would have to find out urself. but for less it works. 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