Animated Helicrashs 0.1 - Release

AFAIK, Taviana 2 uses the pre-1.7.5.1 method of spawning crash sites..

Code:
//for "_x" from 1 to 5 do {
//    _id = [] spawn spawn_heliCrash;
//}; //Spawn heli crash

I didn't have the server_spawnCrashSite.sqf in my server.pbo so I just added it as well as
Code:
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
nul = [3, 4, 60, 0, 1, 'center', 4000, true, false] spawn server_spawnCrashSite;
to the server_monitor.sqf

Not really sure where it pulls the loot from and how to add it to your code..
 
Code:
spawn_heliCrash = {
    private["_position","_veh","_num","_config","_itemType","_itemChance","_weights","_index","_iArray"];
   
    waitUntil{!isNil "BIS_fnc_selectRandom"};
    if (isDedicated) then {
    _position = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
    diag_log("DEBUG: Spawning a crashed helicopter at " + str(_position));
    _veh = createVehicle ["UH1Wreck_DZ",_position, [], 0, "CAN_COLLIDE"];
    dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
    _veh setVariable ["ObjectID",1,true];
    dayzFire = [_veh,2,time,false,false];
    publicVariable "dayzFire";
    if (isServer) then {
        nul=dayzFire spawn BIS_Effects_Burn;
    };
    _num = round(random 4) + 3;
    _config =        configFile >> "CfgBuildingLoot" >> "HeliCrash";
    _itemType =        [] + getArray (_config >> "itemType");
    //diag_log ("DW_DEBUG: _itemType: " + str(_itemType));   
    _itemChance =    [] + getArray (_config >> "itemChance");
    //diag_log ("DW_DEBUG: _itemChance: " + str(_itemChance));   
    //diag_log ("DW_DEBUG: (isnil fnc_buildWeightedArray): " + str(isnil "fnc_buildWeightedArray"));   
   
    waituntil {!isnil "fnc_buildWeightedArray"};
   
    _weights = [];
    _weights =        [_itemType,_itemChance] call fnc_buildWeightedArray;
    //diag_log ("DW_DEBUG: _weights: " + str(_weights));   
    for "_x" from 1 to _num do {
        //create loot
        _index = _weights call BIS_fnc_selectRandom;
        sleep 1;
        if (count _itemType > _index) then {
            //diag_log ("DW_DEBUG: " + str(count (_itemType)) + " select " + str(_index));
            _iArray = _itemType select _index;
            _iArray set [2,_position];
            _iArray set [3,5];
            _iArray call spawn_loot;
            _nearby = _position nearObjects ["WeaponHolder",20];
            {
                _x setVariable ["permaLoot",true];
            } forEach _nearBy;
        };
    };
    };
};
 
Yes, if you dont use staticcoords, you get the same crashsite-points as using the old crashsite-code.
Graf can you please help me? This works fine but after i change the static-cords to true and added the 100 static-cords the server.rpt log will not show anything about CRASHSPAWNER,not even an error.
 
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 )
 
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 )
Hi MoleMan, this will also be optional in the next release, together with many more customization-abilities :) right now iam trying to put the custom-arrays to another file, so the spawncrashSite.sqf has not to be touched After a New version
 
So Graf, do you think it's possible for me to just change the code where you spawn the actual crash site, to instead pull from the code I posted here, so that it will spawn the "normal" taviana crash sites after the helicopters have crashed? Or should I change something in the actual loot spawning code.. I've been trying to find a solution but I've hit a dead end.. Thanks
 
Well i tried to get this to work(even started fresh) and it doesn't work. And you Graf refuse to help me, even if your not sure you can at least try instead of completely ignoring me. I am done with this script for now. I mean no hard feelings towards you but I have lost a deep amount of respect for you...
 
Well i tried to get this to work(even started fresh) and it doesn't work. And you Graf refuse to help me, even if your not sure you can at least try instead of completely ignoring me. I am done with this script for now. I mean no hard feelings towards you but I have lost a deep amount of respect for you...
It is working perfectly, just follow the installation guide and it should work.
 
Well i tried to get this to work(even started fresh) and it doesn't work. And you Graf refuse to help me, even if your not sure you can at least try instead of completely ignoring me. I am done with this script for now. I mean no hard feelings towards you but I have lost a deep amount of respect for you...
WTF did i just read? o.0

Give me Money and i am your coding-bitch... Or you have to wait till i have the time and motivation to help you. Whats up with this Community...
What server package are you running? I have dayz CC and im pretty sure its not as compatible with it.
And yes: this is build for Standard DayZ - If you have anything else: I cant give support because i dont use DayZ CC - Search for someone who can help you or get some skills.
 
Hi Grafzahl. First of: thanks for sharing your amazing scripts on this board.
I installed it on my server and one questions has come to me: How long does it take between picking the point of crash to starting the animated helis ?

In my log I got:
Code:
15:45:12 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:1]"
15:45:12 "CRASHSPAWNER: 100% chance to start a crashing Mi17_DZ with loot table 'HeliCrash' at 2777"

But even 40 Minutes later nothing else of CRASHSPAWNER (or anything with CRASH) in the RPT ..
Is this a sign I did something wrong? Or is the time to start of the animated crash completly random?
 
Hi Grafzahl. First of: thanks for sharing your amazing scripts on this board.
I installed it on my server and one questions has come to me: How long does it take between picking the point of crash to starting the animated helis ?

In my log I got:
Code:
15:45:12 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:1]"
15:45:12 "CRASHSPAWNER: 100% chance to start a crashing Mi17_DZ with loot table 'HeliCrash' at 2777"

But even 40 Minutes later nothing else of CRASHSPAWNER (or anything with CRASH) in the RPT ..
Is this a sign I did something wrong? Or is the time to start of the animated crash completly random?
How full was your server? Because when Server gets unter 10 FPS, the server-seconds get "longer", one server-second can become 2 real-time seconds...

On overloaded servers (below ~10 server FPS), time readings are unreliable. Seconds actually take longer. While the clients keep a steady tempo, server time lags behind, resulting in considerable offset between client and server time (easily 30 minutes for a 2 hour game). Client time is synchronised to server time during JIP, but other than that it runs independently.
http://community.bistudio.com/wiki/time

its a problem i have to deal with on my namalsk-server, server-fps is nearly all-time under 4 when > 35 players, and so the spawn-logic of the Helis becomes nearly uncontrollable. Thats why i will introduce _maxHelis, so you can set a fixed amount of max helis on the server and lets them start in shorter time-periots without spamming the server with crashsites.

If your server was nearly empty - the heli should start after 2777 seconds of server-runtime.
 
Any word on the loot for Taviana?
To make it short: I will have a look on this this evening, but yes... you would have to copy the lootspawn-logic from the static-crashsites to the new dynamic crashsites... the "animation" before the crashsite spawns has no impact on the actual lootspawn-system, i only changed the radius of the lootspawn to make sure nothing is laying under the wreck and let it look more realistic.
 
To make it short: I will have a look on this this evening, but yes... you would have to copy the lootspawn-logic from the static-crashsites to the new dynamic crashsites... the "animation" before the crashsite spawns has no impact on the actual lootspawn-system, i only changed the radius of the lootspawn to make sure nothing is laying under the wreck and let it look more realistic.

Ok thanks, no rush :)
 
WTF did i just read? o.0

Give me Money and i am your coding-bitch... Or you have to wait till i have the time and motivation to help you. Whats up with this Community...
Not gonna argue with you but im not asking for you to devote your whole time to help me just maybe give a bit of guidance to what i should do and I understand now that you don't know how to work it with dayz cc, you could of just said that in the beginning before i started this.
 
There where 3 ppl on this server.

But after some time it did spawn.:

Startet script
Code:
15:45:12 "CRASHSPAWNER: Starting spawn logic for animated helicrashs - written by Grafzahl [SC:false||PW:1||CD:1]"
15:45:12 "CRASHSPAWNER: 100% chance to start a crashing Mi17_DZ with loot table 'HeliCrash' at 2777"

Startet flying (about 1 hour later)
Code:
16:31:52 "CRASHSPAWNER: Mi17_DZ started flying from [6993.7,173.053,300] to [10034.4,3184.14] NOW!(TIME:2780||LT:HeliCrash)"
16:31:53 "CRASHSPAWNER: Adding Pre-POC-Waypoint #1 on [6529.78,6093.2]"
16:35:06 "CRASHSPAWNER: Mi17_DZ just exploded at [9866.28,3377.49,119.109]!, "
16:35:19 "CRASHSPAWNER: Loot spawn at '[10077.7,3159.77,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Loot spawn at '[10082.7,3162.29,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Loot spawn at '[10090.6,3155.49,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Loot spawn at '[10090.5,3159.64,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Loot spawn at '[10090.4,3153.05,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Loot spawn at '[10077.4,3154.07,0]' with loot table '19.1952'"
16:35:19 "CRASHSPAWNER: Crash completed! Wreck at: [10084.1,3155.78,-0.516636] - Runtime: 207 Seconds || Distance from calculated POC: 56 meters"
16:35:19 "CRASHSPAWNER: 100% chance to start a crashing Mi17_DZ with loot table 'HeliCrash' at 6268.03"

I guess the time it takes is directly connected with the DazYMod Spawning the Helis which truely can take a while sinces the 1.7.6 Versions.

However I truly are a fan of this mod :) You've got my Beans ;)
 
Not gonna argue with you but im not asking for you to devote your whole time to help me just maybe give a bit of guidance to what i should do and I understand now that you don't know how to work it with dayz cc, you could of just said that in the beginning before i started this.

Well, look what i have said yesterday?!
Would be awesome, because i never played with DayZ CC :D If you have a working script for dayzcc, could you send it to me so i can put it into the mainpost?

But i think it would be easier to just include the new file and let the spawnWrecks.sqf as it is?
And also: cyrq has given greate support for admins that want to "port" this to dayz cc, and i have heard from more then one guy that they got it working..
 
Ok fair enough. Sorry! I just get real frustrated because it was working perfectly and now its not working at all.

P.S. Why not just say in main-post that you don't offer full support with people who have dayz CC?
 
Back
Top