Jump to content
Cryptdik

Cleanup script that only deletes Player deaths

Recommended Posts

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
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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×