.hitdx
It is 1 in the cycle after a collision on the bot's right side.
Facts
- Address
- 207
- Name
.hitdx- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Collisions and hits
- Written by
- The engine, in the forces and collisions phase: 1 if what it touches is on its right, within the quarter turn centered on that side. You read it in the next cycle.
- Cleared
- The engine, when the senses are cleared, right after your DNA.
- Range
- 0 or 1.
- Mutations
- picked as a read (
*)
.hitdx turns on when the bot collides with something on its right: the center of the other one falls inside a quarter turn centered on the right side (about 45 degrees to each side), looking from its heading (.aim). It is one of the directions of .hit; its opposite is .hitsx and the other two are .hitup and .hitdn.
Like all touch, the engine writes it in the physics step and your DNA reads it in the next cycle, only once.
To look at what touched it on the right, the bot turns a quarter turn to that side with .aimdx:
cond
*.hitdx 0 !=
start
314 .aimdx store
stop