Home   Help Search Login Register  

Author Topic: how to make chopper not fly till group is all in  (Read 1726 times)

0 Members and 1 Guest are viewing this topic.

ruff

  • Guest
how to make chopper not fly till group is all in
« on: 02 Oct 2003, 09:01:29 »
i forgot how to do this and i cant find how to do this anywhere

i can get the chopper not to leave till im in but not my group, im using triggers

is there just a simple way like using the name of your group but i dont know the group thing on the condition field

i know how to name groups but i dont know how to write the gruop name on the condition field so that the chopper wont leave till every one in my group is in
n e one pls

Gillett

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #1 on: 02 Oct 2003, 09:04:37 »
make the chopper's fuel at zero and give it a name.

On the "Get In" waypoint, in On Activation, put <choppername> setfuel 1

obviously you put the name without the < and >.

Or you can make your team start in the chopper straight away...

Kaliyuga

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #2 on: 02 Oct 2003, 09:59:03 »
or use this in your chopper's waypoint condition field

count crew heli == (west countside (units g1) + 2)

 As long as the gunner and pilot are both alive and in the chopper (named heli) it will wait till all the guys in the group g1 are in the chopper before taking off...

 if you're using East guys change West to East ;)

and to name your group if you don't know how... place this in the leaders init line:

g1=groupthis

:cheers:

ruff

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #3 on: 02 Oct 2003, 10:01:30 »
its an extraction chopper
chopper name bh1


i used a radio trigger to call in via waypoint the chopper and tell it to land

then after the land waypoint i put another trigger and sinchronized it with the waypoint and put on the condition field "player in bh1"

i just wanna know iof there is command which i could put on the condition field instead of player such as my group name which is d1 so it doesnt leave till all my units are in the chopper

ruff

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #4 on: 02 Oct 2003, 10:03:51 »
thanks ill try it now

and another question

is there a way in which i can leave the engine running when landing?

the closest i got was flyinheight 0 but then u have to tell the chopper to flyinheight again

ruff

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #5 on: 02 Oct 2003, 10:07:49 »
my chooper is already flying though

its says generic error in expression

Mr.BoDean

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #6 on: 02 Oct 2003, 21:34:58 »
Hey Ruff,
   Is this for a SP or a MP mission? Some methods that work in SP don't always work in MP.

Quote
is there a way in which i can leave the engine running when landing?

Assuming you're using:  choppername Land "Land"

Try using : choppername Land "Get In"    instead  ;)

I would use Kali's method and see if that works in all scenarios. I ended up making a little check-script which prevents the chopper taking off before all are in. I used something like:

Code: [Select]
; Chopper Load and wait script modified by Mr.Bodean

MH6 FlyInHeight 0

#CHECKIN
~0.5
?(GetPos MH6 select 2) > 0.5 : MH6 FlyInHeight 0


?(alive P5) and !(P5 in MH6):goto "CHECKIN"
?(alive P6) and !(P6 in MH6):goto "CHECKIN"
?(alive P7) and !(P7 in MH6):goto "CHECKIN"
?(alive P8) and !(P8 in MH6):goto "CHECKIN"

goto "FINISH"

#FINISH
MH6 FlyInHeight 30
MoveNext = TRUE
exit

MH6 is choppername; P5 thru P8 are players  and the 2nd line in CHECKIN checks to make sure chopper is down. If you place the Land "Get In" command in  the heli's WP, the rotors will stay on the whole time. This snippet could obviously be adapted with variables , but the basic idea works for me in every scenario in MP ...AI leader , player dead, player on first, etc.   :D


Drozdov

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #7 on: 02 Oct 2003, 21:46:29 »
You have to assign the group as cargo for the chopper to wait for them. In this way if you can't remember...

"_x assignascargo bh1" foreach units d1

Use this with the 'Load' waypoint and it should work... but with choppers, you never know.

For the engine you could simply make a script that turns the engine on when it's off, using the condition 'isengineon bh1' and the command 'bh1 engineon true'. The syntax in that may not be correct, but it should be. Or you could do this; pilotname action ["engineon",bh1]. Again the syntax may be wrong as I'm only doing this from memory.


Mr.BoDean

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #8 on: 03 Oct 2003, 08:03:48 »
You have to assign the group as cargo for the chopper to wait for them. In this way if you can't remember...

"_x assignascargo bh1" foreach units d1

Use this with the 'Load' waypoint and it should work... but with choppers, you never know.


Doh! Ya, Ruff, sorry ...forgot that handy, dandy little line there. Again, this is unnecessary if you are just making a SP with AI, but MP is more complex.  In my scenario , I have this, which covers both AI and human player units:

GROUP:
1. MOVE WP

2. GET IN  WP
Condition: (getpos MH6 select 2) <5  (AI leader will wait for heli to be below  5 Meters)
On Activation: "_x assignascargo MH6" foreach units mygrp; [P5,P6,P7,P8] orderGetIn true

3. GET OUT WP
(Where they get dropped off ....you'll need to use "UnassignVehicle _x" foreach units groupname
somewhere in a trigger, WP or script.  ;) )

HELI:
1. MOVE  WP
On Activation: MH6 Land "Get In"; [MH6] exec. "ChopperwaitV.sqs"

2. LOAD

3.MOVE

If you use Transport Unload for the dropoff, it will work in some cases, but not all.  I tested MANY different methods of heli dropoffs using WP's and scripts. The one I settled on is a script by Snypir I got from a BAS mission. The script, "land_chopper.sqs" actually works most of the time.   ;D Thank God!  :) Very hard to get online testers for simple script tests.  :-X   ::) It's in the Editor's Depot....http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_4&start=25  

This unloads all nicely, no matter if they are player or AI, and continues on its way, if u want.  8)
« Last Edit: 03 Oct 2003, 08:31:27 by Mr.BoDean »

ruff

  • Guest
Re:how to make chopper not fly till group is all in
« Reply #9 on: 03 Oct 2003, 08:10:04 »
cool ill try it all out
this is for sp mission

i just wanted my group not to use waypoints at all

the heli though i want to have waypoints to pick me up

i just thought in the helicopter waypoint condtion field there could be an alternative line than wat i put which is "player in bh1" i tried putting my group name in but it didnt work

ill try them all thanks ppl