holdSounds.module
This package holds more than this page lists. See all of its files in its world.
README.md
holdSounds
Sounds for every kind of climbing hold in traversalKit. Climbing code calls
require("traversalKit.holdSounds").play(kind, event, position, volume?, key?) when a hand
catches a hold, a hand or foot is placed, a foot slips, or the climber vaults, lands hard,
wobbles or pulls up. The sound plays in 3D at position on the calling peer only: call it
on every peer that should hear it (each peer runs the climbing code for what it sees).
Kinds and events
- Kinds:
stone,timber,tiles,thatch(the soft tiles),rope,ladder,tree,cliff,bamboo. Aliases such aswood,masonry,roof,tiles_soft,bark,rockmap onto these (M.ALIASES); anything unknown plays asstone. - Per-kind events:
grab(hands catch the hold),hand(a short hand placement),foot(a foot scuff or step),slip(scrape, clatter, rope burn, gravel trickle). - Shared events:
vault,land_heavy,wobble,pullup.
API
M.play(kind, event, position, volume?, key?)plays a random take (soundstage's shuffle bag, ±6% pitch, ±10% volume) and returns the clip ref it played, or nil when it was throttled. Each event has a minimum interval (M.MIN_INTERVAL, perkey), so spamming does not stack.M.clips[kind][event]lists the clip names per event; shared events are underM.clips.common.M.clip(name)resolves one name to its soundClip,M.takes(kind, event)lists an event's names,M.kindOf(kind)answers the kind a name plays as.M.LEVEL(per-event level),M.MAX_DISTANCE(28 m) tune the mix.
Playback goes through soundstage.sfx (its pooled 3D voices on the sfx mix group).
Clips come from traversalKit/sounds (generated for this kit, plus three published clips),
soundstage's stone/wood/gravel footsteps and thuds and alpineKit's
rockfall.