api
The one module scripts talk to: `damage`, `heal`, `kill`, `revive`, `fire` (projectiles), `on` (events on every peer), `get`/`all`/`isAlive`, `setDamageFilter` (owner-side validation), `setSpawnPicker`, `setStyle`. It routes requests to the owning peer over `multiplayer.send`.
Lifeline.api
The one module scripts talk to: damage, heal, kill, revive, fire (projectiles), on (events on every peer), get/all/isAlive, setDamageFilter (owner-side validation), setSpawnPicker, setStyle. It routes requests to the owning peer over multiplayer.send.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Lifeline API — the one module every other script talks to. local Lifeline = require("Lifeline.api") Lifeline.damage(target, 25, { kind = "fire", source = attacker }) Lifeline.heal(target, 10) Lifeline.on("died", function(e) print(e.target, "died to", e.kind) end) Authority: only the peer that OWNS an entity changes its health. Calling `damage` / `heal` for an entity another peer owns sends that owner a request; the owner validates it (clamps, filters) and applies it. The relay refuses any direct write to a synced entity from a non-owner, so a client can never set somebody else's health.
kindColor(kind: string?) → string
| arg | type | description |
|---|---|---|
| kind | string? |
idOf(target: any) → string
| arg | type | description |
|---|---|---|
| target | any |
vecOf(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
cleanInfo(info: any) → void
Reduce an info table to plain, network-safe values.
| arg | type | description |
|---|---|---|
| info | any |
wire( ) → void
_register(comp: any) → void
| arg | type | description |
|---|---|---|
| comp | any |
q(t: any) → void
| arg | type | description |
|---|---|---|
| t | any |
qmul(a: any, b: any) → void
| arg | type | description |
|---|---|---|
| a | any | |
| b | any |
qaxis(ax: number, ay: number, az: number, angle: number) → void
| arg | type | description |
|---|---|---|
| ax | number | |
| ay | number | |
| az | number | |
| angle | number |
qconj(q: any) → void
| arg | type | description |
|---|---|---|
| q | any |
qrot(q: any, vx: number, vy: number, vz: number) → void
Rotate vector v (x,y,z) by quaternion q.
| arg | type | description |
|---|---|---|
| q | any | |
| vx | number | |
| vy | number | |
| vz | number |
qarr(q: any) → void
| arg | type | description |
|---|---|---|
| q | any |
isSynced(target: any) → boolean
Is this entity replicated to other peers? `entity.synced` is a METHOD, so it must be called — reading the property alone is always truthy.
| arg | type | description |
|---|---|---|
| target | any |
isPlayerEntity(id: string) → boolean
Is the entity a player's avatar?
| arg | type | description |
|---|---|---|
| id | string |
localAvatar( ) → any
The local player's avatar entity, or nil.
flashEnabled( ) → boolean
Global toggles the HUD writes (per peer).
_setFlashEnabled(on: boolean) → void
| arg | type | description |
|---|---|---|
| on | boolean |
_unregister(id: string, comp: any) → void
| arg | type | description |
|---|---|---|
| id | string | |
| comp | any |
all( ) → void
Every live Health component, as a map of entity id → component.
get(target: any) → any
The Health component on an entity (or nil).
| arg | type | description |
|---|---|---|
| target | any |
healthOwnerOf(id: string) → string
The id of the entity whose Health covers `id`: itself or the nearest ancestor with Health.
| arg | type | description |
|---|---|---|
| id | string |
isAlive(target: any) → boolean
| arg | type | description |
|---|---|---|
| target | any |
isAuthority(id: string) → boolean
Does THIS peer decide what happens to the entity?
| arg | type | description |
|---|---|---|
| id | string |
on(evt: string, fn: (any) →
Listen for "damaged", "healed", "blocked", "died", "respawned" (or "*" for all). The handler receives one table: { event, target, amount, shieldAmount, kind, source, crit, health, shield, maxHealth, reason, origin }. Fires on EVERY peer.
| arg | type | description |
|---|---|---|
| evt | string | |
| fn | (any |
Disconnect(_self: any?) → void
| arg | type | description |
|---|---|---|
| _self | any? |
emit(evt: string, payload: any) → void
| arg | type | description |
|---|---|---|
| evt | string | |
| payload | any |
_publish(evt: string, payload: any) → void
Called by the owner of a Health entity: tell this peer and every other one. An entity that is not synced lives separately on every peer, so its events stay on the peer they happened on.
| arg | type | description |
|---|---|---|
| evt | string | |
| payload | any |
_recvEvt(_from: number, evt: any, payload: any) → void
| arg | type | description |
|---|---|---|
| _from | number | |
| evt | any | |
| payload | any |
request(op: string, target: any, amount: number, info: any) → void
| arg | type | description |
|---|---|---|
| op | string | |
| target | any | |
| amount | number | |
| info | any |
_recvReq(from: number, op: any, id: any, amount: any, info: any) → void
| arg | type | description |
|---|---|---|
| from | number | |
| op | any | |
| id | any | |
| amount | any | |
| info | any |
damage(target: any, amount: number, info: any?) →
Damage a target. info: { source = entity|id, kind = "fire", crit = bool, origin = vec3, dot = bool (damage-over-time: ignores and does not start i-frames) }.
| arg | type | description |
|---|---|---|
| target | any | |
| amount | number | |
| info | any? |
heal(target: any, amount: number, info: any?) → void
Heal a target by amount.
| arg | type | description |
|---|---|---|
| target | any | |
| amount | number | |
| info | any? |
kill(target: any, info: any?) → void
Kill a target outright (ignores shield and invulnerability).
| arg | type | description |
|---|---|---|
| target | any | |
| info | any? |
revive(target: any) → void
Bring a dead target back right now (at its spawn / reset point).
| arg | type | description |
|---|---|---|
| target | any |
setDamageFilter(fn: any) → void
Owner-side filter run on every damage before it lands: fn(targetComp, amount, info, fromPeer?) -> number? (return 0/nil to cancel). fromPeer is set when the damage came from another peer's request.
| arg | type | description |
|---|---|---|
| fn | any |
_filter(comp: any, amount: number, info: any, from: number?) → number
| arg | type | description |
|---|---|---|
| comp | any | |
| amount | number | |
| info | any | |
| from | number? |
spawnPoints( ) → void
Where respawning players can appear: every SpawnPoint entity, else every PlayerSpawn.
setSpawnPicker(fn: any) → void
Replace how a respawn point is chosen: fn(healthComp, points) -> entity.
| arg | type | description |
|---|---|---|
| fn | any |
_pickSpawn(comp: any) → any
| arg | type | description |
|---|---|---|
| comp | any |
fire(opts: any) → any
Fire a damaging projectile. opts: { origin, direction, speed = 20, damage = 15, kind = "projectile", source, radius = 0.18, lifetime = 3, gravity = 0, critChance = 0, color = {r,g,b} }. Returns the projectile entity.
| arg | type | description |
|---|---|---|
| opts | any |
setStyle(t: { [string]: any }) → void
Override HUD styles at runtime on this peer: { bar = "hearts", worldBar = "ring", number = "combo", feedback = "shake vignette" }. Pass nil values to clear.
| arg | type | description |
|---|---|---|
| t | { [string]: any } |
getStyle( ) → 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.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.