Animated Helicrashs 0.1 - Release

  • 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
      Code:
      playerMonitor =
      under this line paste this code-block:
      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.


When ever I do this, i get the following error on when loading into my server:
"no script helicrash found"
And then it seems to hang at a black screen.

EDIT: I fixed it. I had the code pasted in the wrong place.
 
I have modified the script ever so slightly (literately 3 lines...) to make NPC flown heli's stand out against human flown heli's.

This has been done by setting the heli on fire as its flying around, yeah this sounds really weird but it makes quite a cool effect to be honest!

To change this, simply:
Find the following line of code:
Code:
_crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"];

Under it, add the following:
Code:
dayzFire = [_crashwreck,5,time,false,false];
publicVariable "dayzFire";
_crashwreck setvariable ["fadeFire",false,true];
Note: You can change the number 5 to a higher number to make the fire & smoke more intense.

Now, your heli's will be bellowing smoke and will easily be seen as to what type of heli it is :)

Thats my two cents.
 
I use Phonexi's admin tools on my server. It is pretty self explanitory where the extra code needs to go into the init file, however I have edited the file a lot.

if (!isDedicated) then {[] execVM "Scripts\kh_actions.sqf";
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execFSM "admintools\player_monitor.fsm";

};

Would it throw up an error or cause the server to not load if I added the extra block of code below my edited playermonitor= statement?
 
I'm trying to get this installed and followed all steps but it's not working, it shows up these warnings/errors in my RPT file

21:45:22 File z\addons\dayz_server\system\server_cleanup.fsm, line 236: '/FSM/States/general_cleanup.init': Missing ';' at the end of line
21:45:22 Error context vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
21:45:22 Warning Message: File z\addons\dayz_server\system\server_cleanup.fsm, line 236: '/FSM/States/general_cleanup.if': '(' encountered instead of '='
21:45:22 Warning Message: Config : some input after EndOfFile.

server_cleanup.fsm:

"//Check for hackers" \n
" {" \n
" " if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
" };" \n
" } forEach allUnits;" \n
"" \n


It also says; 21:45:22 "DEBUG: Spawning a crashed helicopter at [11631.7,16786.9]" instead of showing the CRASHSPAWNER messages that I'd supposed to be getting ..

Could someone please help me out? :)
 
i need help guys...i did everything as said...replaced my spawncrashsite.sqf with the one given by OP and also did the changes to init.sqf to remove debris...
ran the server...and nothing....i dont see flying choppers crashing...

rpt log doesnt show like the OP....here is extracts from my rpt log

Code:
23:54:24 "CRASHSPAWNER: Spawning 'UH-60 Wreck' with loot table 'HeliCrash' NOW! (31157.6) at: [8637.64,6209.22]"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
23:54:24 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
0:40:28 "CRASHSPAWNER: Spawning 'Crashed UH-1Y' with loot table 'HeliCrash' NOW! (33913.8) at: [6909.83,14947.5]"
0:40:28 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
0:40:28 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
0:40:28 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
0:40:28 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
0:40:29 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
0:40:29 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
1:31:54 "CRASHSPAWNER: Spawning 'Crashed UH-1Y' with loot table 'HeliCrash' NOW! (36996.4) at: [9997.2,14892.5]"
1:31:54 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
1:31:55 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
1:31:55 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
1:31:55 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
  2:14:27 "CRASHSPAWNER: Spawning 'UH-60 Wreck' with loot table 'HeliCrash' NOW! (39547.1) at: [12934.5,13363.2]"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
2:14:27 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
14:46:44 "CRASHSPAWNER: Spawning 'Crashed UH-1Y' with loot table 'MilitarySpecial' NOW! (3871.88) at: [6437.92,10418.9]"
14:46:44 UH1Wreck_DZ: MainTurret - unknown animation source MainTurret
14:46:44 UH1Wreck_DZ: MainGun - unknown animation source mainGun
14:46:44 UH1Wreck_DZ: Gatling - unknown animation source Gatling
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
14:46:44 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'MilitarySpecial'"
 
16:56:07 "CRASHSPAWNER: Spawning 'UH-60 Wreck' with loot table 'HeliCrash' NOW! (6108.54) at: [11832.6,14777.7]"
16:56:07 UH60Wreck_DZ: MainTurret - unknown animation source mainTurret
16:56:07 UH60Wreck_DZ: MainGun - unknown animation source mainGun
16:56:07 UH60Wreck_DZ: MachineGun_1 - unknown animation source Gatling_1
16:56:07 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
16:56:07 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
16:56:07 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
16:56:07 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
16:56:07 "CRASHSPAWNER: Loot spawn at 'UH-60 Wreck' with loot table 'HeliCrash'"
16:56:07 "CRASHSPAWNER: 75% chance to spawn 'Crashed UH-1Y' with loot table 'Military' at 9060.6"
 
19:22:06 "CRASHSPAWNER: Spawning 'Crashed UH-1Y' with loot table 'HeliCrash' NOW! (14863.9) at: [12812.9,12517.9]"
19:22:06 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
19:22:06 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
19:22:06 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
19:22:06 "CRASHSPAWNER: Loot spawn at 'Crashed UH-1Y' with loot table 'HeliCrash'"
19:22:06 "CRASHSPAWNER: 75% chance to spawn 'Crashed UH-1Y' with loot table 'Military' at 17954.9"

these are all over my rpt intermittently....but no started flying from coords chopper

also there was one entry like this which is puzzling me
Code:
 5:07:56 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:3||CD:0.005]"
 5:07:56 "CRASHSPAWNER: 100% chance to start a crashing Mi-17 with loot table 'HeliCrash' at 3049.22"

but after this particular code there was no crash spawn or loot spawn...just random server log...wtf...please help :)
 
Hey, I am trying to make a custom loot table for the crash sites and have changed the loot call code to the following:

Code:
_num        = round(random _randomizedLoot) + _guaranteedLoot;
 
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
_itemType = [["FN_FAL", "weapon"], ["m8_sharpshooter", "weapon"], ["M14_EP1", "weapon"], ["RPK_74", "weapon"], ["M4SPR", "weapon"], ["G36A_camo", "weapon"], ["Mk_48_DZ", "weapon"], [M249_DZ, "weapon"], [BAF_L85A2_RIS_CWS, "weapon"], [DMR, "weapon"], ["", "military"], ["", "medical"], ["MedBox0", "object"], ["MG36", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"], ["m8_SAW", "weapon"], ["VSS_vintorez", "weapon"], ["SCAR_H_LNG_Sniper", "weapon"]];
_itemChance = [0.02, 0.01, 0.05, 0.05, 0.05, 0.03, 0.03, 0.05, 0.01, 0.1, 1, 0.5, 0.1, 0.01, 0.1, 0.1, 0.08, 0.05, 0.05, 0.01, 0.01];
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
_cntWeights = count _weights;
_index = _weights call BIS_fnc_selectRandom;


So my question is, will it blend?

Thanks!

Edit: After testing, the answer is no! Anyone got a sugesstion as to how to add a custom loot table to the heli crashsites?
 
i can't get the step 3 working for some reasons
Code:
    //Run the player monitor
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";   
    "heliCrash" addPublicVariableEventHandler {
            _list = nearestObjects [_this select 1, ["CraterLong"], 100];
            {deleteVehicle _x;} foreach _list;
};

did i mis-place the code-block?
 
Would anyone be willing to show me their static coordinates for the crashsites in Taviana, please? :)

There ya go

Code:
_staticcoords =[
   [16372.271, 10779.552],
[16497.559, 10016.809],
[15813.439, 9970.0742],
[14469.13, 10666.08], 
[15377.865, 8152.4111],
[15925.89, 8331.6299],
[17102.426, 7150.5859],
[17493.338, 5273.6558],
[13020.252, 12614.353],
[12923.538, 13575.391],
[12058.966, 14851.874],
[12867.563, 14589.936],
[10543.571, 17619.635],
[10250.469, 18226.48],
[13324.699, 19477.201],
[8063.3188, 21025.783],
[8934.8164, 19340.643],
[9907.3535, 7334.0654],
[10364.063, 6591.896],
[9871.8252, 6102.6016],
[9372.0117, 5471.437],
[9696.1826, 3999.2356],
[11092.251, 1965.1581],
[11537.213, 668.59741],
[11325.204, 1113.1927],
[10332.737, 1226.1338],
[9689.043, 1864.2593],
[8715.5938, 2782.8689],
[8953.748, 3635.9956],
[7861.8418, 4679.8906],
[6457.1313, 7112.3535],
[4806.0117, 6267.2471],
[4080.3188, 7707.1885],
[3072.6619, 7452.2417],
[1708.8595, 7510.5635],
[5760.8477, 8907.1338],
[6672.0605, 8316.3359],
[7655.229, 7770.395],
[8706.8936, 7686.0366],
[6879.354, 9147.6758],
[6380.7554, 9892.5479],
[6045.3262, 10434.717],
[13735.447, 9263.6963],
[17233.834, 6214.8008],
[16258.073, 13890.143],
[15581.266, 14914.912],
[15230.637, 14321.425],
[15217.746, 16297.03],
[15161.811, 17307.768],
[12930.187, 10428.543],
[11703.312, 12920.324],
[13423.164, 11984.348],
[13912.926, 12786.936],
[10412.362, 19383.703],
[9325.5342, 17640.189],
[17456.686, 8896.5703],
[13407.932, 16245.206],
[14599.471, 13521.225],
[11868.002, 17606.465],
[16030.08, 7339.3936],
[17372.871, 8040.8784],
[7064.4233, 5987.1416],
[8147.8369, 6579.5654],
[8361.9297, 5898.5552],
[6358.1201, 5687.3779],
[11885.83, 11457.926],
[13792.717, 17808.527],
[13791.824, 8413.5234],
[14552.499, 11521.479],
[7497.9233, 4825.7734],
[9244.123, 5120.9868],
[16593.668, 12484.476],
[17841.961, 10304.153],
[11035.042, 18391.588],
[4950.562, 7140.1626],
[11536.579, 16532.662],
[10780.226, 13403.629],
[2125.9045, 6802.9204],
[12429.599, 16000.037],
[14685.751, 8891.6885],
[5849.5718, 6602.1182],
[12189.924, 9927.6094],
[8831.4229, 20437.412],
[12943.231, 17080.551],
[16650.068, 11598.627],
[18066.576, 6544.1348],
[17906.324, 5624.7085],
[16523.555, 6091.4414],
[15569.542, 6869.4702],
[11652.745, 8193.9043],
[7765.0229, 5589.7295],
[9229.2744, 5741.356],
[7366.9487, 6905.896],
[7790.0298, 9106.5488],
[4999.3643, 8162.085],
[11498.698, 14742.447],
[14752.113, 18369.418],
[8612.8232, 8596.252],
[12991.983, 11351.044],
[17433.904, 12203.345],
[16167.716, 11418.211],
[15617.649, 9363.0908],
[16401.691, 8896.9395],
[16846.076, 8081.3921],
[12152.516, 19198.545],
[10018.905, 3097.3572],
[9591.9102, 2924.0752],
[14093.443, 9695.6699],
[9431.2617, 16517.115],
[13951.03, 15442.618],
[16186.241, 15241.867],
[17455.988, 9629.8799],
[18197.506, 8106.0088],
[6618.54, 4929.416],
[17697.861, 7473.5293],
[17364.492, 10569.745]
];

I took them from somebody else that posted them in this thread. My experience is though, that most crash sites explode on the southern islands with these coordinates. Which is fine by me because it gives players a reason to move there as well and not stay on the northern island only.

I think it has to do with the bridge, some choppers that fly north crash against the bridge and fall in the water.
 
Issue; loot isn't spawning.

Chopper spawns, flys, and crashes like it is suppose too. The bodies and wreck spawn but no loot. in my RPT file it shows coords for the loot piles but there is no loot.

Any ideas?
 
Why i just get:
Code:
21:27:31 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:1]"
21:27:31 "CRASHSPAWNER: 100% chance to start a crashing UH-1H with loot table 'MilitarySpecial' at 1705"
21:27:31 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
Nothing more?
I maked all steps out of the tutorial
 
Back
Top