Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
It's not working for me, just spawns crash sites on server start still. SpawnHelis is set to false, and I tried OldSpawn set to true and false, same results.Ok.
This works perfectly fine, without any hiccups and doesn't cripple the standard DayZCC code.
First of all change you're dayz_server_config.cpp
Add a new define under #OldSpawn true
Code:// Grafzahl's Animated Heli Crashes // AnimSpawn true - Heli Crashes are spawned via server_spawnHeliCrash // AnimSpawn false - Heli crashes are spawned via server_spawnWreck or spawn_heli depending on the settings above // IMPORTANT: If you want to use AnimSpawn's, you must set SpawnHelis to false! #define AnimSpawn true
Also follow the instructions that are posted there. Set SpawnHelis to false if you want to use the Animated Ones.
Next download the server_spawnCrashSite.sqf that's linked in the first post.
Open server_functions.sqf and find:
Code:server_spawnWreck = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnWreck.sqf";
Below this add:
Code:server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
Next go to your server_monitor.sqf
Find the line:
Code:// Spawn crashsites and wrecks ---------------------------------------------------------------------------------------- if (SpawnHelis && worldName != "namalsk") then { if (OldSpawn) then { for "_x" from 1 to SpawnHelisCount do { _id = [] spawn spawn_helis; }; } else { [["UH60Wreck_DZ", "UH1Wreck_DZ"], ["Military", "HeliCrash", "MilitarySpecial"], SpawnHelisCount, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnWreck; }; };
Change it to:
Code:// Spawn crashsites and wrecks ---------------------------------------------------------------------------------------- if (AnimSpawn) then { nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite; }; if (SpawnHelis && worldName != "namalsk") then { if (OldSpawn) then { for "_x" from 1 to SpawnHelisCount do { _id = [] spawn spawn_helis; }; } else { [["UH60Wreck_DZ", "UH1Wreck_DZ"], ["Military", "HeliCrash", "MilitarySpecial"], SpawnHelisCount, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnWreck; }; };
That's all. this way You can have static wrecks/dynamic wrecks/cp, with Grafzahl's awesome Heli Crash Script.
I would create a lot more... its not just that they are not predictable, with only 20 coords you have a high chance of 2-3 crashsites at one place.
I created like 300 coords only for namalsk (which is alot smaller)
Are you trying to run this on your main instance?It's not working for me, just spawns crash sites on server start still. SpawnHelis is set to false, and I tried OldSpawn set to true and false, same results.
I went to that file but could not find it anywhere so i guess i had to do it myself but i do not know how...."!!!!!After you put in the coordinates you have to set _useStatic to true inside
your server_monitor.sqf, default is false!!!!!"
There is nothing like that in that file either but there something like that in server_spawnCrashSite. So what do i do here? please help!If you want to change anything of the above you have to open your system/server_monitor.sqf inside yourdayz_server.pbolook at the end of the file where the Crash-Spawner is activated... something like this:
Code:
nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;Code:// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
Yeah i had this too 1-2 times, it seems like the heli doesnt complete all waypoints, or just flys close to them, but the crash only happens when the heli is < x meters from the POC, so when the heli doesnt fly close enough to the poc, it doesnt explode, thats why the backup-point is needed, the heli will come back every time and somehow must explode.a few problems first being I see the ais just flying around like no big deal not crashing, second is the crashes wont spawn loot. im on taviana and I followed your guide grafzahl for the tavi so ye.
That cant have anything todo with this script.got this working now and have had a few heli crashes but when server restarts all the players invs have duped any help would be grate
_staticcoords = [[6277.5605,8332.8262],[1234.5605,4321.8262],[4557.9087,10053.83],[7217.1401,9827.875],[8274.5195,5959.6602],[11872.323,12808.96],[4830.1367,2427.4019],[10497.543,7392.2471],[8953.4258,8895.1299],[4968.2163,8556.0557],[3532.25,6699.2129],[5340.9038,7477.4463],[7250.2588,3253.1953],[6891.0015,7268.6304],[8422.4473,10592.089],[11183.359,10574.101],[5681.2202,4308.855],[3778.5913,4524.0386],[6644.7686,8897.3213],[8284.9678,6759.9556],[5735.7241,10974.181],[11640.93,6646.9297],[6945.8071,6517.7583],[7300.7642,5355.2134],[9107.8213,4160.3799],[6736.0586,12411.219],[2557.2344,7389.6709],[9446.6475,7357.3809],[6026.1436,8180.8501],[7058.749,10618.966],[8317.2363,9730.9092],[4977.4038,11926.828],[5913.2026,5339.0732],[6058.4131,3304.6196],[4090.0095,7631.8706],[5622.7822,9407.9805],[6574.7153,9488.7129],[7156.1064,8168.5674],[9714.833,8410.0566],[10457.018,8458.4971],[12635.171,6230.2861],[4374.3359,10702.859],[10828.119,11429.451],[8295.0088,7505.8613],[6100.7241,6084.9736],[10263.413,5180.7705],[11457.363,4583.3506],[5406.9434,3695.2974],[3938.7085,9265.8252],[5697.3643,8781.4307],[4374.3389,4098.958],[4358.2046,7021.4668],[8021.6113,8319.9395],[9722.877,5485.168],[5111.4785,5771.0825],[4461.9644,3686.6833],[9949.0537,9763.0684],[5816.1494,10273.877],[3080.1147,8455.6973],[2828.26,5577.2876],[13592.732,3161.9077],[9672.8779,2202.9951],[10674.498,4555.5508],[2795.0818,10048.201],[9806.6797,10834.208],[4151.7441,5514.1841],[7726.7568,4414.0659],[9024.3438,4936.1675],[11467.646,5426.6553],[10345.56,3436.7673],[2967.8738,3729.7446],[10761.53,12678.518],[2681.6926,2662.593],[3329.6575,3346.4263],[5593.9785,6657.8638],[9149.5557,9649.8018],[7963.9106,12363.319],[3997.207,6122.3784],[6742.6221,3590.177],[7518.0713,8943.3115],[9843.0547,11712.899],[7646.1733,6342.9951],[4973.3252,4778.7886],[10215.684,10469.88],[2571.9282,4744.6157],[2121.3008,6364.1079],[12291.089,7224.1123],[6058.0508,2248.5212],[5599.9561,2711.0461],[6359.5664,7291.4263],[5386.4883,7463.2744],[4857.019,8394.1152],[3969.8008,8394.1152],[4771.1597,9167.4287],[3025.3428,9382.2383],[2066.5742,8494.3594],[8534.6826,10628.133],[7776.2539,10155.551],[8963.9824,11014.79],[9006.9121,10356.041],[11282.202,10628.134],[11854.602,10456.285],[10638.253,9597.0488],[9765.3438,8952.6191],[8906.7461,8293.8711],[8806.5752,7348.71],[8305.7266,5773.4429],[8320.0371,4856.9238],[8305.7266,3997.6868],[6516.98,4527.5493],[5801.4814,4327.0615],[7304.0288,4212.4971],[7075.0688,3038.2051],[4726.7178,2449.543],[3486.2896,2703.7124],[11730.995,4011.5745],[10488.644,7208.5757],[10214.356,7870.5801],[10875.87,6708.0361],[6664.7778,8629.4639],[6600.2393,10292.549],[6261.4165,11519.68],[4873.8535,11116.018],[3583.0972,10809.235],[45545.5605,1256.8262]];
cyrq i'm trying to use custom coordinates for the crashes but im stuck at this part:
I went to that file but could not find it anywhere so i guess i had to do it myself but i do not know how....
And another thing is i'm trying to do the customization step but things he says are not making any sense:
There is nothing like that in that file either but there something like that in server_spawnCrashSite. So what do i do here? please help!
false, //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf
I don't see why the instance would matter, but no.Are you trying to run this on your main instance?
Well it does, since you're referring to a file on top of the server_monitor.sqfI don't see why the instance would matter, but no.
#include "\@dayzcc\addons\dayz_server_config.hpp"
2 different things, but yeah mine is pointing to the correct config, made sure of that already.Well it does, since you're referring to a file on top of the server_monitor.sqf
Verify that the file exists/Correct the pathCode:#include "\@dayzcc\addons\dayz_server_config.hpp"
Well then i have no idea.2 different things, but yeah mine is pointing to the correct config, made sure of that already.
CURRENT VERSION o.2 - LAST CHANGE 05. APRIL
Here it is, my Script for animated Helicrashs... first some facts and features:
Features:
Install-Guide:
- Instead of just silently spawning helicrashs somewhere over time, each helicrash gets a real AI-Controlled Heli which is flying and crashing at the (aprox) position of the calculated crashsite
- Helis starting south of Cherno or Electro over the Sea
- (Startingpoints can be added/changed)
- Random Spawning of flying Mi17_DZ or UH1H_DZ
- If Mi17_DZ is flying, its spawning an Mi8-Wreck at the Position of the Crash (doesnt trigger zombiespawn right now)
- If chopper is destroyed (damaged chopper or Pilot) on its way to the Point-of-Crash, the Crashsite is spawning where the Heli went down, even when its not even close to the POC
- Damage that the Heli can handle before its exploding can be edited => let heli explode and spawn crashsite, even after one hit with Lee-Enfield)
- Heli can get an unlimited amount of waypoints before he starts to his POC
- When the Heli gets near its POS, it explodes in the air and hits the ground near the POC, after some seconds a regular crashsite is spawning in the smoke and the "real" wreck together with the generated craters get deleted, otherwise the craters would block loot-access
- The loot is spawning in a slightly wider area around the crashside, it shouldnt be possible that loot spawns under the crashsite.
- Together with the loot, some dead soldier-bodys apear at random places around the wreck so the scene looks a bit more realistic.
- It doesnt touch the amount or quality of the loot... the loot that is spawning in is exactly the same as before, but it could be a little bit harder to find, due to the changed radius
Customizations:
- 1. Step
- Download this file and exchange/merge (no merge-support from me) it with your compile/server_spawnCrashSite.sqf inside your dayz_server.pbo!
- The file is commented, so you shouldnt have problems editing stuff (startpoints,backup-point) for other maps (all coordinates are optimized for chernarus).
- 2. Step (Can be skipped if already using Sarges AI-Framework)
- You need to edit your system/server_cleanup.fsm inside your dayz_server.pbo, open it and search for:
Code://Check for hackers
- 2 Lines under it is a line starting with if(vehicle _x != ... exchange the complete line with:
Code:" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
- If you dont do this, all AI-Choppers will insta killed over theire startpoint after they spawned in
- 3. Step (Optional)
- In this step you have to edit your init.sqf inside your mission.pbo. Open it and search for a line starting with
under this line paste this code-block:Code:playerMonitor =
Code:"heliCrash" addPublicVariableEventHandler { _list = nearestObjects [_this select 1, ["CraterLong"], 100]; {deleteVehicle _x;} foreach _list; };
- This way every connected client deletes the crater at the crash right after they spawned, if you want to keep the craters (could block loot-access), you can skip this step.
- 4. Step
- Ready! Pack you mission.pbo and dayz_server.pbo and overwrite them, restart your server and wait for the choppers
Choppers spawn in the same times like your "normal" crashsites.
After you completed the 4 Steps, you would be ready to go (at least on a Standard DayZ 1.7.6.1 Hive). But i have included some options to customize the script for your needs. But first the default behaviour for the Choppers:
If you want to change anything of the above you have to open your system/server_monitor.sqf inside your dayz_server.pbolook at the end of the file where the Crash-Spawner is activated... something like this:
- Heli is only exploding/generating crashsite before its POC when to close to the ground (< 5m), so you have to take out the engine, pilot or something to bring the heli down -> explosion -> crashsite
- Heli gets 1 random waypoint before he flys to his POC
- Script uses the build-in arma2-function BIS_fnc_findSafePos to generate POCs and Pre-Waypoints (same spots as in normal dayz)
- Heli Startpoints and the Backup-Point are optimized for use on Chernarus, you have to change this for other maps (watch the Code)
and replace it with:Code:// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire] nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
Code:// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, _useStatic, _preWaypoint, _crashDamage] nul = [ 3, //Number of the guaranteed Loot-Piles at the Crashside 4, //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4) 3000, //Fixed-Time (in seconds) between each start of a new Chopper 500, //Random time (in seconds) added between each start of a new Chopper 1, //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them) 'center', //Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary 4000, //Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints true, //Should the spawned crashsite burn (at night) & have smoke? false, //Should the flames & smoke fade after a while? false, //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf 1, //Amount of Random-Waypoints the Heli gets before he flys to his Point-Of-Crash (using Static-Crashpoint-Coordinates if its enabled) 1 //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged) ] spawn server_spawnCrashSite;
Read the comments and adjust everything like you want itIf you want to use the Static-Crashpoint-Function, read the comment-block about this in my server_spawnCrashSite.sqf.
To check if everything is working open your servers RPT-Log and search for lines with CRASHSPAWNER - You should see lines like this:
Code:12:11:36 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:1]" 12:11:36 "CRASHSPAWNER: 75% chance to start a crashing UH-1H with loot table 'Military' at 60" 12:13:32 "CRASHSPAWNER: UH-1H started flying from [6993.7,173.053,300] to [6277.56,8332.83] NOW!(TIME:60||LT:Military)" 12:13:33 "CRASHSPAWNER: Adding Pre-POC-Waypoint #1 on [1234.56,4321.83]" 12:18:26 "CRASHSPAWNER: UH-1H just exploded at [6160.78,8215.13,94.7439]!" 12:18:39 "CRASHSPAWNER: Loot spawn at '[6284.31,8333.3,0]' with loot table '15.3165'" 12:18:39 "CRASHSPAWNER: Loot spawn at '[6289.58,8343.87,0]' with loot table '15.3165'" 12:18:39 "CRASHSPAWNER: Loot spawn at '[6284.43,8334.29,0]' with loot table '15.3165'" 12:18:39 "CRASHSPAWNER: Crash complete! Wreck at: [6283.44,8339.96,0.209167] - Runtime: 307 Seconds|| Distance from POC: 44 meters, "
Wait now you lost me! hahaI think Grafzahl made a typo there, cuz IMO this needs to be changed inside server_spawnCrashSite.sqf not server_monitor.sqf
The customization part is there, but without the comment part you're searching for. Look carefully.
EDIT: Wait, you've got me lost there. This is set by
And this value is present in my edit. Just like I said. this is without the comments.Code:false, //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf