.tieang
Where the .tiepres tie lies as seen from the bot: 0 if it points right at the partner, signed according to the side.
Facts
- Address
- 450
- Name
.tieang- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Ties
- Written by
- The engine, in the actions phase: the angle to the partner of the
.tieprestie, or 0 if there is none. You read it in the next cycle. - Cleared
- The engine recalculates it every cycle; writing to it changes nothing.
- Range
- −628 to 628 (half a turn each way)
- Mutations
- picked as a read (
*)
It is the angle between the way the bot points (.aim) and the direction of the tied bot, on the scale of 1256 per full turn: 0 means you have it right in front, and the value goes from −628 to 628 depending on which side and how far you would have to turn. The engine publishes it at the end of every cycle, so you read it one cycle late. It is 0 if there is no tie.
It always measures the .tiepres tie, even if you write another one in .tienum (see that page). That is why the parent, which sees the birth tie with tie port 0, reads 0 here until it has another tie.
The sign is designed for turning: writing the value to .aimdx leaves the bot facing the partner.
' turn toward the tied bot
cond
*.numties 0 >
start
*.tieang .aimdx store
stopIts counterpart is .tielen. For the first four ties of a multicellular bot there are .tieang1….tieang4, which use another scale (from 0 to 1256).