traps
The twelve Trapwright traps (spikes, pendulum, arrowWall, flameJet, boulder, collapsingFloor, gasVent, crushingWalls, sawTrack, lightningPylon, turret, frostRunes) and the state machine they share: idle, windup (sound, danger glow and shake), active (damage to whatever the target…
dungeonKit.traps
The twelve Trapwright traps (spikes, pendulum, arrowWall, flameJet, boulder, collapsingFloor, gasVent, crushingWalls, sawTrack, lightningPylon, turret, frostRunes) and the state machine they share: idle, windup (sound, danger glow and shake), active (damage to whatever the target catches), cooldown. Triggers: plate, tripwire, timer, proximity, lever. Actions: use, trigger, disarm, arm, retarget, setTrigger, setDamage. Loaded by dungeonKit.api.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2nonstrict dungeonKit.traps: the twelve trap kinds and the trap state machine they share. Every trap runs idle -> windup (the tell: a sound, a glow and a shake) -> active (it hurts what its target catches) -> cooldown -> idle, on the host, and is triggered by a pressure plate, a tripwire, a timer, a proximity rune or a lever. Any trap can be disarmed, re-armed, fired by script or retargeted at players, monsters, all or nobody.
targetColor(L: any, target: string) → void
| arg | type | description |
|---|---|---|
| L | any | |
| target | string |
timing(piece: any) → void
Durations of a placed trap: windup, active, cooldown (seconds).
| arg | type | description |
|---|---|---|
| piece | any |
go(piece: any, phase: string, t: number, extra: any?) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| phase | string | |
| t | number | |
| extra | any? |
triggerBodies(piece: any) → void
Who is standing on / crossing a trap's trigger right now (everyone, any team, sets it off).
| arg | type | description |
|---|---|---|
| piece | any |
step(piece: any, t: number) → string
One host step of a trap at shared time t: trigger checks, phase changes and damage. Returns the phase it is in.
| arg | type | description |
|---|---|---|
| piece | any | |
| t | number |
use(piece: any, _arg: any, _by: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| _arg | any | |
| _by | any |
trigger(piece: any) → void
| arg | type | description |
|---|---|---|
| piece | any |
disarm(piece: any) → void
| arg | type | description |
|---|---|---|
| piece | any |
arm(piece: any) → void
| arg | type | description |
|---|---|---|
| piece | any |
setTrigger(piece: any, tr: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| tr | any |
setDamage(piece: any, v: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| v | any |
applyRewrite(piece: any, key: string, value: any, _by: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| key | string | |
| value | any | |
| _by | any |
rewriteSpec(piece: any) → any
| arg | type | description |
|---|---|---|
| piece | any |
triggerPos(piece: any) → void
Where a trap's trigger device sits (local {x, y, z}).
| arg | type | description |
|---|---|---|
| piece | any |
buildTrigger(piece: any, root: any, L: any, h: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| root | any | |
| L | any | |
| h | any |
poseTrigger(piece: any, h: any, t: number) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| h | any | |
| t | number |
trapDef(spec: any) → any
Base every trap shares: its own build, the trigger device, the target lamp.
| arg | type | description |
|---|---|---|
| spec | any |
state0(piece: any, o: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| o | any |
build(piece: any, root: any, L: any, o: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| root | any | |
| L | any | |
| o | any |
onState(piece: any, h: any, patch: any) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| h | any | |
| patch | any |
tick(piece: any, h: any, t: number, dt: number) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| h | any | |
| t | number | |
| dt | number |
host(piece: any, t: number) → void
| arg | type | description |
|---|---|---|
| piece | any | |
| t | number |
usable(piece: any) → void
| arg | type | description |
|---|---|---|
| piece | any |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes(piece: ?, u: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| u | ? | |
| t | ? |
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes(piece: ?, u: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| u | ? |
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes(piece: ?, u: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| u | ? |
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes(piece: ?, u: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| u | ? |
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
make(piece: ?, root: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| root | ? | |
| L | ? |
hitboxes( ) → void
pose(piece: ?, h: ?, ph: ?, u: ?, t: ?, L: ?) → void
| arg | type | description |
|---|---|---|
| piece | ? | |
| h | ? | |
| ph | ? | |
| u | ? | |
| t | ? | |
| L | ? |
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.