Jump to content
Sign in to follow this  
Meathead

passengers eject chopper without wps?

Recommended Posts

Im trying to get a group to get off a chopper that has moved to a location using domove and flyinheight only.

Example:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

chopper1 domove getpos object1

chopper1 flyinheight 10

~2

chopper1 flyinheight 5

~2

chopper1 flyinheight 2

~5

***need group to get out HERE!!!***

chopper1 domove getpos object2

chopper1 flyinheight 5

~2

chopper1 flyinheight 10

~2

chopper1 flyinheight 25

~5

Ive tried using bits from scripts Ive seen and actions and unassignvehicle methods but I cant seem to get them to getout only the group leader gets out or the chopper actually tries to land to let them out. I want the chopper to remain in its hover and the group to eject out...Can anyone show me the right way to do this?

thx in advance

Meat

Share this post


Link to post
Share on other sites

Have you tried the script from Harnu's post located HERE in the Mission Editing FAQ pinned in this forum  (it is in the 4th post)?

That should work for your problem (just be carefull to the name used , change them accordingly to the ones of your mission)

Ejecting from such a small altitude -shoud- not kill them all ;)

Share this post


Link to post
Share on other sites

well this is what i tried:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

~5

r1 domove getpos o1a

~2

r1 flyinheight 60

~2

r1 flyinheight 50

~2

r1 flyinheight 40

~2

r1 flyinheight 30

~2

r1 flyinheight 20

~2

r1 flyinheight 10

~2

r1 flyinheight 5

~2

r1 flyinheight 2

~2

"this action ["EJECT",r1]" foreach units group g1

~5

r1 domove getpos o1b

~2

r1 flyinheight 2

~2

r1 flyinheight 4

~2

r1 flyinheight 6

~2

r1 flyinheight 8

~2

r1 flyinheight 10

~2

r1 flyinheight 20

~2

r1 flyinheight 30

~2

r1 flyinheight 40

~10

exit

and I get this error:

error unkown operator eject

any ideas?

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

{_X action ["EJECT",vehicle _X]} foreach units group g1

That'll work I think.

Share this post


Link to post
Share on other sites

ok this works...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

~5

r1 domove getpos o1a

~2

r1 flyinheight 60

~2

r1 flyinheight 50

~2

r1 flyinheight 40

~2

r1 flyinheight 30

~2

r1 flyinheight 20

~4

r1 flyinheight 10

~2

r1 flyinheight 5

~2

r1 flyinheight 2

~3

unassignvehicle g1

unassignvehicle g2

unassignvehicle g3

unassignvehicle g4

unassignvehicle g5

unassignvehicle g6

unassignvehicle g7

unassignvehicle g8

g1 action ["EJECT",vehicle _X]

g2 action ["EJECT",vehicle _X]

g3 action ["EJECT",vehicle _X]

~2

g4 action ["EJECT",vehicle _X]

g5 action ["EJECT",vehicle _X]

~1

g6 action ["EJECT",vehicle _X]

g7 action ["EJECT",vehicle _X]

g8 action ["EJECT",vehicle _X]

r1 domove getpos o1b

~2

r1 flyinheight 2

~2

r1 flyinheight 4

~2

r1 flyinheight 6

~2

r1 flyinheight 8

~2

r1 flyinheight 10

~2

r1 flyinheight 20

~2

r1 flyinheight 30

~2

r1 flyinheight 40

~10

exit

but the chopper still turns left and lands for a second. Is there anything I can do to keep it from reacting to the crew disembarking? is there a way to make leader order them to eject so the chopper wont want to land?

Share this post


Link to post
Share on other sites

nope tryed that also

as soon as leader gets out and the second man starts ejecting the chopper immediatly goes into landing sequence, no matter where i put the unassignvehicles

this works best

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

~5

r1 domove getpos o1a

~2

r1 flyinheight 60

~2

r1 flyinheight 50

~2

r1 flyinheight 40

~2

r1 flyinheight 30

~2

r1 flyinheight 20

~4

r1 flyinheight 10

~2

r1 flyinheight 5

~2

r1 flyinheight 1

~3

{_X action ["EJECT",vehicle _X]} foreach units group g1

{unassignvehicle _X} foreach units group g1

~5

r1 domove getpos o1b

~2

r1 flyinheight 2

~2

r1 flyinheight 4

~2

r1 flyinheight 6

~2

r1 flyinheight 8

~2

r1 flyinheight 10

~2

r1 flyinheight 20

~2

r1 flyinheight 30

~2

r1 flyinheight 40

~10

exit

BUT...all the guys pile out of the chopper onto each other it just looks kinda gimp that way. :/

Share this post


Link to post
Share on other sites

The problem is you made them ALL unassignvehicle at teh start, and added a delay, then ejected more.

Make it like

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

unassignvehicle G1

g1 action ["EJECT",vehicle _X]

unassignvehicle G2

g2 action ["EJECT",vehicle _X]

unassignvehicle G3

g3 action ["EJECT",vehicle _X]

~2

unassignvehicle G4

g4 action ["EJECT",vehicle _X]

unassignvehicle G5

g5 action ["EJECT",vehicle _X]

~1

unassignvehicle G6

g6 action ["EJECT",vehicle _X]

unassignvehicle G7

g7 action ["EJECT",vehicle _X]

unassignvehicle G8

g8 action ["EJECT",vehicle _X]

Share this post


Link to post
Share on other sites

personally I'd use an ejection script for it. Whatever you use, make sure you unassign each unit after they eject, or as a group after all are out. Mr. Zig is wrong. If the first command is an unassignvehicle command, the helo will try to land...period. crazy_o.gif

Share this post


Link to post
Share on other sites

No. I'm not.

Check out this ejection script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_helo = _this select 0

_allcrew = crew _helo

? (count crew _helo)<=2:exit

_array = []

"if (_x != driver _helo && _x != gunner _helo) then {_array = _array + [_x]}" foreach _allcrew

_allcrew = _array

? count _allcrew == 0 : goto "done"

_c = 0

#eject

_man = (_allcrew select _c)

unassignvehicle _man

?!alive _helo : exit

_man action ["EJECT",_helo]

~0.4

_c = _c + 1

? _c != count _allcrew : goto "eject"

#done

exit

Made by um.. Footmuch? or trenchfeet.. Gah I forget, it was for the C47 and I edited it.

Works fine.

Perhaps the heli lands because you are using flyinheight 2?

That might cause them to land, cause its so low.

Share this post


Link to post
Share on other sites

hmmm ok I will try and call this with a trigger thx smile_o.gif

Share this post


Link to post
Share on other sites

If you look at Bohemias eject script you'll see that the unassign command comes after the ejection. The script is called "out.sqs" and is in the mission 07HoldMalden.Abel.

Yes, Mr. Zig, you are wrong...along with some others I imagine. Unless you want to argue that Bohemia is wrong ??  rock.gif

Share this post


Link to post
Share on other sites

well that script didnt work..I plugged it in just as posted.

noone left the chopper. I used a trigger with r1 in thislist condition and [r1] exec "eject.sqs"

looks like it should work though...dont know why it didnt. rock.gif

Share this post


Link to post
Share on other sites

CrashnBurn, I have used that script dozens of times, it works like a charm.

Meathead, perhaps it ISNT triggering?

Put a hint on the on activation field to make sure.

Share this post


Link to post
Share on other sites

Meathead, one thing you can do to prevent them all from piling up when they get out is to have the group leaders speedmode on full. That way he'll move off right after he gets out instead of waiting for everyone else. Later on you may want to set it back to normal to keep the group in formation. Here's a good eject script I have never had problems with:

;--------------------------------------------------------------------

;to call this script, simply pass the execution in a trigger

;or waypoint as follows- [groupname, heloname] exec "eject.sqs"

;--------------------------------------------------------------------

_grp = _this select 0

_vehicle = _this select 1

_aunits = units _grp

_i = 0

_j = count _aunits

#Here

(_aunits select _i) action ["EJECT",_vehicle]

unassignvehicle (_aunits select _i)

_i=_i+1

~0.5

?_j>_i:goto "Here"

"unassignvehicle _x" forEach units _grp

exit

Share this post


Link to post
Share on other sites
Meathead, one thing you can do to prevent them all from piling up when they get out is to have the group leaders speedmode on full. That way he'll move off right after he gets out instead of waiting for everyone else. Later on you may want to set it back to normal to keep the group in formation. Here's a good eject script I have never had problems with:

;--------------------------------------------------------------------

;to call this script, simply pass the execution in a trigger

;or waypoint as follows- [groupleadername, heloname] exec "eject.sqs"

;--------------------------------------------------------------------

_grp = _this select 0

_vehicle = _this select 1

_aunits = units _grp

_i = 0

_j = count _aunits

#Here

(_aunits select _i) action ["EJECT",_vehicle]

unassignvehicle (_aunits select _i)

_i=_i+1

~0.5

?_j>_i:goto "Here"

"unassignvehicle _x" forEach units _grp

exit

For this script to work u need to assign a name for the Group.

Team1 = Group this in each unit of the Group.

Share this post


Link to post
Share on other sites

Thnx Junker, I should have had groupname instead of groupleader. The groupname only has to be in the ini of one of the group members, not all of them.

Share this post


Link to post
Share on other sites

Thanks guys, your alls input is very helpful.

Alot of landing scripts Ive used in the past end up falling short because of...I guess memory problems as u add more troops into the mission and start hitting your computer limits. I always end up having choppers missing there marks and flying off to *kiss* trees of something. Thats why Im looking for new ways to do something thats already been done before. Most the scripts out there work great for small and medium size missions but when you get 6 to 8 choppers trying to put troops into a fight the timing starts getting all out of whack for some reason. *shrugs* I dont know..I hope that scripting the choppers landings all the way in will help prevent this but well see. wink_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×