OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: kevind2003 on 09 Apr 2003, 08:08:57

Title: list EASTUNIT doesn't work?
Post by: kevind2003 on 09 Apr 2003, 08:08:57
Hi,

I'm making a middle scale of combat mission, after the fighting there are 50+ enemy dead body on the ground and laggy, I tried to get a list of EASTUNIT and use deletevehicle command to delete them, but it doesn't work, any ideas?
Title: Re:list EASTUNIT doesn't work?
Post by: MorMel on 09 Apr 2003, 11:00:01
From what i could understand, the East units aren't already dead at the begining of the mission, right? You could put a trigger which detects east and puts each unit's ID into  an array (MyEastList = thislist).
Once they're all dead ("Not present East" type trigger) just delete them:

"deletevehicle _x" foreach MyEastList (or whatever is the syntax of deletevehicle...)

You must be carefull with that! Sometimes dead bodies are not recognized, therefore you can't detect them with a trigger. Detect them while they're alive; and as all members of the MyEastList array become dead [ "Alive _x" count MyEastList == 0 ], proceed with deletion.