Home   Help Search Login Register  

Author Topic: Removing dead units, is it possible?  (Read 532 times)

0 Members and 1 Guest are viewing this topic.

Wedgie_Mutha

  • Guest
Removing dead units, is it possible?
« on: 30 Aug 2003, 11:20:37 »
Hey all,

I have tried all sorts of stuff to get rid of dead units from the game, and I've really had no luck.

What I'd like to be able to do, is set a trigger that covers an area, and when that area is empty of all units (all enemy ai dead and all players moved on elsewhere) all the dead units in that area get deleted.

Im trying to build an open ended mission, and its proving difficult because the number of dead units builds up and the game begins to slow to a crawl.

Any advice would be much appreciated.
Ta.
Wedgie

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Removing dead units, is it possible?
« Reply #1 on: 30 Aug 2003, 12:00:31 »
I think there's a script in the ed. depot about this.

Wedgie_Mutha

  • Guest
Re:Removing dead units, is it possible?
« Reply #2 on: 30 Aug 2003, 12:02:29 »
Hi,
Thanks for the response. I think Ive tried that script and I couldnt get it to work...

Has anyone managed to get it to work?

Cheers.

Unnamed

  • Guest
Re:Removing dead units, is it possible?
« Reply #3 on: 30 Aug 2003, 13:29:59 »
One way I came across to remove all the dead and/or alive (take your pick) AI out of a trigger is this:

Create a trigger activated by "Anybody" (I think Anybody includes dead or unknown AI) and set it to activate "Once". Also set "Detected by East" (they always know about everyone on there own side within the trigger).

In the "On activation" field type something like:

Code: [Select]
Temp1=List Trigger1
Temp1 being a global array and Trigger1 the trigger you setup above...hmm probably obvious

When your ready to delete the AI just run the following code. If you want to keep the live AI just check with the "Alive" command before you delete _x :

Code: [Select]
{DeleteVehicle _x} ForEach Temp1
This should cover any of your guys who the AI detected and killed during the process.

You can experiment with different settings but something like this should do the job?
« Last Edit: 30 Aug 2003, 13:48:14 by Unnamed »

deaddog

  • Guest
Re:Removing dead units, is it possible?
« Reply #4 on: 30 Aug 2003, 13:51:46 »
You can only reference the dead units within about 30-45 seconds of their death.  After that, they can no longer be deleted.

Wedgie_Mutha

  • Guest
Re:Removing dead units, is it possible?
« Reply #5 on: 30 Aug 2003, 14:30:23 »
Thanks for the advice guys,

Is this true deaddog? Of so, it kind of scuppers my plans... bummer.

Unnamed

  • Guest
Re:Removing dead units, is it possible?
« Reply #6 on: 30 Aug 2003, 20:42:17 »
I came across this messing with something else, so I have not really looked into it.

But adding a + sign in front of the trigger helps:

Code: [Select]
Temp1=+(List Trigger1)
At least I think it does, I got bored waiting for OFP to remove the dead bodies from the list :)

I have attached the test mission I was using if your interested, just call Radio alpha to remove the bodies once your happy they stick around long enough.
« Last Edit: 30 Aug 2003, 21:11:45 by Unnamed »

Unnamed

  • Guest
Re:Removing dead units, is it possible?
« Reply #7 on: 30 Aug 2003, 22:12:36 »
Doh!

Added the wrong Mission folder to the zip file, here is the correct one  :-\