I think I figured it out. The version I used as a base has the following piece of code at the bottom of the towns.sqf, that I assumed was part of vanilla wasteland, but I see it's not there in the stock one. He was using ellipse markers for towns, and has this code put in to make the size of the map markers match the size of the ellipse markers used, which I think then overrides the radius for each town in the array, which was just set to -1 (which I then followed in my changes). Most of my towns are rectangle markers however, so the size was unaffected and just remained at -1. Strange that one of the towns it was happening in was an ellipse though... I changed all the town sizes to 300 to test and it seems to have fixed the problem.
//copyToClipboard str ((allMapMarkers select {_x select [0,5] == "Town_"}) apply {[_x, -1, markerText _x]})
private "_size";
{
_x params ["_marker"];
if (markerShape _marker == "ELLIPSE") then
{
_size = markerSize _marker;
_x set [1, (_size select 0) min (_size select 1)];
};
} forEach _towns;
_towns
I would like to keep the concept he was going with, how would I modify this to apply the 2nd variable for a a rectangle size? Would it just simply be changing the above to;
private "_size";
{
_x params ["_marker"];
if (markerShape _marker == "ELLIPSE") then
{
_size = markerSize _marker;
_x set [1, (_size select 0) min (_size select 1)];
};
if (markerShape _marker == "RECTANGLE") then
{
_size = markerSize _marker;
_x set [1, (_size select 0) min (_size select 1)];
};
} forEach _towns;
_towns
And then adding this to createTownMarkers;
if (markerShape _marker != "RECTANGLE") then
{
_marker setMarkerShape "RECTANGLE";
_marker setMarkerSize [_x select 1, _x select 0];
};
If I can't get that to work, then worst case I'll just set the alpha to 0 so the circles don't show on the map (my towns/territories are the same, so the areas will still show up), and use the 'proper' method with icons and a set radius.
EDIT: I got it working. No more constant spawning of vehicles into the same spot, and the rectangle town markers on the map show correctly. I do have 4 ellipse town markers placed, that show up as rectangle on the map as well (while the capture territory is a circle). Sizes are correct though. Here's the working code, I thought maybe I needed to use "else" instead of "if" for the rectangle part in towns.sqf above, but that just breaks everything.
private ["_pos", "_marker"];
{
_x params ["_marker", "_size"];
_pos = markerPos _marker;
if (markerType _marker == "Empty") then
{
_marker = createMarker [format ["TownCircle%1", _forEachIndex + 1], _pos];
};
if (markerShape _marker != "ELLIPSE") then
{
_marker setMarkerShape "ELLIPSE";
_marker setMarkerSize [_x select 1, _x select 0];
};
if (markerShape _marker != "RECTANGLE") then
{
_marker setMarkerShape "RECTANGLE";
_marker setMarkerSize [_x select 1, _x select 0];
};
_marker setMarkerColor "ColorBlue";
_marker setMarkerBrush "SolidBorder";
_marker setMarkerAlpha .5;
} forEach (call cityList);