Animated Helicrashs 0.1 - Release

Very new to all this scripting business, I have a dayz.st server running Chernarus and all the latest patches. Do I just need to copy the codes like you stated into the mentioned folders etc and with doing this I won't need to worry about setting cords for the crashes themselves they will still be random? I currently have it set to a radius 4000 from the centre of the map, am I right in thinking the helis fly from the coast to that point before crashing?

Sorry for the noob question :)
 
i noticed i don't have this line in my init or compiles in my mission

playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

Is that a problem? I personally didn't get any craters at the crash

Hm, it appears when i was more noobish i edited it to install a script of some sort to :

Code:
if (!isDedicated) then {
            //Conduct map operations
            0 fadeSound 0;
            waitUntil {!isNil "dayz_loadScreenMsg"};
            dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
                0 fadeSound 0;
        waitUntil { !isNil "dayz_loadScreenMsg" };
        dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
        _id = player addEventHandler ["Respawn", { _id = [] spawn player_death; }];
        _playerMonitor = [] execFSM "fixes\player_monitor.fsm";
    };

But it seems to be working fine so il just leave it
 
Its working, but it doesnt erase the craters around the crashsite... so loot will spawn unter the rocks if you are near the crash when it spawns.

And you have this line, you just have your own player_monitor.fsm inside your fixes-folder... pls read your code ;)
 
I currently have DayZ Epoch and I'd love to add this into the server. Epoch handles crash sites slightly differently as it actually does random chopper spawns across the map instead of fixed position ones. Could you possibly guide me through adding this into the Epoch version of the server_spawnCrashSite.sqf file?
I have attached the file in question for you to have a look at and understand the differences. Thanks
 

Attachments

  • server_spawnCrashSite.sqf
    4.6 KB · Views: 13
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?

There will be no conflict between this and my framework. AI Bandits will not engage the Civs in the crash helis, they only attack AI and players.

If you want to see the AI engage the crash choppers (regardless if surv/sold or bandit), you will need to set the humanity variable of your CIV pilot to a negative number (sth like -10000). In that case, they get traced, marked as enemy and shot at.
 
Ok. I think I've made it fully compatible with Crosire's DayZCC.
Will post the code later on ;)

Thanks.

Question not exactly related to this but how do we go about editing the loot of heli crashes using the new spawn method? I have been using the old spawn system because it seemed like heli's took forever to spawn using the new system and I didn't see how to swap out loot.
 
Thanks.

Question not exactly related to this but how do we go about editing the loot of heli crashes using the new spawn method? I have been using the old spawn system because it seemed like heli's took forever to spawn using the new system and I didn't see how to swap out loot.
Read the Customization-Part in my first Post, i commented all options you have for your time-delayed Helis...
 
well done, nice written code. It's a pleasure to see structured and commented code in a script :)

you don't need

Code:
_helipilot setVariable["Sarge",1];

, and i especially love the type of heli pilot :)

cheers

Sarge
 
well done, nice written code. It's a pleasure to see structured and commented code in a script :)

you don't need

Code:
_helipilot setVariable["Sarge",1];

, and i especially love the type of heli pilot :)

cheers

Sarge
Thanks, i wasnt 100% sure about this... so i thought... a variable more wont hurt anyone :D
 
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 {
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, _useStatic, _preWaypoint, _crashDamage]
nul = [3, 4, 3000, 500, 1, 'center', 4000, true, false, false, 1, 1] 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.
 
Posted this to reddit earlier Grafzahl I really hope we do see this integrated into the default mod code one day, far more innovative than cutting the crash site grass lol.

Still amazes me how you kept everything in the single original single file the way you did and as sarge says your code is excellent, extremely readable and structured, far more so than anything I have written.
 
Posted this to reddit earlier Grafzahl I really hope we do see this integrated into the default mod code one day, far more innovative than cutting the crash site grass lol.

Still amazes me how you kept everything in the single original single file the way you did and as sarge says your code is excellent, extremely readable and structured, far more so than anything I have written.
Thanks man, to be true... iam new to arma2-scripting, so iam happy that everyone seems to understand my code :)

Also i noticed that people scream why the heli just explodes up in the air for no reason... i mean this way is 7848374873 times more realistic then the old way (even when not perfect). Gonna have to try with other animations like tailrotor damage and stuff like that, but then the POC becomes nearly uncontrollable.
 
Thanks man, to be true... iam new to arma2-scripting, so iam happy that everyone seems to understand my code :)

Also i noticed that people scream why the heli just explodes up in the air for no reason... i mean this way is 7848374873 times more realistic then the old way (even when not perfect). Gonna have to try with other animations like tailrotor damage and stuff like that, but then the POC becomes nearly uncontrollable.

haha yeah I actually posted the same thing in the comments, its a damn sight more realistic than it materialising out of thin air. I think you have a very bright future ahead of you if you are still new to arma 2 scripting :)
 
Back
Top