Bodies are disappearing nearly instantly

HospitalChair

Well-Known Member
As the title suggests, within i would say 1 minute, the bodies are despawning. Is there something i need to tweak to fix this?
 
Since you are posting in DZAI, we are talking about AI bodies only, not player bodies?

How about this setting in the https://github.com/dayzai/DZAI/blob/master/DZAI/init/dzai_config.sqf ?
//Minimum seconds to pass until each dead AI body or destroyed vehicle can be cleaned up by DZAI's task scheduler. DZAI will not clean up a body/vehicle if there is a player close by (Default: 900).
//Note: Other cleanup scripts might interfere by cleaning up dead AI bodies/vehicles!
DZAI_cleanupDelay = 900;

As it mentions other cleanup scripts, perhaps they are being deleted by the server cleanup routine. Are you using epoch or dayz 1.8.3?
 
Yes, AI bodies, sorry.

Using 1.8.3. the only cleanup script I've adjusted is cleaning up player's bodies by lowering the default time from 40 minutes to something like 10.
 
So if your dzai_config.sqf cleanupdelay is set correctly how about finding out if its a system wide issue or only pertains to dzai. Why not spawn in an AI, kill him and see if the body disappears. Since he is not monitored by DZAI it will tell you if its a general cleanup script or the DZAI cleanup.

add this bit of code to the bottom of your init.sqf (or put it in a file and put execvm "filename.sqf"; in your init.sqf)
It is activated via Radio Alpha. If you are not familiar with using Radio triggers, I suggest you learn the joy of them. They make debugging and testing easier because you can execute a bit of code when you want. And where it says "ALPHA", you can add multiple triggers bravo, charlie, delta .. etc etc.
To activate the Radio menu press the BACKSPACE key, then you can press REPLY and ALPHA.

Code:
_this = createTrigger ["EmptyDetector", [7024.4883, 7660.3794, 0]];
_this setTriggerActivation ["ALPHA", "PRESENT", true];
_this setTriggerStatements ["this", "unit = group player createUnit [""Survivor2_DZ"", Position player, [], 0, ""FORM""];", ""];
[\code]
 
DZAI will only delete AI units under two possible conditions:

  1. The unit is dead and an amount of time determined by "DZAI_cleanupDelay" has passed since death. All units are assigned a variable upon death that determines at which time they're allowed to be deleted. If this variable is not assigned or not enough time has passed, DZAI simply doesn't delete the unit.
  2. The unit is alive but is being despawned due to no players present nearby.
Sorry I can't provide any useful help beyond this.
 
Back
Top