Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld a8eb6562-1…

Slime

One slime: its faceted lime body, its hop, its chase, its touch and its death.

by◐15220200202·posted 17d ago
What it does

Slime

One slime: its faceted lime body, its hop, its chase, its touch and its death.

Attach to a synced root entity together with Vitals ({ maxHp = Rules.SLIME_MAX_HP, hp = Rules.SLIME_MAX_HP }, player = false). game/slimes/spawner.luau does that for every slime the arena has; nothing needs to place one by hand.

What it does

  • Builds the body under the root on every peer — dome, skirt, deeper core, dot eyes and smile — from game/slimes/body.luau and the meshes in game/slimes/domeMesh.luau. Only the root replicates, so the look is free.
  • On the peer that owns the root: hops (SLIME_HOP_PERIOD, SLIME_HOP_HEIGHT) with a squash-and-stretch cycle, seeks the nearest living player within SLIME_CHASE_RANGE at SLIME_SPEED, and touches for SLIME_DAMAGE no more often than SLIME_TOUCH_COOLDOWN, through game.combat.vitals.
  • On every peer: flashes white when hurt, and on death plays the splat and the slime_die cue. The owner despawns the root.

Health, damage, death, the 10 XP a kill pays and everything about leveling are game.combat.vitals' business. This component only listens.

Fields

FieldMeaning
zonewhich of Rules.SLIME_ZONES (1-based) it was born at — the spawner's bookkeeping
squashthe vertical squash the owner is playing, so other peers draw the same hop

Notes

  • Slimes.all() / onSpawn / onDespawn (game/slimes/registry.luau) is how other slices find slimes; this registers on awake and unregisters on onDestroy and on death.
  • Its awake calls require("game.slimes.spawner").ensure(), so a slime that exists at all keeps the zones filling.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Slime — one slime: its body, its hop, its chase, its touch and its death. Attached to a synced slime root by `game/slimes/spawner.luau`. The root holds the state everyone agrees on (where it is, its zone); the visible body is built separately on each peer by this component, so the look costs nothing on the wire. Health, death and the experience a kill pays belong to `game/combat/vitals`, which this only listens to. The owner of the root is the peer that simulates it: only that peer moves it, decides what it chases, rolls its touch cooldown and writes `squash`. Every other peer draws what it is told.

bodyNode( ) → any

childNamed(parent: any, name: string) → any

argtypedescription
parentany
namestring

playerAvatars( ) → void

nearestPlayer(from: any, range: number) → void

The nearest living player body within `range`, or nil.

argtypedescription
fromany
rangenumber

nearLocalPlayer(pos: any, range: number) → boolean

Is the local player close enough to this point to hear something there?

argtypedescription
posany
rangenumber

playHopSound(root: any) → void

argtypedescription
rootany

splat(root: any) → void

argtypedescription
rootany

onDied(...: ?) → void

argtypedescription
...?

flash( ) → void

A white flash across the body, the way a hurt player flashes.

onDamaged(...: ?) → void

argtypedescription
...?

awake( ) → void

onDestroy( ) → void

update(dt: number) → void

argtypedescription
dtnumber

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

19+items
◇
component · born here
❒asset
# Vitals The numbers of one living thing — hp, maxHp, level, xp, xpToNext, attack, invuln and dead — as one synced component, plus the rules that own them. Attach it to anything that can be hurt: a player's body with `{ player = true }`, a slime root with `{ maxHp = Rules.SLIME_MAX_HP, hp = Rules.SLIME_MAX_HP }` and `player` left false. Every read and every change from outside goes through `game.combat.vitals`, which decides whether this peer may write it; the component body only ever runs on the peer that owns the entity, and that is what keeps health correct across four peers. Methods: `applyDamage(amount, attackerId)`, `applyHeal(amount)`, `addXp(amount)` (which resolves every level-up it earns: max HP +20, attack +5, full heal), `die(attackerId)` and `respawn()` (full bar, Rules.INVULN_TIME of invulnerability). It has no sibling components; nothing else is required beside it.
▲ 0↑ born
·
soundclip · born here
❒asset
# hit A greatsword chopping into a body: a wet thud and squelch with a bright metallic ring. Played at the point of contact when a swing lands on a slime or on another player.
▲ 0↑ born
·
soundclip · born here
❒asset
# respawn A gentle swell of soft sparkles rising into place. Played at the moment a beaten player stands back up on their mark, whole and briefly untouchable.
▲ 0↑ born
·
soundclip · born here
❒asset
# swing The warrior greatsword cutting through air: a low dry whoosh with a metallic shimmer on top. Played at the moment a swing starts, so the commitment is heard before the blade lands.
▲ 0↑ born
·
soundclip · born here
❒asset
# hop A small jelly creature springing off packed sand, a soft cartoon boing. Played when a slime hops, rate-limited so a crowded zone does not become a wall of noise.
▲ 0↑ born
·
soundclip · born here
❒asset
# hurt A short cartoon grunt with a muffled impact behind it. Played when the local player takes damage from a slime touch or from another player sword.
▲ 0↑ born
·
soundclip · born here
❒asset
# arenaambience Light wind over dry sand with distant birdsong, no music: the bed the arena sits in. Loops for as long as the play session runs, heard under every other cue.
▲ 0↑ born
·
soundclip · born here
❒asset
# death A descending groan ending in a soft thump: the warrior being knocked out. Played where a player is beaten, as the three-second countdown to their return starts.
▲ 0↑ born
·
soundclip · born here
❒asset
# levelup Four quick rising notes with a sparkle on top: cheerful, clean and short. Played when a player experience fills their level and they gain health, attack and a full bar.
▲ 0↑ born
·
soundclip · born here
❒asset
# slime_die A blob bursting apart: a wet splat with a cartoon pop on the end. Played where a slime dies, as it comes apart into its splat.
▲ 0↑ born
backing path · game/slimes/Slime.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.