Home   Help Search Login Register  

Author Topic: Start missions in a vehicle/helo  (Read 1464 times)

0 Members and 1 Guest are viewing this topic.

Offline Zorasht

  • Members
  • *
    • 4th Perrus Squadron
Start missions in a vehicle/helo
« on: 24 May 2008, 12:20:32 »
Hi.
I have a small problem that is spoiling my whole mission  :whistle:

I had two groups of six men each. I want them to start inside an helicopter, both inside the same helicopter.(a chinnok from map air)
The helicopter has a waypoint to unload the passengers at the destination point, and the groups have a synchronized waypoint there to get out.

The missions is for multiplayer, so with the AI disable(using revive script too), each team leader has on the init line
Code: [Select]
group1 = group this;
group2 = group this;

I have a small script to load the soldiers into the chopper at mission start

Code: [Select]
_Helo1 = _this select 0;
_Helo2 = _this select 1;
_Group1 = _this select 2;
_Group2 = _this select 3;

{_x moveInCargo _Helo1; sleep 0.50} foreach units _Group1;
{_x moveInCargo _Helo2; sleep 0.50} foreach units _Group2;

As you can see this script was meant for two helos that I used in a previous missions. The only thing I do is in the arguments enter twice the name of the helo, so everybody got loaded on the same helo.

Well, it doesn't work now. Of course it works perfectly when I'm testing it by my own, when we play it online it loads on the helo a random number of people, left other people on the ground, and some of them got the headbug  :dunno:

I run the script inside my intro file, I first put a black screen with the mission tittle so nobody can see anything to allow enough time to get loaded in the helo, and after that line I run the script
Code: [Select]
nil = [TransHelo, TransHelo, group1, group2] execVM "GetInHelo.sqf";and I run the intro in the init line of a static unit on the map.

Any one has an idea of what is this happening?
Is there an easy way of loading two groups into an helo at mission start?
Does it matters that the groups are not full?

Thanks in advance.




"When you're pushed, killing is as easy as breathing"
John Rambo

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Start missions in a vehicle/helo
« Reply #1 on: 02 Jun 2008, 03:03:38 »
Quote
nil = [transHelo, TransHelo, group1, group2] execVM "GetInHelo.sqf";

I suspect for a start you need the Helis to have different names, like TransHelo1 and TransHelo2

Offline Rommel92

  • Members
  • *
Re: Start missions in a vehicle/helo
« Reply #2 on: 02 Jun 2008, 03:10:31 »
Code: [Select]
player moveInCargo _helo1;
sleep 3.0;
if (!(player in transHelo)) then {player moveInCargo transHelo};
Theres a better way to do this but, never the less.

Or:
Code: [Select]
{_x moveInCargo transHelo} forEach units group this;
Put that in INIT line of Group Leader.

OR

Code: (Init.sqf) [Select]
if (alive transHelo) then {player moveInCargo transHelo};

 :confused:
Get a better server?  :P