Animated Helicrashs 0.1 - Release

Ok i dont understand what you are trying to say here



Can you please be a little more clear? im sorry

Never mind that. It was late and I forgot that server_spawnWreck is also responsible for care packages and standard wrecks. This needs a bit of rewriting. Will mess with it later today.

Tapnięte za pomocą HTC Desire S
 
Never mind that. It was late and I forgot that server_spawnWreck is also responsible for care packages and standard wrecks. This needs a bit of rewriting. Will mess with it later today.

Tapnięte za pomocą HTC Desire S
Would be awesome, because i never player with DayZCC :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?
 
There shouldn't be any conflicts with this and Sarge's... I got sarges on my server (not the new one yet) and these crashes... I haven't seen anything out of the ordinary, the helis do their business flying around being bandits and the flying pinata's explode like they should.

I'm curious to see if they would interact... But I'll do that later

BTW is there any intentions of expanding this to include care packages with parachutes being dropped from C130s or something?
 
BTW is there any intentions of expanding this to include care packages with parachutes being dropped from C130s or something?
Yes :)

And iam just now merging the edits of Sarge in the server_cleanup.fsm with mine, so you dont have to change anything inside your server_cleanup.fsm if you already use sarges frameswork. And hackers get kicked in the ass again ;)
 
Would be awesome, because i never player with DayZCC :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?

Yeah, That's what I'm planing to do.
Smth like:
Code:
server_animWreck            = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_animWreck.sqf";
Make a separate define for the Animated heli's in dayz_server_config.hpp, like
Code:
// Grafzahl's Animated Heli Crashes
//  AnimSpawn true - enabled
//  AnimSpawn false - disabled
#define AnimSpawn true

and edit the server_monitor, smth like:

Code:
if (SpawnHelis && worldName != "namalsk") then {
    if (OldSpawn) then {
        for "_x" from 1 to SpawnHelisCount do { _id = [] spawn spawn_helis; };
    if (AnimSpawn) then {
        [["UH1Wreck_DZ", "Mi8Wreck"], ["Military", "HeliCrash", "MilitarySpecial"], 4, 60, 0, 1, 'center', 4000, true, false] spawn server_spawnWreck;
        };
    else {
        [["UH60Wreck_DZ", "UH1Wreck_DZ"], ["Military", "HeliCrash", "MilitarySpecial"], SpawnHelisCount, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnWreck;
    };
};

Don't know if this would work. Gonna try this later. Now I'm stuck at work ;(
 
//_staticcoords = [[6277.5605,8332.8262],[1234.5605,4321.8262],[45545.5605,1256.8262]];

OP can you please post your static coords for Chernarus? Even supply them in main thread to make some peoples lives easier who just want working default positions (like they were before --- Open fields only, etc)

At least i think im understanding it right, that those are the coords in which the heli's crash.

Thanks for this man
I dont have any, normaly i admin a namalsk-server... but namalsk isnt that good for developing and testing such stuff, this is why i "optimized" everything for chernarus, i didnt create _staticcoords for chernarus yet, maybe someone here does and is willing to share?
 
Yeah, That's what I'm planing to do.
Smth like:
Code:
server_animWreck            = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_animWreck.sqf";
Make a separate define for the Animated heli's in dayz_server_config.hpp, like
Code:
// Grafzahl's Animated Heli Crashes
//  AnimSpawn true - enabled
//  AnimSpawn false - disabled
#define AnimSpawn true

and edit the server_monitor, smth like:

Code:
if (SpawnHelis && worldName != "namalsk") then {
    if (OldSpawn) then {
        for "_x" from 1 to SpawnHelisCount do { _id = [] spawn spawn_helis; };
    if (AnimSpawn) then {
        [["UH1Wreck_DZ", "Mi8Wreck"], ["Military", "HeliCrash", "MilitarySpecial"], 4, 60, 0, 1, 'center', 4000, true, false] spawn server_spawnWreck;
        };
    else {
        [["UH60Wreck_DZ", "UH1Wreck_DZ"], ["Military", "HeliCrash", "MilitarySpecial"], SpawnHelisCount, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnWreck;
    };
};

Don't know if this would work. Gonna try this later. Now I'm stuck at work ;(
I wouldnt use other namings for the files, just stay with the server_spawnCrashsite.sqf and also use the same starting-parameters as in normal dayz. This makes updates to the script easier too.
 
Hm Graf will this effect my normal changes i had to my old .sqf...I changed:

Code:
_num        = round(random _randomizedLoot) + _guaranteedLoot;
 
        _config =        configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes =    [] + getArray (_config >> "itemType");
        _index =        dayz_CBLBase  find "HeliCrash";
        _weights =        dayz_CBLChances select _index;
        _cntWeights = count _weights;

TO:

Code:
_num        = round(random 4) + 4;
   
        _config = configFile >> "CfgBuildingLoot" >> _lootTable;
        _itemTypes = [["SCAR_H_LNG_Sniper", "weapon"], ["FN_FAL","weapon"], ["M14_EP1","weapon"], ["FN_FAL_ANPVS4","weapon"], ["Mk_48_DZ","weapon"], ["M249_DZ","weapon"], ["BAF_L85A2_RIS_SUSAT","weapon"], ["DMR","weapon"], ["G36C","weapon"], ["G36C_camo","weapon"], ["SCAR_H_CQC_CCO", "weapon"], ["G36_C_SD_camo","weapon"], ["G36A_camo","weapon"], ["G36K_camo","weapon"], ["", "military"], ["MedBox0", "object"], ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Skin_Camo1_DZ", "magazine"], ["Skin_Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"], ["SVD_CAMO","weapon"], ["M24","weapon"], ["M4A1_AIM_SD_camo","weapon"], ["Sa58P_EP1","weapon"], ["Sa58V_CCO_EP1","weapon"], ["Sa58V_EP1","weapon"], ["Sa58V_RCO_EP1","weapon"], ["M4SPR","weapon"]];
        _itemChance = [0.01, 0.02, 0.05, 0.01, 0.03, 0.05, 0.01, 0.06, 0.03, 0.02, 0.01, 0.01, 0.02, 0.02, 0.9, 0.09, 0.01, 0.5, 0.05, 0.05, 0.01, 0.05, 0.05, 0.04, 0.03, 0.05, 0.05, 0.05, 0.04, 0.05];
        _weights = [];
        _weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
        _cntWeights = count _weights;
        _index = _weights call BIS_fnc_selectRandom;

Too get my own custom loot in the crash.sqf...i also did this in the new edited one for animated heli crashes you provided, however under it i see:

Code:
//Creating the Lootpiles outside of the _crashModel
        for "_x" from 1 to _num do {
            //Create loot
            _index = floor(random _cntWeights);
            _index = _weights select _index;
            _itemType = _itemTypes select _index;

Will that interfere with one another? Thanks man
 
I havent touched the functions to select the loot-items that spawn in, so if you exchange the codeblock with yours it should work.

What i have changed is where the loot spawns, but these are the only lines i changed inside the "Lootgenerator"

Code:
            _lootPos = [_pos, ((random 2) + (sizeOf(_crashModel) * _lootRadius)), random 360] call BIS_fnc_relPos;
            [_itemType select 0, _itemType select 1, _lootPos, 0] call spawn_loot;
 
I havent touched the functions to select the loot-items that spawn in, so if you exchange the codeblock with yours it should work.

What i have changed is where the loot spawns, but these are the only lines i changed inside the "Lootgenerator"

Code:
            _lootPos = [_pos, ((random 2) + (sizeOf(_crashModel) * _lootRadius)), random 360] call BIS_fnc_relPos;
            [_itemType select 0, _itemType select 1, _lootPos, 0] call spawn_loot;
Alright cool

how about this in the RPT log
14:19:52 "CRASHSPAWNER: Mi17_DZ started flying from [1623.71,218.188,300] to NOW!(TIME:843||LT:Military)"

after TO there is no destination, is this normal, or is it not going anywhere?

EDIT: Heli is running around in circles in debug area :( il attach my .sqf in a sec

Note that im using Staticcoords and have implemented my own by making HeliH (Heli Pads) in the locations i wanted in 3d Map, then just took the coords and converted them to 2d in the sqm file

EX of how i did that: [6644.7686,8897.3213,0.00012207031] to

[6644.7686,8897.3213]
 

Attachments

  • server_spawnCrashSite.sqf
    10.1 KB · Views: 19
I will update the script in the next few hours, the Pre-POS-Waypoint will be added, some bugfixes and a new option for the script ;)
 
Please post your complete _staticcoords-Line :)

Well if you didn't know, i attached the entire .sqf above, but sure:

Code:
//_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],[45545.5605,1256.8262]];

And these are the config lines under it i changed:

Code:
//USE THIS WHEN USING _STATICCORDS
        _position = _staticcoords select (floor random (count _staticcoords));
 
        //DEFAULT: GET COORDS FROM BIS_fnc_findSafePos, COMMENT OUT IF YOU USE _STATICCOORDS
        //_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
 
Back
Top