Helicopters explode on reboot if left on top of buildings... plus cars do too!

MikeTheMike

Well-Known Member
Okay, I HAVE used the search function, and can't seem to find anything quite matching this...

If I leave a heli on top of a building, sometimes on server reboot, it comes in blown up (I have a theory!)

Also, we have a base built, that uses the heli flat platforms as the floor (Land_LHD_elev_R) - cars sometimes explode on reboot if left parked on these :(

MY THEORY:

Perhaps what is happening, is that vehicles are spawning in the game at the right worldspace (inc. height), but yet for some reason, the building (or raised floor in the case of our base!) does not appear first, so the spawned in vehicle drops, and explodes.

This would kinda make sense in a way, as sometimes the vehicles left on the raised floor (which is a about half a meter above the floor), on reboot, just their wheels are blown :p

Then, when the building (or floor in case of our base!) comes in during the server boot, the vehicle is somehow pushed back up to where it should be... busted up though.

Just not sure, as perhaps my theory is a load of rubbish :D

QUESTION: Has anyone else had issues with helis blowing up when left on top of buildings, or any related issues?

Any advice?

Thanks guys :D
 
The solution is simple as f*ck. The vehicles are load BEFORE the buldings. That results in vehicle which are in the building...and that is the reason why they blow up.
 
The solution is simple as f*ck. The vehicles are load BEFORE the buldings. That results in vehicle which are in the building...and that is the reason why they blow up.
Ah, kinda what I suspected then?

Although - that's more the PROBLEM than the SOLUTION ;) hehehe

Anyone know a way around this? Delay the spawning of vehicles?
 
i to have had this same problem ! lol heres another thing i noticed yesterday after a server restart the hospital in cherno had spawn twice! making it glitched impossible to break glass for loot even tried to blow it up with 20 pipebombs but still the hospital was standing lol wen i walked on the roof it sounded like i was walking on a metal container deep bassy footsteps lol very strange
 
Nobody have any solution to this? Does it mean that on DayZ, heli's can't be left on the roof???
At the moment, that is what it means.

You can look at spawning buildings before helis, or freezing helis in air (disable gravity sim) for a few seconds on start - try looking in dayz_code.pbo and dayz_server.pbo for the files that handle server boot vehicle loading, and add a sleep 5; to them or something.
 
How about having a check when publishing vehicles, and any vehicle that is not touching ground (has a height higher than 0.2m) would be loaded in after a few seconds, giving the buildings they're on time to spawn in.
 
That sounds like it would work @Kind-Sir, I just don't know much about how stuff is spawned in in the first place - you would have to make sure that and sleep command to make it wait a few seconds didn't hold up the whole server boot by pausing the whole thing (again, no expert here).
You could also try setting a variable for them as they spawn, then suspending gravity simulation on anything with that variable until server start is complete (or the buildings are in or something)
 
just comment out the _object setvelocity [0,0,1]; line in your server_monitor.sqf.

When you do createVehicle the vehicle stays in the air until something collide with it or a command like setvelocity is used
 
in dayz_server.pbo/system/server_monitor.sqf, you can just move the buildings up, or look for the line:
Code:
if (_damage < 1) then {
and edit it from there with the previous idea:


How about having a check when publishing vehicles, and any vehicle that is not touching ground (has a height higher than 0.2m) would be loaded in after a few seconds, giving the buildings they're on time to spawn in.
 
in dayz_server.pbo/system/server_monitor.sqf, you can just move the buildings up, or look for the line:
Code:
if (_damage < 1) then {
and edit it from there with the previous idea:
Thanks Kind-Sir (and Hangender and mmmyum!)...

Kind-Sir, when you say
you can just move the buildings up, or look for the line:
- Sorry if I am being abit slow, but could you explain a bit more on this?

Thanks! REALLY appreicated :D
 
Do you mean literally just cut/paste the stuff for spawning buildings above the part that spawns vehicles? Perhaps with 3 or 4 seconds wait between them?
 
Hmmmm not sure I am getting this right (not tried anything yet, just reading the files :) )
But... in the server_monitor.sqf file, where it is referring to buildings, it 'appears' (to me at least) that it is talking about buildings in the database, rather than the mission file (instance_building etc)...

Hmmmm If that is the case, does server_monitor.sqf get processed in it's entirety then, before mission file-based buildings etc?

Meh! Not sure if I am understanding this properly :p

I am wondering if putting a wait on vehicles that have a height above 'x' as you suggested, will in fact then pause the processing of the whole file, and so not have the desired effect? Anyone know this?

Hangender - any other side effects of your suggestion?

just comment out the _object setvelocity [0,0,1]; line in your server_monitor.sqf.

When you do createVehicle the vehicle stays in the air until something collide with it or a command like setvelocity is used
 
Really interested in getting this to work, like Mike mentions above I am also not understanding this properly. :-/
 
Do you mean literally just cut/paste the stuff for spawning buildings above the part that spawns vehicles? Perhaps with 3 or 4 seconds wait between them?
That's what he means. Move the customstreaming part for the buildings above the vehicles part - and it will load those buildings first (from the buildings table in the db) before the vehicles (vehicles tables in the db). If you want to use a sleep, make it 0.1 or something small, so the hold up if there is one is negligible.

This is only for buildings in the DB, so it doesn't fix everything - but I think it would make any custom buildings you added load first so the vehicles (provided nothing shifted due to arma being stupid) will be ok, and load on top.

Now as for the other suggestion, by Hangender -
Code:
if (_object isKindOf "AllVehicles") then {
        {
        _selection = _x select 0;
        _dam = _x select 1;
        if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
        [_object,_selection,_dam] call object_setFixServer;
    } forEach _hitpoints;
    _object setvelocity [0,0,1];
    _object setFuel _fuel;
    _object call fnc_vehicleEventHandler;
};
He means to comment out this line. Now I think that any vehicles left very high in the air will just float there if we do that - anything above ground will not fall. Not 100% sure on this. Perhaps we could remove it and add another call for it to the end of the file, under the same if statement
Code:
if (_object isKindOf "AllVehicles") then {
_object setvelocity [0,0,1];
}
So gravity doesn't happen until the file is fully processed.

But what about the rest of the buildings on map? I want them all to work - y'know, like buildings!

When are the map files buildings processed?
 
Thanks :) That cleared up my thoughts!

Like you though, I'm really interested in all buildings... for 2 reasons.

1) My base is added in the mission.sqm file, not database :D

2) I want it to be okay for all players - say if someone lands on hospital, etc :)

I might setup a 2nd dayz instance on my server just for testing all this later this week :D

Mike.

That's what he means. Move the customstreaming part for the buildings above the vehicles part - and it will load those buildings first (from the buildings table in the db) before the vehicles (vehicles tables in the db). If you want to use a sleep, make it 0.1 or something small, so the hold up if there is one is negligible.

This is only for buildings in the DB, so it doesn't fix everything - but I think it would make any custom buildings you added load first so the vehicles (provided nothing shifted due to arma being stupid) will be ok, and load on top.

Now as for the other suggestion, by Hangender -
Code:
if (_object isKindOf "AllVehicles") then {
        {
        _selection = _x select 0;
        _dam = _x select 1;
        if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
        [_object,_selection,_dam] call object_setFixServer;
    } forEach _hitpoints;
    _object setvelocity [0,0,1];
    _object setFuel _fuel;
    _object call fnc_vehicleEventHandler;
};
He means to comment out this line. Now I think that any vehicles left very high in the air will just float there if we do that - anything above ground will not fall. Not 100% sure on this. Perhaps we could remove it and add another call for it to the end of the file, under the same if statement
Code:
if (_object isKindOf "AllVehicles") then {
_object setvelocity [0,0,1];
}
So gravity doesn't happen until the file is fully processed.

But what about the rest of the buildings on map? I want them all to work - y'know, like buildings!

When are the map files buildings processed?
 
Just bumping this thread to see if anyone has managed to resolve the issue of helicopters blowing up on restart?

Thanks
 
Back
Top