Animated Helicrashs 0.1 - Release

would also love to see an option to add custom loot :X
got it working finally :D

--> http://pastebin.com/1MbrtmD6 (all credits to grafzahl)

_aaa = random _cntweights;
_index = floor(_aaa);

had to do that in 2 steps, else it would never pick items on higher positions in array, no idea why

customize here:

_itemTypes = [["NVGoggles", "weapon"], ["BAF_AS50_scoped","weapon"], ["Binocular_Vector","military"]]; //ADD LOOT HERE
_itemChance = [0.01, 0.01, 0.02]; //ADD THE CHANCES

chances should be values from 0.01 to 1
 
Here's mine.

At line 70 you have: _lootTable = ["Military"] call BIS_fnc_selectRandom;

But at lines 427/8 you have:

_itemType = [["G36C","weapon"], ....
_itemChance = [0.03, ....

I'm no pro at this, but surely "Military" holds a different set of weapons to the weapons listed in the itemType line. I want the items specified on the itemType line only, to be spawned at my heli wrecks. Do I need to change anything, or this correct?
 
Got them working, traveling, crashing, exploding, despawning debris. Doesnt seem to spawn loot though...
The RPT file reports
20:15:04 "CRASHSPAWNER: Loot spawn at '[9509.04,17971.1,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9504.3,17959.4,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9506.79,17971.4,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9503.13,17960.5,0]' with loot table '15.3165'"

20:15:04 "CRASHSPAWNER: Loot spawn at '[9511.64,17958.6,0]' with loot table '15.3165'"

Any help?
 
How to get this to work on Taviana 2:

Follow Grafzahl's instructions, there is no server_spawnCrashSite.sqf for Taviana 2 so just put Graf's file inside your compile folder.

Here's what you need to edit...

I followed your steps precisely, but don't seem to have anything appearing in the RPT files. I even tried;

You have also to add
Code:
server_spawnCrashSite  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
to your server_functions.sqf

I've been through these steps twice over, and I'm almost positive I didn't miss anything. I'm running this on DayZ.st btw. I tried running this for 50-60 mins both with and without the line Grafzahl said to add. Should I let it run for a full cycle until the server naturally restarts? Will there be an initial line in the RPT logs with 'CRASHSPAWNER' in to show that it is initialized, or do I need to wait until a heli is spawned?
 
I'm on dayz.st as well so that can't be the problem. Try setting the spawn time to 1 second to make sure it spawns right away. What Graf said also need to be added, I just forgot to put it in. Feels weird telling you about this Althasil because your server was the one I played on the most before I decided to give hosting a try! :D

But if you want post your server_monitor and serverspawncrashsite files
 
Got them working, traveling, crashing, exploding, despawning debris. Doesnt seem to spawn loot though...
The RPT file reports
20:15:04 "CRASHSPAWNER: Loot spawn at '[9509.04,17971.1,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9504.3,17959.4,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9506.79,17971.4,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9503.13,17960.5,0]' with loot table '15.3165'"
20:15:04 "CRASHSPAWNER: Loot spawn at '[9511.64,17958.6,0]' with loot table '15.3165'"

Any help?

i think thats just some small glitch with the log entries

did u check the crash site if it has loot? i mean ingame
 
At line 70 you have: _lootTable = ["Military"] call BIS_fnc_selectRandom;

But at lines 427/8 you have:

_itemType = [["G36C","weapon"], ....
_itemChance = [0.03, ....

I'm no pro at this, but surely "Military" holds a different set of weapons to the weapons listed in the itemType line. I want the items specified on the itemType line only, to be spawned at my heli wrecks. Do I need to change anything, or this correct?

For that.. That's just what I have. I believe the fixed item spawn overrides the loot tables. I can't really explain it, it's just how I got it to work!
 
When I try and log in I get "something went wrong disconnect and try again" I followed the directions to the letter and rechecked file locations, anyone else get this issue?

attached is the most recent rpt log

The dayz_server pbo isnt packed with the right prefix. I packed with pboview then opened it back up with pbo manager, clicked the cog button then right click add, add "prefix" in the first box and z\addons\dayz_server in the second.

This fixed it for me
 
Would be great if there was a timer to say "if heli has been flying for x seconds, blow it up" or something.. I've noticed that helis often just fly around forever without exploding.
 
Would be great if there was a timer to say "if heli has been flying for x seconds, blow it up" or something.. I've noticed that helis often just fly around forever without exploding.
New Version already has this feature, but somehow i raped the code and cant find the error... even rpt logs dont give me any error ^^ seems like i have to start over with the last working version again :-/

And the thing with the non-exploding helis are the big hills on taviana, sometimes the helis come in from one of the hills, with realy high altitude, and doesnt get in the explo-zone.... in this case you should only spawn in Hueys.
 
The dayz_server pbo isnt packed with the right prefix. I packed with pboview then opened it back up with pbo manager, clicked the cog button then right click add, add "prefix" in the first box and z\addons\dayz_server in the second.

This fixed it for me

yea it worked for me as well, never would have even thought of that, thanks!
 
ok i added some text to this, when the helicopter crash it comes text in middle of screen " A helicopter has crashed, Find it for high valued loot!" ( ofc the text is editable )

How have you done this? I have been looking at something like editing the server_spawnCrashSite.sqf so that is reads;

diag_log(format["CRASHSPAWNER: %1 started flying from %2 to %3 NOW!(TIME:%4||LT:%5)", _crashName, str(_heliStart), str(_position), round(time), _lootTable]);
cutText ["A military helicopter has been spotted in the area! cutText","PLAIN",10];
hint "A military helicopter has been spotted in the area! hint";
TitleText["A military helicopter has been spotted in the area! TitleText","PLAIN DOWN"];
taskHint ["A military helicopter has been spotted in the area! taskHint", [0, 0, 0, 1], "taskCurrent"];

I don't think I'm quite on the right line though.
 
I have tried this on line 119, but nothing shows.

titleText ["A military helicopter has been reported in the area!", "PLAIN DOWN"]; titleFadeOut 5;
 
How have you done this? I have been looking at something like editing the server_spawnCrashSite.sqf so that is reads;

diag_log(format["CRASHSPAWNER: %1 started flying from %2 to %3 NOW!(TIME:%4||LT:%5)", _crashName, str(_heliStart), str(_position), round(time), _lootTable]);
cutText ["A military helicopter has been spotted in the area! cutText","PLAIN",10];
hint "A military helicopter has been spotted in the area! hint";
TitleText["A military helicopter has been spotted in the area! TitleText","PLAIN DOWN"];
taskHint ["A military helicopter has been spotted in the area! taskHint", [0, 0, 0, 1], "taskCurrent"];

I don't think I'm quite on the right line though.
You need to add it to the init.sqf-Part
 
Seeing this in action was really cool. But, my feeling - just my personal opinion - is that you shouldn't be able to shoot it down so easily.

Also, I don't know if it's possible, but can they be scripted to fly really low and fast as they get closer to the crash point and then lose the tail rotor or to have them simply drive it quickly into the ground? This would simulate the notion that the crew has become infected and happens to lose control of the chopper low to the ground - and might also keep the out of control chopper in the area of the crash point.
 
Code:
23:49:28  Error Missing ;
23:49:28 File z\addons\dayz_server\compile\server_spawnCrashSite.sqf, line 150

get this error.- know what i have do wrong?
 

Attachments

  • server_spawnCrashSite.sqf
    12.3 KB · Views: 4
My rpt is showing these lines of code
1:09:20 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:0.75]"
1:09:20 "CRASHSPAWNER: 100% chance to start a crashing UH-1H with loot table 'HeliCrash' at 1925"

but it never shows the part saying where the helicopter starts from and where its going
 
Back
Top