litenthadark 10 Posted March 16, 2015 Hey there everyone. I just had a quick question regarding executing scripts on all clients. I am currently using MOSS_Targets, a script that gives you access to a 3,2,1,0 target that shows hit points and allows you to register shooters to a lane and save scores. The script worked fine when I played in single player, but when I started a multiplayer listen server, it didn't. I got an issue that stated I didn't properly sync all objects in the editor. However, I did. I went back and checked it was all there. After a day of scouring the internet, I found the if (!isdedicated) then command. This allowed me to execute the script on the host player and all clients. HALLELUJAH it worked. However, the purpose of this script is using it for my unit. When taking the scripts and moving them to my dedicated server, I received the same "sync objects" error as I did previously on my listen server. I tried if isserver, if isdedicated, if userinterface, all to no avail. If you guys need access to the scripts or mission files, or just have any idea how I can get this script to execute on all clients on my dedicated server, please let me know ASAP! thanks for the help!!! ~Litenthadark Share this post Link to post Share on other sites
austin_medic 109 Posted March 16, 2015 Hey there everyone. I just had a quick question regarding executing scripts on all clients.I am currently using MOSS_Targets, a script that gives you access to a 3,2,1,0 target that shows hit points and allows you to register shooters to a lane and save scores. The script worked fine when I played in single player, but when I started a multiplayer listen server, it didn't. I got an issue that stated I didn't properly sync all objects in the editor. However, I did. I went back and checked it was all there. After a day of scouring the internet, I found the if (!isdedicated) then command. This allowed me to execute the script on the host player and all clients. HALLELUJAH it worked. However, the purpose of this script is using it for my unit. When taking the scripts and moving them to my dedicated server, I received the same "sync objects" error as I did previously on my listen server. I tried if isserver, if isdedicated, if userinterface, all to no avail. If you guys need access to the scripts or mission files, or just have any idea how I can get this script to execute on all clients on my dedicated server, please let me know ASAP! thanks for the help!!! ~Litenthadark BIS_fnc_MP has your back. Use it to sync whats happening across all clients, since most commands are local what happens on one machine usually stays on that machine. Share this post Link to post Share on other sites
litenthadark 10 Posted March 16, 2015 BIS_fnc_MP has your back. Use it to sync whats happening across all clients, since most commands are local what happens on one machine usually stays on that machine. How do I use it properly to make sure it executes the right stuff? I have about 10 scripts and a config file that needs to execute Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted March 16, 2015 Firstly, if you believe reviewing your scripts could help us understand your issue then link/post them right away. Secondly, to use BIS_fnc_MP properly, you must make sure that the script you want to execute exists on all clients. Alternatively, you could also broadcast a function to wherever it should be executed, but that causes loaded and is therefore not recommended. Here's how to use it: [["parameters", "here"], "YOUR_fnc_function", true, true, false] call BIS_fnc_MP; The 1st parameter for BIS_fnc_MP is the parameters needed for the function you want to remotely execute. The 2nd parameter is the script/function to be executed. This can be the function name (String) or one of these scripting commands or a {code block}. The 3rd parameter stands for where to execute it. true to execute on every client, false to execute only on the server. (For more possibilities read here). The 4th parameter indicates whether the code should be executed now AND for everyone who joins the server (true) or not (false). The 5th parameter indicates whether the code should be called (true) or spawned (false) on the targeted machine(s). Share this post Link to post Share on other sites