Jump to content
Sign in to follow this  
granQ

Join in progress

Recommended Posts

Hm so I've had a problem making a mp mission. I've read through this thread and the 6th sense stuff on the biki but maybe im missing something, then again I don't know if this is even a JIP issue (don't think it would be but just checking...).

So I recently tried playing one of my completed SP missions with a friend. To my surprise most things worked, however the init.sqf file of my missions places the team of 4 named units into a named chopper, which never happens. It seems only the host gets put in the chopper, not the other player or even the two AI teammates.

I tried wrapping the init.sqf into an isServer thinkin maybe it executing twice is causing the problem... but that didnt help, it only made it worse by not giving players the custom loadouts either (which is a script called from init.sqf).

This might be irrelevant to the thread since both players are present in the lobby when the game is launched, so idk. Any thoughts/ideas are appreciated :)

Share this post


Link to post
Share on other sites

{_x moveincargo choppa} foreach [dude1,dude2,dude3,dude4];

In init.sqf, no isserver or any other checks. If it doesn't work, there some other problem.

PS. posting the init.sqf usually helps.

Share this post


Link to post
Share on other sites

Ok that didn't do it either. Here's the init. I just tried this exact script with a friend, he (host, unit 'sMD') gets put in the chopper. The two AI and I are left on the ground, I can free-look around, walk, shoot... but can't rotate/aim my character/gun. It isn't equipping my character or the ai units with the custom loadouts from the called loadout script either. This all works in SP.

init.sqf

execVM "briefing.sqf";

{_x moveincargo huey} foreach [sDM, sSL, sMD, sXP];

cutText ["Mission 02\n\nS A V I O R", "BLACK"];

execVM "scripts\loadouts.sqf";

Cobra = Group sSL;
sSL setIdentity "Kurt";
sDM setIdentity "Lance";
sMD setIdentity "Andy";
sXP setIdentity "Will";

sSL setGroupid ["Cobra",""];
//Gabranth setGroupid ["U.S.S. Gabranth", ""];
//Rettenger setGroupid ["U.S.S. Rettenger", ""];
Pilot setGroupid ["Hitman", ""];
huey setGroupid ["Vulture", ""];
sarPilot setIdentity "Ragland";
helios setGroupid ["Helios", ""];

sleep 5;

cutText ["Mission 02\n\nS A V I O R", "BLACK IN"];

And yes... I know it isn't a huey, maybe a super huey >.>

Share this post


Link to post
Share on other sites

With the script running more than once in MP, it may be causing the weird behaviour, try:

[font=monospace]if (isServer) then {
  {_x moveInCargo huey} forEach [sDM, sSL, sMD, sXP];[/font]
  execVM "scripts\loadouts.sqf"
[font=monospace]};[/font]

While we're on the topic, I just had a mission driving me nuts over JIP 'cause variables sent using publicVariable weren't correct when rejoining. Turns out they were being overwritten by the damn trigger that created them in the first place.. :mad:

EDIT: Whole script incase I wasn't clear:

Everything inside the {} will only be run on the host machine, since it checks for isServer before running the code. Clients will skip past and continue the rest of the script.

execVM "briefing.sqf";

[font=monospace]if (isServer) then {
  {_x moveInCargo huey} forEach [sDM, sSL, sMD, sXP];[/font]
  execVM "scripts\loadouts.sqf"
[font=monospace]};[/font]

cutText ["Mission 02\n\nS A V I O R", "BLACK"];

Cobra = Group sSL;
sSL setIdentity "Kurt";
sDM setIdentity "Lance";
sMD setIdentity "Andy";
sXP setIdentity "Will";

sSL setGroupid ["Cobra",""];
//Gabranth setGroupid ["U.S.S. Gabranth", ""];
//Rettenger setGroupid ["U.S.S. Rettenger", ""];
Pilot setGroupid ["Hitman", ""];
huey setGroupid ["Vulture", ""];
sarPilot setIdentity "Ragland";
helios setGroupid ["Helios", ""];

sleep 5;

cutText ["Mission 02\n\nS A V I O R", "BLACK IN"];

Edited by bhaz
+script

Share this post


Link to post
Share on other sites

If there's just 4 units, add the command to their init field. I've never seen that fail.

Share this post


Link to post
Share on other sites

I created a game logic unit and put the moveInCargo commands in its init field, that works finally.

Edited by JDog

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  

×