.trefaim
Where the tied bot is pointing: a copy of its .aim.
Facts
- Address
- 479
- Name
.trefaim- Kind
- Sense: the engine writes it for the DNA to read
- Group
- What it feels through a tie (tref*)
- Written by
- The engine, in the forces and collisions phase: it copies the
.aimpublished by the tied bot. You read it in the next cycle, one cycle behind what the other reads of itself. - Cleared
- The engine, when you run out of ties or don't have the tie that
.readtieasks for. - Range
- 0 to 1255; it can overshoot a little if the other turns for other reasons
- Mutations
- picked as a read (
*)
It is the .aim of the tied bot: its absolute orientation, from 0 to 1255 (a full turn is 1256). Like the position, it runs one cycle behind what the partner reads about itself. With .setaim you can copy it to point the same way it does, which is useful for getting a tied group to move in the same direction.
In this example only the child copies its parent's heading (the tied bot older than it is, as in .trefage):
' Points where the tied bot points, if it is my parent
cond
*.numties 0 >
*.trefage *.robage >
start
*.trefaim .setaim store
stopWhen the parent changes heading, the child's .aim catches up two cycles later: one because .trefaim arrives late and another because the turn from .setaim only shows up in .aim the following cycle.
For the angle of the tie itself, use .tieang.