Home   Help Search Login Register  

Advertisement

Author Topic: How to delete dead crewmen?  (Read 1969 times)

0 Members and 1 Guest are viewing this topic.

Offline Bama

  • Members
  • *
How to delete dead crewmen?
« on: 06 Jul 2011, 17:42:35 »
I'm running a dead removal script on my MP missions and works great, except dead crewman from tanks or other vehicles.  They seem to stay and are never deleted.  I've searched and tried several other dead removal scripts but have yet to find one that will take care of the removal of crewman.  Is there a way or can anyone point me to a script that will work. TKS
« Last Edit: 06 Jul 2011, 20:16:19 by Bama »

Offline j0e

  • Members
  • *
    • j0e's home
Re: How to delete dead crewmen?
« Reply #1 on: 07 Jul 2011, 10:42:44 »
Can you attach the removal script you are using?
There are many way to manage the units deletion.

Offline robertoHrvat

  • Members
  • *
    • Area 51 modification
Re: How to delete dead crewmen?
« Reply #2 on: 07 Jul 2011, 12:28:51 »
Hey, I can help you:
1.) First make an trigger with radius 0-0
2.) In condition box write this: not (alive (gunner TankName))
3.) Activation box: deletevehicle (gunner TankName)

if you wanna delete all the crews follow this:
1.) Make trigger
2.) in condition box write this: not (alive (gunner TankName)) and not (alive (driver TankName)) and not (alive (commander TankName)
3.) Activation box: deletevehicle (gunner TankName);deletevehicle (driver TankName);deletevehicle (commander TankName)

cya, if you get troubles with this report me.
RobertoHrvat

Offline Bama

  • Members
  • *
Re: How to delete dead crewmen?
« Reply #3 on: 08 Jul 2011, 02:17:53 »
We're running a map to the max of both East and Resistance tanks, naming them would be a nightmare to try to do.  I've tried several different ways but here is one way....again it will delete units and vehicles but not the crewman of the vehicles. Another note is we always have a lot of floating bodies on the map.

I create a trigger for the entire Island set up as :  anybody ;once;   with the on activation line: "_x addeventhandler [{killed},{_this exec {removedead.sqs}}]" foreach thislist


removedead.sqs


_unit = _this select 0
_unit removealleventhandlers {killed}
~90
deletevehicle _unit
exit

Offline j0e

  • Members
  • *
    • j0e's home
Re: How to delete dead crewmen?
« Reply #4 on: 08 Jul 2011, 09:56:28 »
trg_removallgc_iamserver0 Exec "removal.sqs" in the init.sqs -the best way- or
  in the init of an other trigger "none,once", condition:true;

No names, no global variables.

[removal.sqs]
?!(Local lgc_iamserver):Exit
_uns=(List trg_removal

Walter_E_Kurtz

  • Guest
Re: How to delete dead crewmen?
« Reply #5 on: 08 Jul 2011, 16:52:36 »
I was under the impression that EventHandlers don't work correctly in Multiplayer.

Assuming that you're using a Lone~Wolf style method, what you want is a filter script to intervene. Again you need a trigger covering all units set to Anybody, Present, Once and the On Activation field to read:
Quote
{_x exec "filter.sqs"} forEach thislist

Code: (Filter.sqs) [Select]
{_x exec "removalscript.sqs"} forEach crew _this
This will cause the script to be run solely on units, if you want old vehicles / armour to be removed along with their dead crew you'll have add that to removalscript.sqs.
« Last Edit: 08 Jul 2011, 19:07:14 by Walter_E_Kurtz »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: How to delete dead crewmen?
« Reply #6 on: 08 Jul 2011, 18:19:47 »
Quote
I was under the impression that EventHandlers don't work correctly in Multiplayer.
This was probably true in some of the early versions of OFP..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.