Home   Help Search Login Register  

Author Topic: How to delete un-used chopper?  (Read 691 times)

0 Members and 2 Guests are viewing this topic.

B-2-0

  • Guest
How to delete un-used chopper?
« on: 09 Oct 2003, 11:45:38 »
I have a squad inserting in 2 AI controlled choppers but if i decide i don't want to take all the squad it looks kinda stupid having an empty chopper fly in with the full one.

How do i delete the chopper if there is nobody in it?

I would rather do it from init.sqs or by script if possible rather than using triggers :)

Thx in advance

[Edit] I have tried ? notalive dude1 and notalive dude2 and notalive dude3 deleteunit chopper......in the init.sqs but it doesn't work
« Last Edit: 09 Oct 2003, 11:48:29 by B-2-0 »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:How to delete un-used chopper?
« Reply #1 on: 09 Oct 2003, 12:58:10 »
 :) name the bird:   bird1

then use a condition (don't put this in the INIT field of anyone, but in an INIT trigger)..


1.) name the group of AI morons in someguys INIT field:

           MyMorons=units group this

2.)  then use the condition:

           "alive _x" count MyMorons <1

3.)  and the activation:

            DeleteVehicle Bird1d; DeleteVehicle bird1g; deleteVehicle Bird1

See, thats the pilot, the gunner, and then the choppa herself. Crew first, then vehicle.

Try it fer size, matey! :thumbsup:



B-2-0

  • Guest
Re:How to delete un-used chopper?
« Reply #2 on: 09 Oct 2003, 13:15:00 »
Great stuff Tomb, thx! ;D

But ;D

Is there a way to do it using scripts rather than triggers?

I am fighting a lag battle with this mission as it is >:(

Mr.BoDean

  • Guest
Re:How to delete un-used chopper?
« Reply #3 on: 09 Oct 2003, 20:57:10 »

Ya, B2 Bomber....som'n like dis:

?("alive _x" count MyMorons <1): goto "killchoppa"

goto "end"

#killchoppa

DeleteVehicle Bird1d
DeleteVehicle bird1g
deleteVehicle Bird1

#end
exit


 No guarantees, but try it out.  8)
« Last Edit: 09 Oct 2003, 20:58:03 by Mr.BoDean »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:How to delete un-used chopper?
« Reply #4 on: 09 Oct 2003, 21:24:35 »
neah changes... but where triggers use "Condition" fields, scrolls just have a "?" mark.

but ya know this, right?! thats all there is to it, m8  :)

here's the scripted version:

=============================

; count all in chopper

?(("_x in Bird1" count units GroupName) <1): deleteVehicle Bird1

; that would (if <1) activate the stuff after the colon above, and thus delete the bird if she's empty.

; But if there is a CREW flying the bird, ya better count CARGO units only!  :o
; so crew in helo must be ==2 (driver, gunner), or else the bird is not deleted.

; exit script if any soldiers are in cargo.

?!(count (crew Bird1) >2): exit

; delete bird if she only carries the pilot, gunner.

?(count (crew Bird1) <=2): delete.... etc.


====================

that should do it, m8

« Last Edit: 09 Oct 2003, 21:27:20 by Tomb »

Mr.BoDean

  • Guest
Re:How to delete un-used chopper?
« Reply #5 on: 09 Oct 2003, 23:25:44 »
 :-X  :-X Oh , okay , what Tomb said then!  :o  I didn't know crew referred to anything BUT the pilot and gunner. Very odd it would include units in cargo.  :-\

B-2-0

  • Guest
Re:How to delete un-used chopper?
« Reply #6 on: 12 Oct 2003, 17:03:57 »
Great stuff Tomb...thx :thumbsup: