Jump to content
Sign in to follow this  
groshnak

Sector Control module created marker names?

Recommended Posts

Hey!

Could someone tell me how they are named? I need to hide some of them because they clutter the map so much when placed over towns.

Thank you!

Share this post


Link to post
Share on other sites
Hey!

Could someone tell me how they are named? I need to hide some of them because they clutter the map so much when placed over towns.

Thank you!

Nobody?

Don't think there is even a command for it, getmarkername or such :/

Share this post


Link to post
Share on other sites
Nobody?

Don't think there is even a command for it, getmarkername or such :/

To answer myself, the command to find them is hint format ["Nearest is %1", allmapmarkers] and they are named as follows:

"BIS_fnc_modulesector_area1835: <no shape>" <- This is the area marker, numbers seem random with little logic (so good luck with this...) the <no shape> is part of the marker name. Mind the space there.

"bis_fnc_modulesector_icontextSECTORNAME" <- Text after the sector icon (where sectorname is the name of your sector module)

"bis_fnc_modulesector_iconSECTORNAME" <- The big icon (where sectorname is the name of your sector module)

Someone could add this to some wiki :rolleyes:

Now could someone tell me how to do things with the sector control module HUD icons? I need to show/hide them depending on distance.

Edited by Groshnak

Share this post


Link to post
Share on other sites

The Marker for a sectors area are held in a variable called "marker" on the trigger, it is an array of [area marker, icon marker]. The trigger is held in a variable on the sector called "areas".

For example lets say you have named your sector S1 when you placed it in the editor and you have only set it up with one capture area (trigger).

//Get areas from sector
_areas = S1 getVariable "areas";
//Get a reference to the trigger of this area
_trigger = _areas select 0;
//Get the marker for this trigger
_trigMarker = (_trigger getVariable "markers") select 0;
//Hide the marker
_trigMarker setMarkerAlpha 0;

A list of all sector modules is kept in global variable called "BIS_fnc_moduleSector_sectors" so if you wanted to hide all area markers you could do something like

{
_sector = _x;
{
	_trigger = _x;
	_markerArea = (_trigger getVariable "markers") select 0;
	_markerArea setMarkerAlpha 0;
}forEach (_sector getVariable "areas");
}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");

Now could someone tell me how to do things with the sector control module HUD icons? I need to show/hide them depending on distance.

The HUD icons seem to be updated dependent on the "BIS_fnc_moduleSector_sectors" variable. Removing them from this removes them from the display. Will need to be put through some testing to make sure it does not mess anything else up but....

h = [] spawn {
while {true} do {
	_toHide = [];
	{
		_sector = _x;
		if (player distance _sector > 10) then {
			_toHide set [count _toHide, _sector];
			_h = _sector spawn {
				waitUntil {player distance _this < 10};
				missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
			};
		};
	}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
	missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
};
};

Quickly tested in the editor from the debug console makes them disappear when you are greater than 10m and brings them back when you get in range again.

  • Like 2

Share this post


Link to post
Share on other sites
The Marker for a sectors area are held in a variable called "marker" on the trigger, it is an array of [area marker, icon marker]. The trigger is held in a variable on the sector called "areas".

For example lets say you have named your sector S1 when you placed it in the editor and you have only set it up with one capture area (trigger).

//Get areas from sector
_areas = S1 getVariable "areas";
//Get a reference to the trigger of this area
_trigger = _areas select 0;
//Get the marker for this trigger
_trigMarker = (_trigger getVariable "markers") select 0;
//Hide the marker
_trigMarker setMarkerAlpha 0;

A list of all sector modules is kept in global variable called "BIS_fnc_moduleSector_sectors" so if you wanted to hide all area markers you could do something like

{
_sector = _x;
{
	_trigger = _x;
	_markerArea = (_trigger getVariable "markers") select 0;
	_markerArea setMarkerAlpha 0;
}forEach (_sector getVariable "areas");
}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");

The HUD icons seem to be updated dependent on the "BIS_fnc_moduleSector_sectors" variable. Removing them from this removes them from the display. Will need to be put through some testing to make sure it does not mess anything else up but....

h = [] spawn {
while {true} do {
	_toHide = [];
	{
		_sector = _x;
		if (player distance _sector > 10) then {
			_toHide set [count _toHide, _sector];
			_h = _sector spawn {
				waitUntil {player distance _this < 10};
				missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
			};
		};
	}forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
	missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
};
};

Quickly tested in the editor from the debug console makes them disappear when you are greater than 10m and brings them back when you get in range again.

Thanks a million!

How could i make it show/hide the task with the HUD icons, so when you get close to a sector it will give you a task and show the hud marker? I could run this from init.sqf for each player with something simple like 'execvm "sectorcheck.sqf"' and then it would run on every client?

Share this post


Link to post
Share on other sites

Hi there @Larrow,

 

could you explain how to manipulate the "Sector Control"-module's created HUD at the top-right area of the screen, which displays the module's "Designation"-field's input (a single letter), please?

 

_designation = sectorVarName getVariable "designation";

 

I would like to change the letter via script (initServer.sqf), but it seems to be too advanced for my knowledge. I tried to get infos from the module's function and looked through the config viewer, but can't even say for sure, if I focused on the right stuff there.

 

Thanks a lot!

 

EDIT:

 

It seems to work with the following code:

Is it the right way to do, tho? :D

 

sectorVarName setVariable ["Designation","X"] ;
[sectorVarName,"BIS_fnc_moduleSector_sector"] call Bis_fnc_objectVar;

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  

×