Doctor
The physician's body. It hangs on the `doctor` entity the scene reserves for the player, and it is the only thing in Nine Bells that reads a control.
Doctor
The physician's body. It hangs on the doctor entity the scene reserves for the
player, and it is the only thing in Nine Bells that reads a control.
Every frame it turns the live control scheme into one table of intent, hands
that to the traverse slice's simulation, and writes the answer onto its own
entity. Nothing about how he moves lives here — that is game.traverse — which
is what lets the whole of the doctor's movement be driven from a test with a
made-up frame of input and no game running at all.
Fields
inputMap | the control scheme this body answers to |
controlled | clear it and he still falls, lands and stands, but takes no orders — what a cutscene wants |
anim | read-out: what he is doing |
speedX | read-out: how fast he is going along the street |
inputX | read-out: the control reading he is acting on |
ticks | read-out: frames simulated since he last woke |
Other slices reaching a control
game.traverse.physician is the game's one scheme, and it is activated here and
nowhere else. Anything else that needs a control asks for it rather than
standing up a second map:
local stop = NB.ext.onControl("treat", "pressed", function() ... end)
kind is "pressed", "released" or "input", and the returned function
unsubscribes.
Scoped to this part · feeds back into the world's score.