DarwinBotsManual
Open the app EspañolES

.tin4

Tie input channel number 4: the value that the bot at the other end of the tie you're reading publishes in its .tout4.

Facts

Address
423
Name
.tin4
Kind
Sense: the engine writes it for the DNA to read
Group
Inputs and outputs
Written by
The engine, in the forces and collisions phase: copies the .tout4 of the bot at the other end of the tie you read. You read it in the next cycle.
Cleared
The engine, when you run out of ties or do not have the tie that .readtie asks for.
Range
−32000 to 32000
Mutations
picked as a read (*)

It works like .tin1: it brings in whatever the bot at the other end of the tie you're reading (the one you choose with .readtie or, if you didn't choose, the most recently created one) has written in its .tout4. It arrives one cycle late, and the engine reloads it every cycle for as long as the tie exists; it goes back to 0 when you run out of ties. All the .tin channels come from the same tie in the same cycle.

If your partner publishes in .tout4 the horizontal position of what it has in front of it, you read it like this:

' I store in 54 the x of what my partner sees
cond
*.tin4 0 !=
start
*.tin4 54 store
stop

See Inputs and outputs.