MarkCode82 21 Posted July 7, 2016 As of remoteExec and remoteExecCalls introduction? Are they still of use? Share this post Link to post Share on other sites
jshock 513 Posted July 7, 2016 They are if you want to make absolute sure of the locality of something, especially when debugging, but overall, with those new commands they aren't as necessary when trying to actually execute code within a specific locality scope. Share this post Link to post Share on other sites
cuel 25 Posted July 7, 2016 They most certainly are Share this post Link to post Share on other sites
IndeedPete 1038 Posted July 7, 2016 Don't forget backwards compatibility. Removing these commands now would probably cause mayhem in tons of mods and missions. Share this post Link to post Share on other sites
Arkensor 96 Posted July 7, 2016 isServer , isDedicated or hasInterface are all three used by me on daily bases. RemoteExec has nothing to do with that! You have got files like the init.sqf where you want the server to exit somewhere. You have got the init.sqf again, where you want to exit with a function for a headless client (!hasInterface). Andyou have got function that you execute on all clients, but a HC or the server should not perform all the code from it. Maybe you had no use for that function, but I can clearly tell you, that those a pretty important, and a removal of something is nonsense too. (Like removing the good old 2D editor #R.I.P) Regards Arkensor 1 Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted July 7, 2016 you can get away with only one use of each of those commands during initialization, but cant avoid them entirely if you have a need to check those things. one example is in preinit=1 functions Share this post Link to post Share on other sites
MarkCode82 21 Posted July 7, 2016 but isn't it better to partition the data into.initServer.sqfinitPlayerServer.sqf initPlayerLocal.sqf?Rather than use init.sqf ? Because I've successfully kept most code executed locally on the server via initServer.sqf for weather values and then push the updates to the clients server-side via initServer.sqf and [time,value] remoteExec ["setRain",player,false]; Share this post Link to post Share on other sites
jshock 513 Posted July 7, 2016 Sure, but it does essentially the same thing as handling it in the normal init.sqf, I prefer the event scripts that you've mentioned, but some people haven't moved over to those yet, it's a matter of personal preference (I'm not sure if there is any optimizations to using the event scripts over separate handles within the init.sqf or not). 1 Share this post Link to post Share on other sites
IndeedPete 1038 Posted July 8, 2016 but isn't it better to partition the data into. initServer.sqf initPlayerServer.sqf initPlayerLocal.sqf ? Rather than use init.sqf ? Because I've successfully kept most code executed locally on the server via initServer.sqf for weather values and then push the updates to the clients server-side via initServer.sqf and [time,value] remoteExec ["setRain",player,false]; Even then you have situations in which you need these commands. Headless clients for example run the iniPlayerLocal just as any real player. Also things like mission flow (FSM), trigger fields, etc. - everything that is run on both server and clients requires these commands. Share this post Link to post Share on other sites
DangerousDiz 21 Posted July 8, 2016 While event scripts mentioned above are great, if you have a script that runs on all machines but does slightly different things on server, HC and player you'd use these commands and that stops you having to write essentially the same code in three places. Less repetition = better scripting and debugging. 1 Share this post Link to post Share on other sites
MKD3 27 Posted July 8, 2016 Not to mention, what if someone runs say, a loop thats meant only for the server, globally. Without a locality check it could cause fuckery Share this post Link to post Share on other sites