▣
module · drop-in viewer
flight
The `flight` slice's wiring. It puts the `Scrapper` suit on the player's body, by both of the doors a slice has into a scene it does not own:
by·posted 2mo ago
What it does
flight
The flight slice's wiring. It puts the Scrapper suit on the player's
body, by both of the doors a slice has into a scene it does not own:
attachbakesScrapperonto the PlayerPrototype's body the next time the scene builds, so every joining player is cloned with a working suit.onSceneReadyinstalls the same component on the body this client is already driving, so a session that is mid-play when the slice lands gets thrusters without a scene rebuild.
Both paths check first, so a body never ends up with two suits fighting over one velocity.
What this slice offers the rest of the game is documented on the component
itself — see game/Scrapper.component. The short version, for hazard:
entity(bodyId).component.get("Scrapper"):applyImpulse(dx, dy, dz)
Nothing outside this slice writes the player's position or velocity.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.