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

Warrior

What the local player's body does as a warrior in Slime Arena: the walk speed on its CharacterController, the Shift dash, the left-mouse greatsword swing through `game.combat.attack`, being beaten and coming back on its spawn mark after Rules.RESPAWN_DELAY with Rules.INVULN_TIME…

by◐15220200202·posted 17d ago
What it does

Warrior

What the local player's body does as a warrior in Slime Arena: the walk speed on its CharacterController, the Shift dash, the left-mouse greatsword swing through game.combat.attack, being beaten and coming back on its spawn mark after Rules.RESPAWN_DELAY with Rules.INVULN_TIME of blinking invulnerability, and the blue/white/orange armour and greatsword it wears.

It needs, on the same entity: the engine's Humanoid and CharacterController (the humanoid avatar brings both) and a Vitals component. It reads the game.player.warrior input map for its two combat controls and places its armour on the humanoid's bones through game.player.dress. It is attached by game.player.bootstrap when play starts, and it only writes on the peer that owns the body.

Interface

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

conforms to

zero/source-extract/v2

nonstrict

body( ) → void

controller( ) → any

myVitals( ) → any

setPlatesVisible(v: boolean) → void

argtypedescription
vboolean

startDash( ) → void

swing( ) → void

Warrior_respawn( ) → void

Put the body back on its mark, whole and briefly untouchable.

awake( ) → void

start( ) → void

update(dt: number) → void

argtypedescription
dtnumber

onDestroy( ) → void

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.

24+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
◇
component · born here
❒asset
# 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 | Field | Meaning | |---|---| | `zone` | which of `Rules.SLIME_ZONES` (1-based) it was born at — the spawner's bookkeeping | | `squash` | the 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.
▲ 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/player/Warrior.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.