.fixed
It is 1 if the bot is anchored in place and 0 if it can move.
Facts
- Address
- 215
- Name
.fixed- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Movement
- Written by
- The engine, in the actions phase of every cycle: 1 if the bot ended up anchored, 0 if not. You read it in the next cycle.
- Cleared
- Nobody; the engine rewrites it every cycle. Writing to it neither anchors nor releases.
- Range
- 0 or 1.
- Mutations
- picked as a read (
*)
.fixed is the report of .fixpos: 1 if the bot is anchored and 0 if it is free. The engine publishes it at the end of every cycle, so writing to it neither anchors nor frees anything; for that you have to write to .fixpos.
The difference between the two matters. .fixpos is the command and keeps the number you gave it; .fixed says whether the bot actually ended up anchored. If the simulation has anchoring disabled, .fixpos can be 1 and .fixed still 0. Also, .fixed is updated at the end of the cycle: in the cycle in which you write to .fixpos you still read the previous state.
A typical use is to avoid repeated writes, as Anon Terifica daynight, from the Bestiary, does: it anchors itself at night and releases itself by day:
cond
*.daytime 1 =
*.fixed 1 =
start
0 .fixpos store
stop
cond
*.daytime 0 =
*.fixed 0 =
start
1 .fixpos store
stop