s&box RollermineNpc: Physics-driven NPC
RollermineNpc Class API Reference RollermineNpc is a physics-driven NPC that chases players, leaps at them, and bounces off dealing damage on contact. Implement…
s&box SoundDefinition: Categorized sound GameResource
SoundDefinition GameResource API Reference SoundDefinition is a GameResource that defines a categorized sound for use on spawned entities (thrusters, hoverballs…
Trigger-Based Background Music Crossfade Framework
This pattern replaces area music with a small local-client music framework. Each zone requests a target , while one controller crossfades the currently playing …
s&box PlayerFallDamage: Fall damage component
PlayerFallDamage Component API Reference PlayerFallDamage is a Component that applies fall damage to the player when they land. It implements Local.IPlayerEvent…
Door Component with IPressable Interface
Door Component with IPressable Map entity door with animated open/close using curves and the IPressable interface. Key Features AnimationCurve for smooth motion…
Building a Networked Radio System with 3D Audio and Sync
Building a functional, interactive, and multiplayer-compatible radio system in s&box requires coordinating networked replication, local 3D audio handles, extern…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …
Playing Sounds: SoundEvent, SoundHandle, and GameObject Audio in s&box
s&box provides several ways to play sounds in code: fire-and-forget at a world position, control via SoundHandle, attach to a GameObject, or use scene component…
s&box SpeechLayer: NPC speech and subtitles
NPC behavior layer that manages speech state, plays sound files, and renders subtitle text above the NPC's head. Properties Methods Behavior Resolves a random s…
Playing Sounds: SoundHandle, GameObject.PlaySound, and Audio Components
s&box provides several ways to play sounds: fire-and-forget at a position, controlled via , attached to a , or via scene components. SoundEvent Assets Sounds ar…
ReloadSoundEntry record struct
ReloadSoundEntry Record Struct Defines a timed sound event to play during s&box weapon reload animations. Properties Time () - Seconds after reload starts to pl…
s&box BasePickup: Pickup item base
BasePickup Abstract Class API Reference BasePickup is an abstract Component for items that can be picked up by players. Implements ITriggerListener and ICollisi…
BasePickup with ITriggerListener and ICollisionListener
BasePickup Abstract Class Abstract base for item pickups using trigger and collision detection with host-only consumption. Key Patterns **** — trigger volume pi…
s&box IResourcePreview: Resource preview interface
IResourcePreview Interface API Reference IResourcePreview is an interface for GameResources that want to enable in-picker previewing. When the user clicks an it…
s&box BasePickup: Trigger and collision-based pickup system
BasePickup API Reference BasePickup is an abstract Component for creating trigger or collision-based pickups (weapons, ammo, items). Type Signature Required Com…
Slot-based inventory UI with BuildHash optimization
Slot-Based Inventory UI with BuildHash Optimization This example shows a slot-based inventory UI with BuildHash() optimization to prevent unnecessary rebuilds a…
Inventory Hotbar UI Component
Inventory HUD with Hotbar A Razor PanelComponent that displays player inventory slots as a hotbar with mouse wheel and number key support. Implementation Key Fe…