Home   Help Search Login Register  

Author Topic: cleandead script?  (Read 1982 times)

0 Members and 1 Guest are viewing this topic.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
cleandead script?
« on: 05 May 2011, 05:48:09 »
I have searched for a cleandead script for ofp but i am confused. Is there a script that will cleanup dead bodies,vehicles without us having to bury them? if so...where is it? I would like to have one that starts the moment we enter the mission and run all the time.

TCM

Offline Lone~Wolf

  • Mission Tools & Mods
  • Members
  • *
  • Vladimir Dmitri Mikhail Andreevich Stamenov
Re: cleandead script?
« Reply #1 on: 05 May 2011, 10:11:10 »
A quick workaround that immediately comes to mind is to use a trigger which runs once for every unit on the battlefield by having the condition field to be:
Code: [Select]
{_x exec "removalscript.sqs"} forEach thislistand then writing the script such:
Code: [Select]
_p = _this

#START

@((!(alive _p))||(getdammage _p >= 1))
; When the unit is killed...

_randwait = (random 120)+60
; Pick a random time to wait
~(_randwait)
; Wait that amount of time

?(!(alive _p))||(getdammage _p >= 1) : deletevehicle _p; exit
goto "START"
; Check that they haven't respawned or come back to life and if not then delete their body and exit the script, otherwise go back to the start.
I just threw this together now so I can't guarantee it'll work but give it a try, or just search OFPEC for an already existing much better script.

Cheers.
Snarling creature, lurking in the background, still writing in .sqs

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re: cleandead script?
« Reply #2 on: 05 May 2011, 21:59:30 »
well, i tried it   :confused:  I am uncertain what the activation should be...

TCM

Offline j0e

  • Members
  • *
    • j0e's home
Re: cleandead script?
« Reply #3 on: 06 May 2011, 12:41:22 »

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re: cleandead script?
« Reply #4 on: 07 May 2011, 22:11:45 »
lone wolf... u r a genius! It works very well, in fact too well! thanx for your help everyone! topic locked..

TCM($)