A few questions

Workshop for all Mission Engineer Comrades. Home of the FA Mission Making Template.
darkChozo
Host
Posts: 207
Joined: Fri Aug 14, 2015 12:48 pm

Re: A few questions

Post 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.

User avatar
SuicideKing
Host
Posts: 312
Joined: Wed Nov 27, 2013 1:29 pm
Location: India/US West
Contact:

Re: A few questions

Post 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. :/
themiddlevoid.wordpress.com

User avatar
SuicideKing
Host
Posts: 312
Joined: Wed Nov 27, 2013 1:29 pm
Location: India/US West
Contact:

Re: A few questions

Post by SuicideKing »

Thanks, figured stuff out, mission complete.
themiddlevoid.wordpress.com

Post Reply