Cryptdik 5 Posted April 15, 2017 Is this possible? I've been looking around and all the cleanup scripts I've seen work on all units. I'm making a mission that doesn't continuously spawn new enemies or anything, so it'd be nice to keep the enemy bodies there for immersion while periodically deleting just the BLUFOR player bodies. Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 15, 2017 you can add an event handler once a player dies the body gets deleted. Share this post Link to post Share on other sites
Nikander 123 Posted April 15, 2017 I believe the game engine does cleaning up automatically and you could change this behaviour with removeFromRemainsCollector and addToRemainsCollector Just an idea Share this post Link to post Share on other sites
Cryptdik 5 Posted April 15, 2017 2 hours ago, BlacKnightBK said: you can add an event handler once a player dies the body gets deleted. Still figuring out how to use event handlers. In a trigger: OnAct :_playerkilled = player1 addEventHandler ["killed", {deleteVehicle player1;}] But won't that delete the player after they respawn? And how do you give it a delay? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted April 15, 2017 onPlayerRespawn.sqf ...see event scripts (_this select 1) spawn { sleep 5; deleteVehicle _this;}; Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted April 15, 2017 The vanilla system can do just that https://community.bistudio.com/wiki/Description.ext#corpseManagerMode Configure in description.ext, ive never had much luck getting it to work in editor, only by description.ext. alternatively something like this could help addMissionEventHandler [ 'EntityKilled', { params ['_killed','','']; if (isPlayer _killed) then { addToRemainsCollector [_killed]; }; } ]; Share this post Link to post Share on other sites
Cryptdik 5 Posted April 15, 2017 Perfecto. Thanks a million. Share this post Link to post Share on other sites