playerSide – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(Safer Method)
mNo edit summary
 
Line 4: Line 4:
Just make sure you do not do a waitUntil {!isNull player} on the server side, player is always null on the server. You might lock up your server like I did years ago.  A safer way to go is the following
Just make sure you do not do a waitUntil {!isNull player} on the server side, player is always null on the server. You might lock up your server like I did years ago.  A safer way to go is the following


if (!isDedicated && (player != player)) then
if (!isDedicated && (player != player)) then {  
{
:waitUntil {player == player};
    waitUntil {player == player};
};
};


--[[User:ViperMaul|ViperMaul]] 05:48, 24 June 2010 (CEST)
--[[User:ViperMaul|ViperMaul]] 05:48, 24 June 2010 (CEST)

Latest revision as of 05:54, 24 June 2010

When is playerSide set to the correct value? is waitUntil {!isNull player} enough to ensure a correctly returned value? > Yes. At mission start every unit is civilian for a brief moment from what I recall. So your waitUntil avoids faulty detection. Nothing else needed. --Kju 21:23, 23 June 2010 (CEST)

Just make sure you do not do a waitUntil {!isNull player} on the server side, player is always null on the server. You might lock up your server like I did years ago. A safer way to go is the following

if (!isDedicated && (player != player)) then {

waitUntil {player == player};

};

--ViperMaul 05:48, 24 June 2010 (CEST)