I thought the function 'allDead' would tell me how many dead bodies are around. However, it seems to be telling me a running total of how many folks have died. Is there a different command to get just the current dead?
i havent used it but the docs seem to be clear that its an array of all dead units. that would be zombies (agents),players, vehicles. the cleanup scripts would change this array constantly as they are deleting the dead.
is that not what it yields?
Doesn't seem to be. At times it seems to represent thing that have gotten cleaned up. At other times, it just grows but if I iterate through it for the log, it will only return 10 unique items at times event though the count of the array is 450. It seems to just be flat goofy.
I tested this in the editor with Dayz loaded. Its not entirely intuitive but seems to be working as it should.
Spawned in a doctor, citizen and two cows. What happens is when the unit is initially killed it uses the group notation of C 1-1-1 format then after a few moments it changes the unit to something else that has the model in its name. This is evident when I kill the doctor. ..
So the engine apparently replaces the 'unit' with a static object. I used two bits of code to display the alldead and you can see which is being displayed each time I use Radio Alpha .
Radio Alpha
hint format:"%1", alldead];
Radio Bravo
hint "Deleting Dead"; { deleteVehicle _x } forEach allDead;
So ... I dont know, if when actually IN Dayz with all the scripts working it doesnt work this way then some dayz code is affecting it.
What I found before was that the majority of the objects seemed to not be there. What I mean is if I printed the object, it wouldn't print and if I tried to gets its location, same lack of anything. Also if I tried to delete it, it wouldn't delete. Maybe I was screwing it up, but having trouble believing it.
I'm still hunting down my server FPS issues and the large number of dead objects has my attention at the moment.
I am sure its significantly more difficult to see what is going on in an actual Dayz server where you have many objects being created, deleted, killed all the time. I had just used the editor with Dayz loaded but its not running any of the dayz scripts ... maybe Dayz itself modifies the alldead array for some reason.
Could it actually do that? Its a function from Arma that returns an array, not an actual array. I did a search and it just looks like they use it ins DayZ
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.