Jump to content
Sign in to follow this  
1para{god-father}

Advice with Script - on MP

Recommended Posts

Hi Guys,

I tested this code and it all run fine on my Local PC but put it up on our Hosted server and it just did not totally work , we got the Guy where he should have been so i know the script fired, but the part after the Waituntil just did not fire - but it worked fine when I test on a local ?

in MP player would be anyone if i am correct ?

Am I missing something for MP?

if (isServer) then {
_grpdummy = createGroup EAST; 
_vip1 = _grpdummy createUnit ["RU_Functionary1", getMarkerPos "task6spawn", [], 10, ""];
removeAllWeapons _vip1;
_vip1 setCaptive true; 
_vip1 setBehaviour "CARELESS";
_vip1 setPos ((position _vip1 nearestObject 115676) buildingPos 14);
_vip1 switchMove "AmovPercMstpSsurWnonDnon";
waituntil {player distance _vip1 < 5};
sleep .5;
 	[nil, nil, rHINT, "HAHAHA you will not take me alive I have triggered the device you have 15 sec."] call RE;
	 sleep 16;
 _boom = "Bo_GBU12_LGB" createVehicle ((position _vip1 nearestObject 115676) buildingPos 14);
pstask6a=true;
};

Share this post


Link to post
Share on other sites

Your wait until references 'player' which won't exist on the server machine. Instead you'd need to check something like:

waitUntil {_x distance _vip1 < 5} count playableUnits > 0};

The trick with this is that it will only work as a MP mission (viewed either in the MP editor or as a MP mission) and NOT in the single player editor! The opposite of what you have now, but it's what you want in the end. :) Stupid, I know. heh

Share this post


Link to post
Share on other sites

ahhhhhhhhhhhhhhh

Many thanks, had 25 players last night got to Task 6 which was that one and could not go further because it would not complete the task. – note to self test on server first !

PS used your Heli VIP script you sent and that worked a treat :) really nice !

Share this post


Link to post
Share on other sites

A word on playableUnits - for SP testing purposes you can put this line in your init file:

if !(isMultiplayer) then { playableunits = switchableunits };

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  

×