Jump to content
Sign in to follow this  
Nathan423

Syncing units with other zueses

Recommended Posts

I have two zueses that are in the same group. How would I allow one zeus to edit the other zeus's unit. I found the event handler for CuratorObjectPlaced but what command would I put in to allow all zeuses to edit the unit placed.?

Share this post


Link to post
Share on other sites

if (isServer) then {
{
this addCuratorEditableObjects [curatorEditableObjects _x,true];
_x addEventHandler ['CuratorObjectPlaced',{this addCuratorEditableObjects [(_this select 1),true];}];
} forEach allCurators - [this];
};

If put in the init of the module (not the controlling unit) of a curator this should add all units of the other curators to the module's list and add an eventhandler to all other curators to automatically add all created units in the future.

Note: Wrote from memory, so might have a typo or two but you should get the idea.

Share this post


Link to post
Share on other sites
Nathan423 said:
I have two zueses that are in the same group. How would I allow one zeus to edit the other zeus's unit. I found the event handler for CuratorObjectPlaced but what command would I put in to allow all zeuses to edit the unit placed.?
while {true} do {

sleep 60;

{zCurator addCuratorEditableObjects [[_x],true]} foreach vehicles;

{ 
   if (side _x == west) then 
   { 
   zCurator addCuratorEditableObjects [[_x],true];
   }; 

   if (side _x == east) then 
   { 
   zCurator addCuratorEditableObjects [[_x],true];
   }; 

   if (side _x == independent) then 
   { 
   zCurator addCuratorEditableObjects [[_x],true];
   };

   }foreach allUnits;

};


 

Maybe that helps you, it was original writte to add units to Zeus which where added by script.

 

Edit: The script above is outdated. With version 2.02 there will be

allUnits <side>

which is way faster!

  • Thanks 1

Share this post


Link to post
Share on other sites

R3vo thanks for help I appreciate your effort!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×