Home   Help Search Login Register  

Author Topic: Chopper problem..  (Read 901 times)

0 Members and 1 Guest are viewing this topic.

DarkCell

  • Guest
Chopper problem..
« on: 11 Jan 2004, 22:37:01 »
Questions about chopper problems are ask about million times here but here's another one more  :P

The Problem is:

I want the chopper to land but everywhere I put the command:
Choppername land
There shows a message what means the command is not correct :-\

So can anyone give me the correct command to let a chopper land?
and where do i have to put that command?

Many THNX :)

m21man

  • Guest
Re:Chopper problem..
« Reply #1 on: 11 Jan 2004, 22:41:31 »
choppername land "land"

gundernak

  • Guest
Re:Chopper problem..
« Reply #2 on: 11 Jan 2004, 22:47:37 »
you can type it into an 'on activation' field.

it can be in a trigger or in a waypoint

DarkCell

  • Guest
Re:Chopper problem..
« Reply #3 on: 11 Jan 2004, 22:49:34 »
Thnx that problem is fixed  :)

But Still 1 prob with units..

I want that the chopper fly's to next waypoint when 4 Soldiers get in the chopper.
What do I have to do?

Becease when I get in the chopper leaves and that's not suppose to be.. ::)

Shur

  • Guest
Re:Chopper problem..
« Reply #4 on: 12 Jan 2004, 09:50:21 »
I suppose the best way to control the chopper is to use the script which is controlling it from takeoff till landing.
For example, use something like this (group of soldiers is called here "my_group", chopper - "my_chopper"):
enter "[] exec "general.sqs"" into the init string of the chopper.

general.sqs script:
Code: [Select]
groupIsOnboard = 0
;wait until group is onboard
[my_chopper, my_group] exec "load_group.sqs"

@(groupIsOnboard ==1)

my_chopper flyInHeight 20
my_chopper Move (getPos LandPos)
~3
my_group lockWP true

;Wait until chopper get to the point
@((my_chopper distance (LandPos))<128)

my_chopper flyInHeight 0
my_chopper land "land"
;Wait until landing
@(((getPos my_chopper) select 2) < 1)
(commander my_chopper) action ["ENGINEOFF"]
my_group lockWP false
[my_group] exec "eject.sqs"

@(groupIsOnboard ==0)
LandPos is a name of  invisible (or visible - if you need) helipad on the position of landing.
The script "load_group.sqs" is the following:
Code: [Select]
_Group = _this select 0
_vehicle = _this select 1

;Assign any alive unit of group as a cargo of a chopper
_limit = count units _Group
_count = 0
#cycle_begin
_unit = (units _Group) select _count
_unit AssignAsCargo _vehicle
_count = _count+1
?(_count < _limit): goto "cycle_begin"
;then order whole group to get in
(units _Group) orderGetIn true

_limit = count units _Group
_count=0
#begin_load
_unit=((units _Group) select _count)
@(_unit IN _vehicle)
_count=_count+1
?(_count < _limit):goto "begin_load"
GroupIsOnboard = 1
exit

And the script "eject.sqs" is the following:
Code: [Select]
_Group = _this select 0

@(((getPos Heli_1) select 2) < 1)

_limit = count units _Group
_count=0
#begin_unload
_unit=((units _Group) select _count)
unassignVehicle _unit
_unit action ["getout",Heli_1]
#wait_unload
~0.5
? (_unit in Heli_1):goto "wait_unload"
~0.5
_count=_count+1
?(_count < _limit):goto "begin_unload"
GroupIsOnboard = 0
exit
This code is a universal part of my chopper missions and is tested to work correctly.

gundernak

  • Guest
Re:Chopper problem..
« Reply #5 on: 12 Jan 2004, 12:10:03 »
after I have read these scripts, I have a Q:

How will the chopper be able to take off after you set ' chopper flyInHeight 0'?

Quid Novi

  • Guest
Re:Chopper problem..
« Reply #6 on: 12 Jan 2004, 15:35:27 »
im wondering why you are using such complex scripts for such an easy question?

simple use of syncronization of load and get in waypoints would solve his question (unless the units are not in a group) and then its just a case of checking if the men are in the chopper

man in choppername

DarkCell

  • Guest
Re:Chopper problem..
« Reply #7 on: 12 Jan 2004, 16:08:06 »
hmm the Way Carpe Explains sounds easier ::)

So I have to Synch the LOAD Waypoint to the GET IN waypoint and the group of men do I group to the chopper?
and then the chopper lands and waits till all the units are in and then takes off is that correctly? :)

And Do I still have to to type :
Choppername land "land"
in the condition field? ???

gundernak

  • Guest
Re:Chopper problem..
« Reply #8 on: 12 Jan 2004, 20:42:15 »
carpe diem,

yes you can use unitname in vehicle name with count command

with this condition you do not let the chopper to move to the next WP:

? "_x in choppername" forEach units Groupname == 6

(I wrote 6 or any number how much the group is)

but the only problem is if the first man gets in the chopper, the Heli will heighten a little bit, and when you command the next soldiers to get in the chopper will land again to let them in.
And it looks weird a little bit.

I command needed, which does not let the chopper heighten at all until all members are in.

Shur

  • Guest
Re:Chopper problem..
« Reply #9 on: 13 Jan 2004, 06:26:48 »
im wondering why you are using such complex scripts for such an easy question?


It is needed for universal transportation script - for example, it is easy to create missions with "take us out of here!" radio command wherewer player group is.
Also, I don't like to create a stupid following from one yellow frame on the screen to another. It's better to give maximum freedom to player.
And the last reason is that I've experienced a lot of problems while trying to disembark a group using only editor. It was a lack of knowledge, of course - but I've solved the problem using this way. :)
And it works ;)
« Last Edit: 13 Jan 2004, 06:30:05 by Shur »