If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Loving this script. However, it only works on all dead objects that are spawned at the start of the mission. Is there a way to add checks in for objects spawned AFTER the mission has started. I'm talking about missions like VTS, where you can spawn objects on the fly.

I CAN get it to work if I manually restart the script again, but it's a little clunky having to call it when EVERY object is spawned.

Here is a thing - IF I have one copy of the script running, and I run another, does it override the original (and restart the counter) ?

Loving this script. However, it only works on all dead objects that are spawned at the start of the mission. Is there a way to add checks in for objects spawned AFTER the mission has started. I'm talking about missions like VTS, where you can spawn objects on the fly.

I CAN get it to work if I manually restart the script again, but it's a little clunky having to call it when EVERY object is spawned.

Here is a thing - IF I have one copy of the script running, and I run another, does it override the original (and restart the counter) ?

thats strange, i had asumed that the VTS would work same way as any other spawned units.
in the demo mission you have a radio trigger where you can spawn a stryker group as many times you like, and they get deleted just as well as others.
Is this an MP issue?

the script rechecks the complete list of dead and every vehicles every 10 seconds.

if you run a paralell script of this, the 1st script will take precedence, and the second timer will simply exit since the object is null.
i dont think it will create any special lag running multiples of this as its small in CPU usage, but if you would run it after any spawns, that would be ridiculus and for sure screw things up with the excluded included parts.

in my mind yes.
the script is not collecting all units at start, it checks the ingame arrays of all vehicles and all dead and if they are meeting the condition and have not been already processed by the script, the script processes them.
then sleeps 10 seconds, and rechecks and so on and so forth..

it also readds respawned units with same name as the dead ones to the check list so they will again get deleted upon meeting the condition.

you can verify that its collecting the spawned units by placing this in init.sqf and run your VTS mission and see if numbers change to what you expect.
make sure you have function module placed in editor.

EDIT: Retested again this evening, and it seems that it is working perfectly. I THINK I must have been too close to the dead enemy (I had set it to 300m!) and therefore the script didnt trigger!

Just to clarify, the timer runs no matter the distance, but the delete waits for the distance check to be true.
i thought of resetting timer if player was to close, but figured the current would be the best way.