.backshot
With a value other than 0, the next shot goes out backward instead of forward.
Facts
- Address
- 900
- Name
.backshot- Kind
- Command: the bot writes it and the engine reads it and usually consumes it
- Group
- Shots
- Written by
- Your DNA.
- Read by
- The engine, in the actions phase, when a shot of yours goes out: if it is not 0, the shot goes out backward. If you also set
.aimshoot, that one wins. - Cleared
- The engine, when a shot of yours goes out, even a virus (
.mkvirus) or an automatic waste discharge. If you don't shoot, it stays set. - Range
- −32000 to 32000; only whether it is 0 or not matters.
- Mutations
- picked as a store target
If .backshot is anything other than 0 when a shot goes out, the shot comes out of your back, in the direction opposite to .aim, instead of the front. It's useful for fleeing while shooting, or for defending your rear without having to turn.
' something is following me: I run and shoot backward
cond
*.shdn 0 !=
start
30 .up store
1 .backshot store
-1 .shoot store
stopA few details:
- It is consumed by the shot: the engine sets it back to 0 when a shot goes out. If you write it and don't shoot, it stays set until the next shot.
- If you also wrote
.aimshoot,.aimshootwins, since it offsets the shot from your front;.backshotis cleared anyway, with no effect. - The shot still goes out with the usual small random deviation (see
.shoot).
In testing, a bot that saw its target straight ahead and shot with .backshot never hit it.