A few questions

Where Mission Engineer Comrades and the FA Mission Making Template lived
darkChozo
Posts: 174
Joined: Fri Aug 14, 2015 12:48 pm

Re: A few questions

Post by darkChozo » Thu Oct 08, 2015 1:50 pm

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.

User avatar
SuicideKing
Posts: 249
Joined: Wed Nov 27, 2013 1:29 pm
Location: India/Netherlands
Contact:

Re: A few questions

Post by SuicideKing » Thu Oct 08, 2015 6:47 pm

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. :/
FIST, SHARK, FLAME, BURST, BONZO, WILDCAT, GRIZZLY, DUKE, DEMON :v:

User avatar
SuicideKing
Posts: 249
Joined: Wed Nov 27, 2013 1:29 pm
Location: India/Netherlands
Contact:

Re: A few questions

Post by SuicideKing » Fri Oct 09, 2015 2:50 pm

Thanks, figured stuff out, mission complete.
FIST, SHARK, FLAME, BURST, BONZO, WILDCAT, GRIZZLY, DUKE, DEMON :v:

Post Reply