6thStorm 0 Posted September 27, 2007 Hi. Im making a MP mission and i see that when i try the mission on a dedicated server the intro will lag a lot. Is there a way to make the intro local on all pc's to reduce lag? Share this post Link to post Share on other sites
Junker 0 Posted September 27, 2007 duno if this is the right code but it near. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(Local) : Exit Share this post Link to post Share on other sites
6thStorm 0 Posted September 27, 2007 ok thx i'll try it out. Share this post Link to post Share on other sites
MEDICUS 0 Posted September 27, 2007 Or try this: Place a GameLogic named "server" on your map and write the following line at the top of your intro.sqs:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? !(local server):exit (That's actually quit similar to Junker's one) Mfg Medicus Share this post Link to post Share on other sites
sickboy 13 Posted September 27, 2007 Friends, we're not stuck at OFP :-) ServerCheck: SQF: if(isServer)exitWith{}; SQS: if(isServer)then{exit}; Both methods only run the script when on a client machine, if you add a ! infront of isServer then the script will only run on the server. When it comes to local intro's... it's a pitty the intro section of the mission editor does not work in multiplayer, the only thing that could be done is using the createVehicleLocal command to create vehicles locally to the machine-only, and then use those vehicles in intro scripts. The problem is that there is afaik no local createUnit command, which would kinda make it impossible to create a local intro because an intro doesn't exist out of empty-vehicles-only, but of course also units (soldiers). Share this post Link to post Share on other sites
[frl]myke 14 Posted September 27, 2007 @sickboy if not isServer then exit? This will run only on client? Are you drunk? You meant counterwise: if (isServer) exitwith {}; if (isServer) then exit; Those will run it on client. With the ! it runs serverside only Myke out Share this post Link to post Share on other sites
Junker 0 Posted September 27, 2007 Friends, we're not stuck at OFP :-) Im quite happy with SQS thank you very mucho Share this post Link to post Share on other sites
sickboy 13 Posted September 27, 2007 Woops, indeed too quicky, ur right myke @Junker; What your personal preference for scripting is, is your choice. Still my point remains valid. We have a function in ArmA called isServer, so no need for creating a server logic and all that any longer. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted September 28, 2007 That code will cause a problem when running on a non dedicated server game. A better check to see if the script is being run on a dedicated server is to see if it's the server and the player is null as well, like so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if (isServer and isNull player) exitWith {}; You'll have to check the exact syntax to make sure that it's correct. Share this post Link to post Share on other sites