DarwinBotsManual
Open the app EspañolES

.aimsx

Turns the bot to the left (counterclockwise) by the amount you write, on a scale where 1256 is a full turn.

Facts

Address
6
Names
.aimsx, .aimleft
Kind
Command: the bot writes it and the engine reads it and usually consumes it
Group
Movement
Written by
Your DNA.
Read by
The engine, in the movement phase of the same cycle. It is ignored if you wrote to .setaim a heading different from the current one.
Cleared
The engine, in the movement phase of the same cycle, after turning.
Range
−32000 to 32000; 1256 is one full turn and a negative value turns right.
Mutations
picked as a store target

.aimsx turns the bot to its left: on the screen, counterclockwise, and .aim goes up. 314 is a quarter turn and 628 a half turn; a bot with .aim 160 that writes 314 .aimsx store ends up at 474. Values over one turn wrap around: 2000 is the same as 744.

It is the twin of .aimdx: the engine turns by .aimsx − .aimdx in the same cycle, clears both and charges energy in proportion to the angle. And the same rule applies: if in that cycle you write to .setaim a heading different from the current one, .setaim wins and the relative turn is discarded.

The typical use is turning a fixed amount when something happens. Anon Terifica 2, from the Bestiary, turns like this every time it touches the edge:

cond
*.edge 0 !=
start
100 .aimsx store
stop

To turn toward a specific heading, instead of calculating the difference, it's easier to use .setaim.