Set Marker
One instruction for every property of every marker: whatever this kind understands is what changes
setmarker color 1 %ff5555 0 0setmarker radius 1 20 0 0setmarker rotation 1 @time 0 0Marker number one turns red, grows and slowly rotates: the last line runs every iteration, and the rotation follows the time.
| Field | What is in it |
|---|---|
| first | what to change: a property from the list |
| second | the marker’s id |
| the other three | values — as many as that property needs |
There are many properties, and each kind has its own
Section titled “There are many properties, and each kind has its own”The list is shared across all kinds of marker — two dozen properties and more:
| Property | What it does |
|---|---|
pos, endPos |
move the marker; for a line, its other end |
color, radius, stroke |
colour, size, line thickness |
shape |
the number of sides of a polygon |
rotation, arc |
rotation and arc |
text, flushText, fontSize |
the text and its size |
textAlign, lineAlign, labelFlags |
alignment, backing and outline of a caption |
texture, textureSize |
a picture and its size |
world, minimap, autoscale |
where the marker is visible and whether it grows on zoom |
drawLayer |
the order: what goes over what |
remove |
delete the marker entirely |
Colour and text
Section titled “Colour and text”Colour is written two ways: as the literal %ff5555 straight into the field, or as a packed
number from packcolor. The second is for when the colour
is computed — green shading into red as the stock runs down, for instance.
Text is not given as a value — it is handed over from the print buffer:
print "Build here"setmarker flushText 2 0 0 0The same trick as printflush and message: the text is assembled, handed over, and the
buffer is cleared. Hence the convenience — numbers and variables can be printed into a marker,
not just a string.
Where a marker is visible
Section titled “Where a marker is visible”| Property | What it means |
|---|---|
world |
draw on the map (yes by default) |
minimap |
draw on the minimap |
autoscale |
shrink when zoomed out, so as not to cover the map |
A marker can be taken off the map entirely and left on the minimap only — that is how danger zones are marked when they should not get in the way of looking at the base.
Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.