Home   Help Search Login Register  

Author Topic: MoveInCargo from one vehicle to another?  (Read 1415 times)

0 Members and 1 Guest are viewing this topic.

Offline Clayborne

  • Members
  • *
MoveInCargo from one vehicle to another?
« on: 30 Mar 2009, 01:44:18 »
I did a search for this, but it's hard to know how to word it. I'm not so sure this can be done, so I thought it was quicker to ask.

I would like the player group to start out riding in a chopper, then when they reach a trigger, I want them to teleport to a different vehicle. Basically I am trying to simulate a zodiac being dropped from the back of a chinook over the water, with the player group inside. Everything works except for the group loading into the boat.

I tried messing around with UnassignVehicle and AssignAsCargo and things like that, but they didn't do anything, at least not in the order I was doing it.

As I said, everything works except for the group switching vehicles. If I don't have my group loaded in the chopper at the start, we are teleported into the zodiac as planned when the trigger is activated. It just doesn't work when I have been cargo in another vehicle.

I'd be grateful for any help!

Offline zwobot

  • Members
  • *
Re: MoveInCargo from one vehicle to another?
« Reply #1 on: 30 Mar 2009, 06:58:13 »
Did you try to eject the units of the group prior to moveInCargo'ing them into the zodiac?
Code: [Select]
"_x action [""eject"", chopper_name]" forEach units your_groupname
"_x unassignVehicle chopper_name" forEach units your_groupname
"_x moveInCargo zodiac" forEach units your_groupname
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Clayborne

  • Members
  • *
Re: MoveInCargo from one vehicle to another?
« Reply #2 on: 30 Mar 2009, 20:50:40 »
Thanks alot zwobot, that worked great. UnassignVehicle or Unassign doesn't seem to work in the context of a group command, but I just removed that line and it still works anyway.

Thanks again!

Offline zwobot

  • Members
  • *
Re: MoveInCargo from one vehicle to another?
« Reply #3 on: 30 Mar 2009, 21:12:39 »
Ah you are right, I did a bubu with the syntax on unassignVehicle
It should be:
Code: [Select]
"unassignVehicle _x" forEach units groupnameI recommend to use unassignVehicle after ejecting the units and before moveInCargo'ing them into the next vehicle, otherwise there is a slight possibility of the AI becoming confused and trying to board the first vehicle again.
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Clayborne

  • Members
  • *
Re: MoveInCargo from one vehicle to another?
« Reply #4 on: 30 Mar 2009, 21:32:26 »
Ok I guess I'll do that then, as in this case if they tried to reboard the first vehicle they'd run into the sea.

Thank you for the help.

Offline Clayborne

  • Members
  • *
Re: MoveInCargo from one vehicle to another?
« Reply #5 on: 18 Jan 2010, 20:57:24 »
Hi again,

This shoud probably be in the MP section but I remembered I had made the thread. I have only recently been able to test this in multiplayer, and there are some problems.

If a client is the group leader, everyone in the group is simply ejected from the chopper and falls into the sea, except for the server player who is transported into the zodiac.

If the server is group leader, everyone including him is moved into the zodiac, except client players who are dropped in the drink! Here's my script. R1 is the zodiac, ch1 is the chopper, sarge is the group leader.


Code: [Select]
~0.1

"unassignVehicle _x" forEach units group1
"_x action [""eject"", ch1]" forEach units group1

~0.1

"_x moveincargo r1" foreach [ sas1, sas2, sas3, sas4 ]
sarge moveindriver r1

~2


Would it work if I assigned everyone as cargo to the zodiac before moveincargoing them? Should I moveincargo the units individually with a short delay in between?

Any help appreciated!