Jump to content
Sign in to follow this  
Zorasht

Start Missions into vehicle / Helo

Recommended Posts

Hi.

I have a small problem that is spoiling my whole mission  crazy_o.gif

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

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

group2 = group this;

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

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

_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

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">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.

Share this post


Link to post
Share on other sites

I use to move ppl in the chopper this way:

"h1" - name of first chopper

add to init line of the soldier:

Quote[/b] ]this AssignAsCargo h1; this MoveInCargo m1;

and for the pilot:

this AssignAsDriver h1; this MoveInDriver m1;

The same way I put "counter-attack" AI in cars that approach area when mission trigger goes off in that area.

Note: this mission start is kinda crappy since JIP players often start at the location (usually over sea) and not in the chopper that is already in the action somewhere on the map.

Share this post


Link to post
Share on other sites

The thing is that the chopper has pilot and gunner, I only want to add cargo. The lines I put above work ok as soon as I´m by myself or with AIs, but when everyone is a human player, some of them just don´t get loaded into the chopper, and many of them got the headbug, even though I sleep for half second just to avoid that.

Share this post


Link to post
Share on other sites

Iam not a good scripter at all...what iam about to post may not be how other people do this...here below iam assuming that each group has 4 units...I put this in my init.sqf..or just make another script file and just call it up...

//Group1 in cargo

unitname moveincargo chinookname;

unitname moveincargo chinookname;

unitname moveincargo chinookname;

unitname moveincargo chinookname;

//Group2 in cargo

unitname moveincargo chinookname;

unitname moveincargo chinookname;

unitname moveincargo chinookname;

unitname moveincargo chinookname;

Regards,

Iceman

Share this post


Link to post
Share on other sites
The thing is that the chopper has pilot and gunner, I only want to add cargo. The lines I put above work ok as soon as I´m by myself or with AIs, but when everyone is a human player, some of them just don´t get loaded into the chopper, and many of them got the headbug, even though I sleep for half second just to avoid that.

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

player moveInCargo _helo1;

sleep 3.0;

if (!(player in _helo1)) then {player moveInCargo _helo2};

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  

×