Thalassicus
Bytes and Nibblers
How do I properly use SerialEventHexHighlight? I tried this:
In theory this should give each plot a red intensity corresponding to its plot ID. However, what actually happens is all the plots are black except the last one, which is red. I've seen it use decimal values, such as:
workerSuggestHighlightColor = Vector4( 0.0, 0.5, 1.0, 0.65 );
PHP:
local maxID = Map.GetNumPlots() - 1
for plotID = 0, maxID, 1 do
local plot = Map.GetPlotByIndex(plotID)
local hex = ToHexFromGrid(Vector2(plot:GetX(), plot:GetY()))
local color = Color(plotID / maxID, 0.0, 0.0, 1.0)
Events.SerialEventHexHighlight(hex, true, color);
end
workerSuggestHighlightColor = Vector4( 0.0, 0.5, 1.0, 0.65 );