Home   Help Search Login Register  

Author Topic: deadbody remover  (Read 1236 times)

0 Members and 1 Guest are viewing this topic.

websnake

  • Guest
deadbody remover
« on: 03 Jul 2005, 22:40:02 »
im making a mp mission and i want to put down about 100 men but i cant because it will lag to much when they get killed. Ive tried a few scripts to remove the dead bodys but none of them seem to work!!! can anyone help me please?

ItsMeAgain

  • Guest
Re:deadbody remover
« Reply #1 on: 04 Jul 2005, 00:04:10 »
Hi there

You can remove dead bodies using the deleteVehicle command...
that would need the units to have a name
I guess you dont like the thought to give all those units a name...

edit: maybe the foreach command could help

something like
"? !Alive _x: deleteVehicle _x" forEach units >Group<

doesnt works in a trigger (I tried) but maybe in a script ??? (IÂ'll try)
this way only the groups would need a name...

Well try looking in the online Command Reference for now
Hope that helped a little bit...

« Last Edit: 04 Jul 2005, 00:05:01 by ItsMeAgain »

websnake

  • Guest
Re:deadbody remover
« Reply #2 on: 04 Jul 2005, 00:19:51 »
thanks mate, ill keep that in mind but like you said doing that will take ages, i got just over 100units  :-\ i tried using a script on here called eraser.sqs but when i put it on the mission it cant find it ???

thanks for the help anyways

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:deadbody remover
« Reply #3 on: 04 Jul 2005, 00:35:02 »
Here is a simple way to do it. First, make a trigger covering the whole mission area, activated by 'anybody present' (one time). In it's 'on activation' field, write:

{_x addeventhandler ["killed", {_this exec "killed.sqs"}]} foreach thislist

Then make a script titled "killed.sqs", and put the following inside of it:
Code: [Select]
~60
deletevehicle (_this select 0)
exit
The ~60 means that it will wait 60 seconds after the unit is killed, then it will delete it. If you want a shorter or longer delay, just change that number.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

websnake

  • Guest
Re:deadbody remover
« Reply #4 on: 04 Jul 2005, 01:21:27 »
nice one mate  ;D works perfect