Home   Help Search Login Register  

Author Topic: deleting dead troops in op flash v.1.46  (Read 791 times)

0 Members and 1 Guest are viewing this topic.

roscoe

  • Guest
deleting dead troops in op flash v.1.46
« on: 16 Jan 2004, 16:32:00 »
is there a script to delete the dead in the standard op flash or do i have to buy resistance coz i cant find one such script or a copy of resistance anywhere  :'(

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:deleting dead troops in op flash v.1.46
« Reply #1 on: 16 Jan 2004, 17:42:43 »
I dunno man, but buy resitance, it's absolutley worth it.

:beat: *Gets Shot* :beat:

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:deleting dead troops in op flash v.1.46
« Reply #2 on: 16 Jan 2004, 18:45:04 »
When was the deletevehicle command introduced?
I was reading the 1.3 unofficial command reference and couldn't see it in there.
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:deleting dead troops in op flash v.1.46
« Reply #3 on: 16 Jan 2004, 18:53:33 »
Resistance is DEEPLY worth it, and pretty cheap these days.   It's not just all the new commands and the campaign but it opens up a whole new world of addons and user created missions.
Plenty of reviewed ArmA missions for you to play

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:deleting dead troops in op flash v.1.46
« Reply #4 on: 16 Jan 2004, 20:29:57 »
deleteVehicle was added in version 1.34 according to the official command reference.


Planck
I know a little about a lot, and a lot about a little.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:deleting dead troops in op flash v.1.46
« Reply #5 on: 16 Jan 2004, 22:43:49 »
Well then I don't see any reason why deleting dead people wouldn't work in 1.46. If the ready-made scripts have some fancy stuff you can always try to modify them or even write your own deletion script, it shouldn't be too hard.
Not all is lost.

m21man

  • Guest
Re:deleting dead troops in op flash v.1.46
« Reply #6 on: 18 Jan 2004, 15:39:07 »
Yeah, but body deletion is best done with eventhandlers.

roscoe

  • Guest
Re:deleting dead troops in op flash v.1.46
« Reply #7 on: 20 Jan 2004, 18:28:38 »
no i cant do it still,  i tried! :'(  any ideas? or script snippets anyone can post? ???

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:deleting dead troops in op flash v.1.46
« Reply #8 on: 20 Jan 2004, 21:41:00 »
In your init.sqs file create a global variable called soldiers:

soldiers=[]

Now, in your createunit script, add this after you create an entire group:

soldiers=soldiers + units _group

Now, create a new script called deletebodies.sqs (or whatever):

Code: [Select]
;deletebodies.sqs

#loop
~20

?count soldiers == 0:goto "loop"

_temp=[]

_i=0

#l1
_u=soldiers select _i

?!alive _u:_temp=_temp+[_u];deletevehicle _u

_i=_i+1
?_i<count soldiers:goto "l1"
 
soldiers=soldiers-_temp
goto "loop"

execute this script from your init.sqs file:

[] exec "deletebodies.sqs"

I haven't tested this so there is no guarantee, but give it shot. :)

Edit

Made a small change

Whole thread is here: http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0
« Last Edit: 20 Jan 2004, 21:42:28 by DrStrangelove »

roscoe

  • Guest