.tielen1
Length of a multicellular bot's first tie, edge to edge; writing it sets that tie's natural length.
Facts
- Address
- 484
- Name
.tielen1- Kind
- Input and output: both the bot and the engine write it
- Group
- Ties
- Written by
- Your DNA and the engine. Writing it with
store(or another two-operand store) sets the natural length of the first tie, signed, in the movement phase; after that the engine writes the measured length, which you read in the next cycle. - Cleared
- The engine rewrites it every cycle, only if you are multicellular, the first tie is stiffened and
.tienumor.tiepresis not 0. - Range
- from about −240 (overlapping bots) up to 32000
- Mutations
- picked as a read (
*) and as a store target
It is a read-write cell for the bot's first tie (the oldest one it has left; if one breaks, the following ones shift up a slot), and it only works if the bot is multicellular (.multi) and that tie is stiffened.
Reading. Every cycle the engine publishes the distance to the partner minus the two radii. It is measured before the bots are moved, so it can differ a little from .tielen.
Writing. A value written with store (or with another two-operand store) becomes the natural length of the tie, edge to edge, for both ends, just like .fixlen but without picking the tie with .tienum. Unlike .fixlen, here the sign counts: a negative asks the bots to overlap. Afterwards the engine writes the measurement back into the cell. With inc or dec the tie doesn't find out (see Writing to memory).
If the bot isn't multicellular or the first tie isn't stiffened, the engine doesn't touch the cell. It doesn't touch it either if .tienum and .tiepres are both 0.
' keep the first tie at 150
cond
*.multi 1 =
start
150 .tielen1 store
stopWith a child tied to its parent, once the tie is stiffened the distance goes from almost 0 to about 150: it overshoots at first and then ends up oscillating between about 115 and 175. The angle of the same tie is .tieang1.