silentwisher 8 Posted December 4, 2014 So we have mission that originally had only a single Zeus entity that was able to detect newly spawned objects and sync them automatically to the Zeus interface. We want to make a change to our system however. Problem is though, when we have two soldiers with access to Zeus it no longer works. We now want it so myself (main Zeus) and our sub Zeus to play along side our other soldiers while still having access to Zeus. The scripts that worked originally are shown below[These only worked when there was a actual Zeus entity, now that we are soldiers with Zeus access it does not work.]. ADV_zeus.sqf : /* ADV_zeus script by Belbo Makes most units placed in the editor and playable units editable by Zeus. Call from init.sqf via: if (isServer) then {[CURATORMODULENAME,true] execVM "ADV_zeus.sqf";}; */ _curator = _this select 0; _addCivilians = _this select 1; //adds objects placed in editor: _curator addCuratorEditableObjects [vehicles,true]; _curator addCuratorEditableObjects [(allMissionObjects "Man"),false]; _curator addCuratorEditableObjects [(allMissionObjects "Air"),true]; _curator addCuratorEditableObjects [(allMissionObjects "Ammo"),false]; //makes all units continuously available to Zeus (for respawning players and AI that's being spawned by a script.) while {true} do { _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true}; { if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]}; } forEach allUnits; _curator addCuratorEditableObjects [vehicles, true]; sleep 10; }; if (true) exitWith {}; Our init.sqf : if (!isDedicated) then { waitUntil {!(isNull player) && {time > 0}}; //JIP player addAction [ "<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal}, [], 6, true, true, "", "cursorTarget isKindOf 'B_supplyCrate_F' && {_target distance cursorTarget <= 5}" ]; player addEventHandler ["Respawn", { (_this select 0) addAction [ "<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal}, [], 6, true, true, "", "cursorTarget isKindOf 'B_supplyCrate_F' && {_target distance cursorTarget <= 5}" ]; }]; }; [] spawn { if ( !isDedicated ) then { waitUntil {! ( isNull player ) }; [] spawn { }; while { true } do { waitUntil { cameraOn == player && { cameraView == "External" } }; player globalChat "3rd person view is not allowed!!!"; player switchCamera "Internal"; }; }; }; ////////// ADV_Zeus-Script by Belbo start ////////// if (isServer) then { //CuratorModuleName = your curator module name; true = boolean, if civilians should be editable by zeus as well - set to false if you don't want civilians to be editable. [zeus,true] execVM "ADV_zeus.sqf"; }; ////////// ADV_Zeus-Script by Belbo end ////////// Screen of our 2d editor: http://i.imgur.com/0HXJmyy.jpg (217 kB) Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted December 4, 2014 add_to_curator = TRUE; while {add_to_curator} do { {_x addCuratorEditableObjects [(allMissionObjects "All"),TRUE];} count allCurators; sleep 10; }; Share this post Link to post Share on other sites
silentwisher 8 Posted December 4, 2014 add_to_curator = TRUE; while {add_to_curator} do { {_x addCuratorEditableObjects [(allMissionObjects "All"),TRUE];} count allCurators; sleep 10; }; So how exactly would I change that/insert the change? Share this post Link to post Share on other sites
cuel 25 Posted December 4, 2014 What is "zeus" in your script? The player object or the zeus module Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted December 4, 2014 So how exactly would I change that/insert the change? Replace this block: while {true} do { _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true}; { if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]}; } forEach allUnits; _curator addCuratorEditableObjects [vehicles, true]; sleep 10; }; With this one: add_to_curator = TRUE; while {add_to_curator} do { {_x addCuratorEditableObjects [(allMissionObjects "All"),TRUE];} count allCurators; sleep 10; }; Be careful as everything put down in the editor and mission flow will be editable by the curator. Easy to accidentally delete the wrong thing. :) 1 Share this post Link to post Share on other sites
siuling337 10 Posted December 4, 2014 Thanks for sharing~! :D Share this post Link to post Share on other sites
Tajin 349 Posted December 4, 2014 Why not simply stick to what the original script does instead of changing it to "allMissionObjects"?? add_to_curator = TRUE; while {add_to_curator} do { _units = vehicles; { if (!_addCivilians && {(side _x) == civilian}) then { _units pushBack _x; }; } count allUnits; { _x addCuratorEditableObjects [ _units, TRUE]; } count allCurators; sleep 10; }; This does exactly what the original does, but for every Zeus. Share this post Link to post Share on other sites
SilentSpike 84 Posted December 4, 2014 Why not just use the curatorObjectPlaced event handler and avoid nasty infinite loops? :p Share this post Link to post Share on other sites
Tajin 349 Posted December 4, 2014 Because thats a totally different story. This is about adding editable objects to the curator. You cant use a curator-eventhandler on objects that don't even belong to the curator. "curatorObjectPlaced" only covers objects that the curator/zeus himself adds to the mission and those are automatically editable. Share this post Link to post Share on other sites
SilentSpike 84 Posted December 4, 2014 Oooh yeah, nevermind. I was thinking specifically with syncing curator spawned units. My bad. Share this post Link to post Share on other sites
silentwisher 8 Posted December 4, 2014 (edited) Replace this block: while {true} do { _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true}; { if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]}; } forEach allUnits; _curator addCuratorEditableObjects [vehicles, true]; sleep 10; }; With this one: add_to_curator = TRUE; while {add_to_curator} do { {_x addCuratorEditableObjects [(allMissionObjects "All"),TRUE];} count allCurators; sleep 10; }; Be careful as everything put down in the editor and mission flow will be editable by the curator. Easy to accidentally delete the wrong thing. :) There is a issue with this. It does show everything like you said which could be problematic for non-trained Zeus users. Problem mainly is, it breaks access to MCC. Also it still does not sync with both Zeus players. Why not simply stick to what the original script does instead of changing it to "allMissionObjects"?? add_to_curator = TRUE; while {add_to_curator} do { _units = vehicles; { if (!_addCivilians && {(side _x) == civilian}) then { _units pushBack _x; }; } count allUnits; { _x addCuratorEditableObjects [ _units, TRUE]; } count allCurators; sleep 10; }; This does exactly what the original does, but for every Zeus. This script sadly does not seem to work at all. :( Edited December 4, 2014 by silentwisher Share this post Link to post Share on other sites
Tajin 349 Posted December 5, 2014 Post the whole script (where/how you inserted it). Also consider enabling "-showScriptErrors", to hunt down syntax errors. Oh and next time, mention mcc. I don't know about its current version, but that can very well mess up zeus-assignment. Oh and in theory you could also simply run Belbos script once for each curator module. Shouldn't be hard to do really. Also, in case you didn't know: If you want multiple simultaneous zeus-players, you have to place down multiple modules (or spawn them). Share this post Link to post Share on other sites
silentwisher 8 Posted December 5, 2014 Post the whole script (where/how you inserted it). Also consider enabling "-showScriptErrors", to hunt down syntax errors.Oh and next time, mention mcc. I don't know about its current version, but that can very well mess up zeus-assignment. Oh and in theory you could also simply run Belbos script once for each curator module. Shouldn't be hard to do really. Also, in case you didn't know: If you want multiple simultaneous zeus-players, you have to place down multiple modules (or spawn them). I attached a screen shot in the original post showing the multiple entities. The script looks like this[ADV_zeus.sqf]: /* ADV_zeus script by Belbo Makes most units placed in the editor and playable units editable by Zeus. Call from init.sqf via: if (isServer) then {[CURATORMODULENAME,true] execVM "ADV_zeus.sqf";}; */ _curator = _this select 0; _addCivilians = _this select 1; //adds objects placed in editor: _curator addCuratorEditableObjects [vehicles,true]; _curator addCuratorEditableObjects [(allMissionObjects "Man"),false]; _curator addCuratorEditableObjects [(allMissionObjects "Air"),true]; _curator addCuratorEditableObjects [(allMissionObjects "Ammo"),false]; //makes all units continuously available to Zeus (for respawning players and AI that's being spawned by a script.) while {true} do { _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true}; { if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]}; } forEach allUnits; _curator addCuratorEditableObjects [vehicles, true]; sleep 10; }; if (true) exitWith {}; Share this post Link to post Share on other sites
shay_gman 272 Posted December 7, 2014 Hi SilentWisher, MCC got a custom Zeus so if you want to sync all available units to the MCC's Zeus you shuld replace the _curator in you script by MCC_curator which is the name of the MCC Zeus module. Share this post Link to post Share on other sites
silentwisher 8 Posted December 8, 2014 (edited) Hi SilentWisher,MCC got a custom Zeus so if you want to sync all available units to the MCC's Zeus you shuld replace the _curator in you script by MCC_curator which is the name of the MCC Zeus module. Alright thank you sir. :) What would you recommend if you want multiple Zeus/mcc users? Edited December 8, 2014 by silentwisher Share this post Link to post Share on other sites