Page 2 of 2

Re: A few questions

Posted: Thu Oct 08, 2015 1:50 pm
by darkChozo
The first false should be a true, like this:

Code: Select all

[params,"command",true] call BIS_fnc_MP;
This tells every machine in the game to run the given command with the given params locally. So if you just run this on the server, it'll be like you just called BIS_fnc_showNotification on every client as well as the server itself. So yes, you'll need isServer && this in the trigger, otherwise every client will tell every other client to run the message, which is how you get 30 "All caches destroyed" messages appearing on everybody's screen.

All this is a best practices thing mostly. If you don't centralize things on the server, then you're going to have timers running on everyone's local machine and that can lead to desync. For example, if someone lags out halfway through, their timer might stop counting for 30 seconds or whatever, so they'll end up getting the notification 30 seconds after everybody else. If you keep track of it on the server and BIS_fnc_MP out a message instead, that's not going to be an issue.

Re: A few questions

Posted: Thu Oct 08, 2015 6:47 pm
by SuicideKing
darkChozo wrote:The first false should be a true, like this:

Code: Select all

[params,"command",true] call BIS_fnc_MP;
This tells every machine in the game to run the given command with the given params locally. So if you just run this on the server, it'll be like you just called BIS_fnc_showNotification on every client as well as the server itself. So yes, you'll need isServer && this in the trigger, otherwise every client will tell every other client to run the message, which is how you get 30 "All caches destroyed" messages appearing on everybody's screen.

All this is a best practices thing mostly. If you don't centralize things on the server, then you're going to have timers running on everyone's local machine and that can lead to desync. For example, if someone lags out halfway through, their timer might stop counting for 30 seconds or whatever, so they'll end up getting the notification 30 seconds after everybody else. If you keep track of it on the server and BIS_fnc_MP out a message instead, that's not going to be an issue.
Okay. So if I just want to say "this place has been destroyed", I can just use a hint or BIS_fnc_showNotification, right? Without the BIS_fnc_MP part, since no timers are involved?

This is so confusing. :/

Re: A few questions

Posted: Fri Oct 09, 2015 2:50 pm
by SuicideKing
Thanks, figured stuff out, mission complete.