Hold Your Breath: Horror FPS Kit with Flashlights, Scripted Scares and Stalkers (fork)
README.md
scaresKit
Named scaresKit since 1.0.1 (it was published as scareKit in 1.0.0). Search for either name.
26 original horror scares, from a distant scream to a body dropping from the ceiling, each placeable with one call or one component and rated by intensity 1 (subtle) to 5 (huge). Every scare builds its own props, plays its own generated sound, and runs as a scriptedEventsKit cue, so it fires once for the whole multiplayer world and stays fired after the player dies and respawns. A tension director can list, pick, veto and hear every scare.
Version 1.0.3 (Scares.VERSION). The version, this README and package.yaml move together.
Install
- Install
scriptedEventsKit.packageandscaresKit.package(search ZeroMind for scaresKit; scriptedEventsKit is its one dependency). tensionKit (the director gate) and interactKit (theinteractbeat, door slams on an interactKit door) are optional: link them withrequire("~scaresKit.links").link("tensionKit.api", require("~tensionKit.api"))(same forinteractKit.api);require("~horrorKit.api")links both. local Scares = require("~scaresKit.api").- In a scene entrypoint (or any code every peer runs in play):
Scares.place("doorSlam", { at = {0, 0, 5}, facing = 180 }), or put a Scare component on an empty entity.
First example
local Scares = require("~scaresKit.api")
-- the player walking into the spot (radius 2.5 m) fires it; props are built ahead of them
Scares.place("ventBurst", { at = { 4, 0, 9 }, facing = 90 })
-- lights die and something is closer each time, using the corridor's own lights:
-- hallStart and hallEnd are entities at the two ends of the corridor (your level has its own; these are spawned here)
local hallStart = entity.spawn("hallStart"); hallStart.position = vector.create(0, 0, 40)
local hallEnd = entity.spawn("hallEnd"); hallEnd.position = vector.create(0, 0, 52)
Scares.place("lightsCloser", { at = "hallStart", toward = "hallEnd", lights = "hallLight*" })
-- fire when the player LOOKS at the window for a second
Scares.place("handPrint", { at = { 0, 0, 20 }, trigger = { kind = "look", at = { 0, 1.5, 22.5 }, seconds = 1 } })
-- let the director choose what plays here, up to intensity 3
Scares.slot({ at = { -6, 0, 30 }, maxIntensity = 3 })
Placement convention: at is where the player stands when it fires; facing (yaw degrees, 0 = +z) or toward (a point or entity) is the way they look. Props are built ahead of them. The default trigger is an area of radius (2.5 m) at at; mannequinTurn uses a look trigger.
The scares
| id | label | intensity | tags | props | what happens |
|---|---|---|---|---|---|
distantScream | Distant scream | 1 | sound, distant, fakeout | a scream far down the corridor ahead (distance) | |
knock | Knock on a door | 1 | sound, door, fakeout | three slow knocks from behind door | |
lightPop | A bulb pops and dies | 1 | light, sound | lamp | the light above crackles, flares, dies, limps back (lights) |
shelfFall | Bottle falls off a shelf | 1 | object, sound | shelf, bottle, cans | a bottle tips off a shelf and clatters down |
whisper | Whisper in your ear | 2 | sound, personal, fakeout | a whisper at the ear of the triggering player only (text optional) | |
footstepsBehind | Footsteps behind you | 2 | sound, personal, fakeout | heavy steps right behind the player | |
chairSlide | Chair slides on its own | 2 | object, sound | chair | a chair scrapes across the floor and turns to you |
radioVoice | Radio voice in the static | 2 | sound, object, lore | radio, crate | a dead radio crackles: a voice says something it should not know (text) |
waterSplash | Splash in the dark water | 2 | sound, water, fakeout | ripple | something heavy goes under; rings spread |
breathingDoor | Breathing behind a door | 2 | sound, door | slow wet breathing behind door | |
glassCrack | Glass cracks | 2 | object, sound, glass | pane, cracks | a crack crawls across the window, line by line |
shadowSlide | A shadow slides along the wall | 2 | light, visual, shadow | shadow | a tall shadow glides along a wall (side); eerieLightsKit Silhouette when present |
shapeCross | A shape crosses the far end | 3 | figure, visual, corridor | figure | a tall wrong shape crosses the far end fast (distance, width) |
monitorFace | Monitor shows a face | 3 | object, visual, screen, sound | desk, CRT monitor | a dead screen thunks on; a face of three dark dots resolves in the glow |
handleRattle | Door handle rattles | 3 | door, sound, object | door | the handle jerks hard as if someone wants in (door) |
handPrint | Hand print on the glass | 3 | glass, visual, sound | pane, hand | a wet palm slaps the glass and drags down; nobody there |
mannequinTurn | The figure has turned | 3 | figure, visual, look | mannequin | look at it, look away, look back: it faces you, closer |
ceilingRun | Something runs across the ceiling | 3 | sound, ceiling, fakeout | thumps race overhead and away; the view shakes | |
alarm | Alarm blares | 3 | sound, light, loud | beacon | a red beacon spins and a klaxon tears the silence (seconds) |
doorSlam | Door slams shut | 4 | door, sound, loud | door | the heavy door slams with a boom (door = an interactKit door to close, else its own) |
ventBurst | Vent cover bursts open | 4 | object, sound, loud, vent | vent | a grille rattles, bangs off and clatters to your feet |
lightsCloser | Lights die; it is closer each time | 4 | light, figure, visual | lamp, figure | out, back: a figure far off; out, back: halfway; out, back: right there; out: gone (lights, marks) |
pipeBurst | Pipe bursts with steam | 4 | object, sound, loud, steam | pipe, steam | a pipe bangs and splits; steam blasts across the corridor |
powerFailure | Power failure | 4 | light, sound, dark | lamp | everything winds down; seconds of black; emergency power stutters back (lights, seconds); sets flag scaresKit.powerRestored |
bodyDrop | Body drops from the ceiling | 5 | object, loud, visual | body on a rope, lamp | a body in a stained sheet drops on a rope in front of you, jerks and swings |
chaseSting | Chase sting | 5 | sound, personal, chase, music | screeching hit and drums, red flash, view snaps toward from; sets flag scaresKit.chase |
All creatures, names and designs are original to this kit. The figure is a gaunt 2.3 m silhouette with overlong arms and a head tilted onto its shoulder.
Every scare has its own generated sound (sounds/sk_*.soundClip, 27 clips), registered with scriptedEventsKit by name so any cue can use them: {"sound", "sk_doorSlam", at = "door"}.
Placement options
at, facing / toward, trigger (any scriptedEventsKit trigger), radius, cueId, once, repeat + cooldown, times, players = trigger/all/near, when (scriptedEventsKit conditions), essential, plus each scare's own needs: lights, door, text, distance, width, marks, seconds, side, from.
essential = true lets the scare skip the director's gate (tensionKit's pacing, or your own setGate). Use it for a beat the level depends on, such as a scare that releases a monster or that the finale chains from. A gated scare normally stays armed and fires once the director allows it. That only holds for a trigger that hits again, like an area or a look. A scare triggered by a pickup or a chained cue hits once, so it is essential by default: vetoed at that moment, it and everything chained after it would never happen.
API
| call | what it does |
|---|---|
Scares.place(id, opts) | build the props and arm the cue; returns the cue id |
Scares.remove(cueId) / placed() / trigger(cueId, force) | manage placed scares |
Scares.get(id) | a scare's card: { id, label, intensity, tags, props, needs, desc } |
Scares.list({ maxIntensity, minIntensity, tags, without, gated }) | the library, filtered, sorted by intensity |
Scares.pick({ ...list opts, prefer = "random"/"strongest", exclude, seed }) | a director's choice among scares the gate allows |
Scares.setGate(fn(card) -> boolean) | the director's veto, asked on the host before every scare fires |
Scares.useDreadKit() | tensionKit as the director (once tensionKit.api is linked in scaresKit.links): canScare gates, scared hears every scare |
Scares.slot({ at, trigger, maxIntensity, tags, candidates, choose }) | a director-chosen slot |
Scares.on("scare" / "placed", fn) | events, returns a disconnect |
Scares.sounds.CLIPS / names() | the kit's sound refs |
Events
| event | data |
|---|---|
scare | { id, intensity, position = {x,y,z}, cueId, by }, on every peer when a placed scare fires |
placed | { id, cueId } |
Components
- Scare: one scare on an entity:
scare(id ordirector),trigger(default / area / look / manual / timer),radius,seconds,lookAt,lights,door,text,players,once,maxIntensity,tags,options. Its props are previewed in the editor.
Multiplayer
Place scares from code every peer runs (a scene entrypoint, a component): each peer builds the same props under the same names, and scriptedEventsKit's host decides the fire once and every peer plays the same beats from the same start time. Personal parts (whisper, footsteps behind you, flashes, shakes, the chase sting) go only to the players the cue targets (players).
Known limits
- Props are procedural (primitive meshes with tinted materials); swap in your own art by hiding the kit's parts and animating yours with scriptedEventsKit beats.
- Falling and flying props are animated with easing rather than simulated, so every peer sees the same motion.
- The dark is the scene's: scares land hardest in a dim level where their lamps and lights carry the moment.
1.0.1
Renamed from scareKit; depends on scriptedEventsKit 1.0.1. Test suite renamed scaresKitTests.
1.0.2
Depends on scriptedEventsKit 1.0.2 (README fixes; cues defined from code stay defined across play sessions). The scares themselves are unchanged.
tensionKit and interactKit are linked through scaresKit.links rather than required by name, so scaresKit installs with scriptedEventsKit alone.
1.0.3
README: the first example spawns the corridor ends lightsCloser names (hallStart, hallEnd), so it runs as written in an empty world. The version test reads the right package.yaml path.