Jump to content
Sign in to follow this  
pj[cz]

Make corpses stay longer in deathmatch

Recommended Posts

Hi,

I have made a deathmatch scenario, everything works smoothly except the annoying fact that sometimes the corpses of players / AIs in playable slots disappear litarally 2 seconds after you kill them. Is there a way to define the lenght of corpses staying on the battlefield? I am not using any cleaning scripts or anything and the bodies sometimes stay quite long, sometimes they disappear right away (the descent to ground / hide body animation), it seems pretty random. (I have searched all over the internet for half a dy but cant find anything like this). Thanks

Share this post


Link to post
Share on other sites

Anyone? It is really frustrating. (Also shameless selfbump :)

Share this post


Link to post
Share on other sites

Doesn't your body decay once you respawn? (And therefor bodies whom remain are from disconnected players). I believe that is why dayz forces your to reconnect upon death.

An other option would be creating an eventhandler which makes a copy of the body when someone dies.

Something in the lines of this maybe:

_unit addMPEventHandler ["MPKilled",{_this spawn fnc_OnKilled;}];

fnc_OnKilled:

fnc_OnKilled =
{
_player = _this select 0;
_unit = group _player createUnit [typeOf _player, Position _player, [], 0, "FORM"];
//Copy inventory from _player to _unit
_unit setDamage 1;
};

Or alternatively spawn a dead body, not sure which class name that would be (because of sides and stuff).

You will have to wrap in in the isServer of course.

Share this post


Link to post
Share on other sites

Hi,

thanks for the reply, I know the bodies dont disappear right after you respawn, because sometimes im able to recover my own gear, they may however disappear after you respawn for the second time, not sure about that, but looks like it. I will probably use the eventhandler just to create a loot pile from the corpses. But one would think that this kind of setting should be somewhere... Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×