DarwinBotsManual
Open the app EspañolES

.tiepres

The tie port of the last tie that formed (created by you or by another bot toward you): the tie the orders use when .tienum is 0.

Facts

Address
454
Name
.tiepres
Kind
Sense: the engine writes it for the DNA to read
Group
Ties
Written by
The engine, when a tie of yours forms: the number you put in .tie, or its sequence number if you were tied. If that tie breaks, it moves to the previous one in your list.
Cleared
The engine, when the tie it pointed to breaks and there is no previous one in your list. If you write it yourself, your value stays.
Range
−32000 to 32000 (the port); 0 is “no tie chosen”
Mutations
picked as a read (*)

The engine writes it every time a tie you take part in forms. If you created it with .tie, it is the number you put there; if you were tied, it is the order number the tie has among yours (1 if it is the first). When the tie it pointed to is deleted, it moves to the previous tie in your list (the one that formed earlier); if the deleted one was the oldest, it ends up at 0 even if you have others left.

It is the “default” tie: .tieang and .tielen always describe this one, and the orders that depend on .tienum use it when .tienum is 0.

Two oddities:

' always talk to the last one that tied me or that I tied
cond
*.tiepres 0 !=
start
*.tiepres .tienum store
60 .tieloc store
*.nrg .tieval store
stop

This example writes your energy to cell 60 of the other bot. You need to copy .tiepres into .tienum because writing to the other bot's memory requires a .tienum other than 0 (see .tieloc).