Jump to content
sakej99

Zeus Sector Control Help

Recommended Posts

How do I make a sector be connected to an editing area? I want to make it so if Blufor or Opfor take the sector their zeus can edit that area. Any ideas?

Share this post


Link to post
Share on other sites

Have not done much with zeus but believe it would be something like...

if !( isServer ) exitWith {};

{
	//Only allowed to edit in defined areas
	_x setCuratorEditingAreaType true;
	//Give each zeus a starting area around the modules position(or some default area)
	_x addCuratorEditingArea[ 0, getPosATL _x, 5 ];
}forEach [ zeusOpfor, zeusBlufor ]; //names given to curator modules

//Add scripted event for when the sector S1 changes ownership
[ S1, "ownerChanged", {
	params[ "_sector", "_owner" ];
	
	//If the sector has an owner ( Event is triggered at mission start, if the sector has no default owner then it will be sideUnknown )
	if !( _owner isEqualTo sideUnknown ) then {
		//Get first area ( sector can have multiple areas ) 
		_trigger = _sector getVariable "areas" select 0;
		//Get triggers dimensions
		triggerArea _trigger params[ "_radiusX", "_radiusY" ];
		//Find largest
		_radius = _radiusX max _radiusY;
		
		//Get sides zeus ( where zeusOpfor and zeusBlufor are the names given to curator modules ) 
		_sideZeus = [ zeusOpfor, zeusBlufor ] select ( _owner call BIS_fnc_sideID );
		
		//Add editing Area
		_sideZeus addCuratorEditingArea[ count curatorEditingArea _sideZeus, getPosATL _sector, _radius ];
	};
} ] call BIS_fnc_addScriptedEventHandler;

 

  • Like 1

Share this post


Link to post
Share on other sites
On 6/6/2018 at 3:13 AM, Larrow said:

Have not done much with zeus but believe it would be something like..

 

Ok, now this is a really noob question but where does this script go? Does it go in the trigger, sector control module or somewhere else?

 

Thanks for the help

Share this post


Link to post
Share on other sites

Just in the initServer.sqf should be fine as the curator commands need to be executed on the server.

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

×