dukee02 / Arma3_CTI

3 stars 1 forks source link

Option to active/disable base defenses #17

Open dukee02 opened 1 year ago

dukee02 commented 1 year ago

We get a wish from the WW2 player to get an option to setup auto-defended FOBs. Maybe we can extend the behavior of base defenses to the FOB range. To get a solution to manage the statics, because we have a max amout a server can handle (param BASE: Auto Manned Defenses). IF we add an option to enable/disable the base areas where active defenses gets handled, the side have mor tactical spaces.

dukee02 commented 1 week ago

We can use the areas for that, and add a isActive variable we can enable/disable _areas = _logic getVariable "cti_structures_areas";

To track the base area better we have to change the area set behavior in folowing files ... maybe more Server\Functions\Server_HandleStructureConstruction.sqf Server\Functions\Server_OnBuildingDestroyed.sqf

maybe add a marker to the map? code: _logic = (west) call CTI_CO_FNC_GetSideLogic; _areas = _logic getVariable ["cti_structures_areas", []]; _coloration = (west) call CTI_CO_FNC_GetSideColoration; { deleteMarkerLocal format ["cti_areaMarker%1", _forEachIndex]; deleteMarkerLocal format ["cti_areanameMarker%1", _forEachIndex]; } forEach (_areas select 0);

{
_marker = createMarkerLocal [format ["cti_areaMarker%1", _forEachIndex], (_areas select 0)]; _marker setMarkerShapeLocal "ELLIPSE"; _marker setMarkerBrushLocal "SolidBorder"; _marker setMarkerSizeLocal [CTI_MARKERS_TOWN_AREA_RANGE, CTI_MARKERS_TOWN_AREA_RANGE]; _marker setMarkerColorLocal _coloration; _marker setMarkerAlphaLocal CTI_MARKERS_OPACITY;

_Marker2_id = format ["cti_areaname_Marker_%1",_forEachIndex];
_Marker2 = createMarker [_Marker2_id,(_areas select 0)];        
_Marker2 setMarkerShape "ICON";  
_Marker2 setMarkerType "mil_dot_noShadow"; 
_Marker2 setMarkerColor "ColorBlack"; 
_Marker2 setMarkerText format ["BASE No. %1",_forEachIndex];    
_Marker2 setMarkerSize [1,1];

} forEach (_areas select 0);