Log inGet started
World

Hold Your Breath: Horror FPS Kit with Flashlights, Scripted Scares and Stalkers (fork)

Branchmain
Commit6143ad305f

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

  1. Install scriptedEventsKit.package and scaresKit.package (search ZeroMind for scaresKit; scriptedEventsKit is its one dependency). tensionKit (the director gate) and interactKit (the interact beat, door slams on an interactKit door) are optional: link them with require("~scaresKit.links").link("tensionKit.api", require("~tensionKit.api")) (same for interactKit.api); require("~horrorKit.api") links both.
  2. local Scares = require("~scaresKit.api").
  3. 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

idlabelintensitytagspropswhat happens
distantScreamDistant scream1sound, distant, fakeouta scream far down the corridor ahead (distance)
knockKnock on a door1sound, door, fakeoutthree slow knocks from behind door
lightPopA bulb pops and dies1light, soundlampthe light above crackles, flares, dies, limps back (lights)
shelfFallBottle falls off a shelf1object, soundshelf, bottle, cansa bottle tips off a shelf and clatters down
whisperWhisper in your ear2sound, personal, fakeouta whisper at the ear of the triggering player only (text optional)
footstepsBehindFootsteps behind you2sound, personal, fakeoutheavy steps right behind the player
chairSlideChair slides on its own2object, soundchaira chair scrapes across the floor and turns to you
radioVoiceRadio voice in the static2sound, object, loreradio, cratea dead radio crackles: a voice says something it should not know (text)
waterSplashSplash in the dark water2sound, water, fakeoutripplesomething heavy goes under; rings spread
breathingDoorBreathing behind a door2sound, doorslow wet breathing behind door
glassCrackGlass cracks2object, sound, glasspane, cracksa crack crawls across the window, line by line
shadowSlideA shadow slides along the wall2light, visual, shadowshadowa tall shadow glides along a wall (side); eerieLightsKit Silhouette when present
shapeCrossA shape crosses the far end3figure, visual, corridorfigurea tall wrong shape crosses the far end fast (distance, width)
monitorFaceMonitor shows a face3object, visual, screen, sounddesk, CRT monitora dead screen thunks on; a face of three dark dots resolves in the glow
handleRattleDoor handle rattles3door, sound, objectdoorthe handle jerks hard as if someone wants in (door)
handPrintHand print on the glass3glass, visual, soundpane, handa wet palm slaps the glass and drags down; nobody there
mannequinTurnThe figure has turned3figure, visual, lookmannequinlook at it, look away, look back: it faces you, closer
ceilingRunSomething runs across the ceiling3sound, ceiling, fakeoutthumps race overhead and away; the view shakes
alarmAlarm blares3sound, light, loudbeacona red beacon spins and a klaxon tears the silence (seconds)
doorSlamDoor slams shut4door, sound, louddoorthe heavy door slams with a boom (door = an interactKit door to close, else its own)
ventBurstVent cover bursts open4object, sound, loud, ventventa grille rattles, bangs off and clatters to your feet
lightsCloserLights die; it is closer each time4light, figure, visuallamp, figureout, back: a figure far off; out, back: halfway; out, back: right there; out: gone (lights, marks)
pipeBurstPipe bursts with steam4object, sound, loud, steampipe, steama pipe bangs and splits; steam blasts across the corridor
powerFailurePower failure4light, sound, darklampeverything winds down; seconds of black; emergency power stutters back (lights, seconds); sets flag scaresKit.powerRestored
bodyDropBody drops from the ceiling5object, loud, visualbody on a rope, lampa body in a stained sheet drops on a rope in front of you, jerks and swings
chaseStingChase sting5sound, personal, chase, musicscreeching 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

callwhat 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

eventdata
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 or director), 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.