@Schalldampfer
I found out, that Epoch_server_cargosave will not 100% work on killed Vehicles.
It will not pushback backpacks and items, but weapons, magazines and subcontainers.
Maybe an issue in Arma, not sure.
But I have added a workaround to the experimental files, that Backpacks (and items within Backpacks) will also work now.
But Items are still an issue (this means ItemGPS, ItemCompass, ItemWatch, weapon attachments ..., but no Epoch Items like mortar, metal....)
So here is the needed change in the Epoch Files: https://github.com/EpochModTeam/Epoch/commit/297b2c04734b872b8769c3f972cf29c4b80c000e
And I have another (in the case better code) you can simply run in your Init (without any other changes in any other files):
if (isserver) then {
addMissionEventHandler ["EntityKilled",{
params ["_killed", "_killer", "_instigator"];
if (_killed isKindOf "Landvehicle" || _killed isKindOf "SHIP" || _killed isKindOf "AIR") then {
if (!istouchingGround _killed) exitwith {
_killed spawn {
_start = diag_ticktime;
waituntil {uisleep 2; (isTouchingGround _this && speed _this < 1) || diag_ticktime - _start > 10};
if (!isnull _this && !(surfaceiswater (getpos _this))) then {
_pos = getPos _this;
["groundWeaponHolder" createVehicle [_pos select 0, _pos select 1, 0], _this call EPOCH_server_CargoSave] call EPOCH_server_CargoFill;
};
};
};
_pos = getPos _killed;
["groundWeaponHolder" createVehicle [_pos select 0, _pos select 1, 0], _killed call EPOCH_server_CargoSave] call EPOCH_server_CargoFill;
};
}];
};
You can call in any script, the Server is running on startup.
Oh and thx to @Tarabas for his hint about the Eventhandler "EntityKilled". I was not aware about it before