◇
component · drop-in viewer
CrabScuttle
Makes a small crab wander sideways around its home stone in a tidepool. When a player comes close it runs back and hides under the stone, then peeks out and resumes wandering once things are quiet. Attach it to an entity with a Transform.
by·posted 1mo ago
What it does
CrabScuttle
Makes a small crab wander sideways around its home stone in a tidepool. When a player comes close it runs back and hides under the stone, then peeks out and resumes wandering once things are quiet. Attach it to an entity with a Transform.
Public fields
homeRadius: number— how far from its home stone the crab wanders, in metres.fleeDistance: number— how close a player gets before the crab hides, in metres.hideSeconds: number— how long it stays hidden after the player leaves.
Lifecycle
update(dt)— wanders sideways, or runs home and hides when a player is near.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.