auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "onenabled" in terminalCode Example 10 results closeClear
terminalCode Example
May 18, 2026

Randomized Clothing for NPC Citizens using Dresser.Randomize() on Prefabs

Overview This demonstrates how to create NPC citizen prefabs with randomized clothing using the built-in component. Each time the prefab spawns or is enabled, i…

terminalCode Example
May 5, 2026

Custom editor tools — EditorTool, Gizmo drawing, scene tracing, and overlay UI

Custom Editor Tools Editor tools appear in the s&box toolbar and let you build scene editing workflows — painting, placement, custom gizmos. They must live in a…

terminalCode Example
May 3, 2026

Collision and Triggers

Working with physics collisions and trigger volumes. Collision Components Basic Collision Trigger Volumes Triggers detect overlap without blocking movement: Col…

terminalCode Example
May 5, 2026

NavMeshLink custom traversal — parabolic jump, ladder climb, and physics jump

NavMeshLink Custom Traversal connects two NavMesh points for agents to traverse (jumps, ladders, teleports). Default traversal linearly interpolates between sta…

terminalCode Example
May 4, 2026

Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable

BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…

terminalCode Example
May 5, 2026

Async tasks in s&box — coroutines, parallel tasks, and frame-by-frame animation

Async Tasks in s&box Components s&box async tasks run on the main thread — they behave like coroutines. Use to yield one frame, to wait, and to run tasks in par…

terminalCode Example
May 10, 2026

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 …

terminalCode Example
May 3, 2026

BaseWeapon and BaseCarryable Weapon Framework

BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…

terminalCode Example
May 12, 2026

IPlayerControllable example: ThrusterEntity

IPlayerControllable Example: ThrusterEntity ThrusterEntity demonstrates how to implement IPlayerControllable for a thruster that responds to player input while …

terminalCode Example
May 3, 2026

Nameplate Component with Voice Activity

Nameplate with Voice Activity A Razor component that displays player nameplates above characters with voice chat visualization. Implementation SCSS Example Key …