.tienum
Picks, by its tie port, which tie this cycle's orders act on (.tieloc, .fixang, .fixlen, .stifftie); 0 uses the .tiepres one.
Facts
- Address
- 455
- Name
.tienum- Kind
- Command: the bot writes it and the engine reads it and usually consumes it
- Group
- Ties
- Written by
- Your DNA.
- Read by
- The engine, in the same cycle: picks by its port the tie used by
.tieloc,.fixang,.fixlenand.stifftie. With 0 it uses that of.tiepres, except for writing to the other bot with a positive.tieloc. - Cleared
- The engine, every cycle, in the movement phase. If you have no ties, it stays written.
- Range
- −32000 to 32000; 0 is “the one in
.tiepres” - Mutations
- picked as a store target
If you have several ties, write here the tie port of the one you want to use: the one you set in .tie if you created it, or its order number if you were tied. It is used by .tieloc and .tieval, .fixang, .fixlen and .stifftie. With 0 the .tiepres tie is used, except in one case: to write to the other bot's memory (.tieloc positive) you need a .tienum other than 0.
The engine sets it back to 0 every cycle after using it, so you have to write it in the same cycle as the order. If the bot has no ties at all, the value stays written.
What it does not pick is which tie .tieang and .tielen measure: when the engine computes them, .tienum is already 0, so they always describe the .tiepres one. To measure several ties there are .tieang1….tieang4 and .tielen1….tielen4.
' pass 100 energy through tie 7
start
7 .tienum store
-1 .tieloc store
100 .tieval store
stop