GlewField
Every mote of glew on the hill, and the hent that takes them. One instance, on the scene's `mount_glew`.
GlewField
Every mote of glew on the hill, and the hent that takes them. One instance,
on the scene's mount_glew.
Glew gathers in drifts — three thick patches on the dark side of the hill.
A drift slides downhill at a little under half the speed the light-line walks
down from the summit, so the sun steadily closes on it: the glew worth having
is always the glew nearest the light. When the light-line reaches a drift the
motes standing in it burn off over Core.GLEW.burnSeconds, and a new drift
gathers lower in whatever is still dark. Reading where the drifts are, and
judging how long the sun will leave them, is the first half of the round.
A mote is a temporary entity named glew_<n> carrying game.rules.GlewMote
and a Model of the emissive game.materials.glew_mote sphere with a small
warm point light. When game.hero.GlewLook is in the world the field adds it
to every mote as well, and the look owns the mote's appearance from there — it
may hide or replace the sphere. The field keeps writing burn on both the
mark and the look, and calls look:caught() when a mote flies to the lantern.
What other slices call
Take the ref off the mount:
local field = entity.find("mount_glew").component.get("game.rules.GlewField")
| Call | Answers |
|---|---|
field:nearest(x, z, radius) | entity ids of the motes within radius metres of (x, z), nearest first. A mote already flying to the lantern is not offered. |
field:take(entityId) | true when that mote was there to take, and it is gone — a hoggy ate it. |
field:spawnBurst(x, y, z, n) | Fountains n motes out around a point: what a full hoggy spills when it is hented. |
field:hentInto(x, y, z, facing) | Runs a hent from (x, y, z) facing facing: everything inside Core.HENT.arc within Core.HENT.range flies to the lantern. Returns how many were caught, adds them to Core.state.lantern (capped at Core.LANTERN_CAP) and emits glew. |
field:count() | Motes alive right now. |
field:coldCount() | Motes alive and not yet burning. |
A hoggy that bursts may call spawnBurst and emit burst; the field
honours whichever arrives and ignores the second when both name the same
burst, so the motes are spilled exactly once.
The round
The field runs while the phase is playing, and keeps running through won
and lost without spawning anything new — so at first light the last motes
are still burning off and the resolution looks at a hill going clean rather
than at one frozen mid-burn. Entering playing gathers fresh drifts and
stands most of the population up at once, with the first drift within a few
steps of the foot so the round opens with glew the Henter can reach.
Sound
The catch (game.rules.clips.glew_catch) and the fizzle of a mote taken by
the sun (game.rules.clips.glew_burn) are played through game.audio.sfx at
the mote's own position, so both are spatial and heard from the CameraRig's
listener.
Scoped to this part · feeds back into the world's score.