.eye4dir
Turns eye 4 relative to its factory position (10 degrees to the left): positive toward the left, negative toward the right; 1256 is a full turn.
Facts
- Address
- 524
- Name
.eye4dir- Kind
- Command: the bot writes it and the engine reads it and usually consumes it
- Group
- Eyes
- Written by
- Your DNA.
- Read by
- The engine, in the actions phase of every cycle, when it fills
.eye4. - Cleared
- Never: it stays as you left it.
- Range
- −32000 to 32000; only the remainder of dividing by 1256 counts, which is one full turn.
- Mutations
- picked as a store target
Shifts the direction of .eye4, which in the factory configuration looks 10 degrees to the left of .aim. It is measured in the same units as .aim: a full turn is 1256, a half turn 628 and 10 degrees about 35. Positive values move the eye to the left and negative ones to the right. The eye stays attached to the bot: if the bot turns, the eye turns with it.
It is configuration: the engine reads it every cycle but never clears it, so writing it once is enough. Only the remainder of dividing by 1256 counts, with its sign: 1256 is equivalent to 0 and 1300 to 44. The change shows in what the eye sees from the next cycle on.
The bot All Eyes by Spike43884 (in the Bestiary) opens all nine eyes in a fan to see almost everything around it; it sets this eye to 80, so it ends up looking about 33 degrees to the left:
cond
*.robage 0 =
start
80 .eye4dir store
stopTo change how much the eye covers, use .eye4width. The other eyes and how they are laid out are covered in Eyes.