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 "property" in terminalCode Example 48 results closeClear
terminalCode Example
May 4, 2026

Sandbox: ThrusterEntity and WheelEntity — contraption propulsion with ClientInput bindings

ThrusterEntity and WheelEntity — Contraption Propulsion Components Both and implement and use properties so players can bind them to keys from a vehicle seat. T…

terminalCode Example
May 11, 2026

UIDecal Component - Render Razor UI as a Decal

A Render Component for s&box that allows you to project Razor UI onto surfaces as a Decal. Great for sticking UI onto rounded walls, curved surfaces, or any geo…

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 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 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 10, 2026

Reusable World-Space Interaction Prompt Framework

A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…

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 3, 2026

DynamiteEntity Explosive Entity Pattern

DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…

terminalCode Example
May 4, 2026

Sandbox: NPC system — Schedule, Task, and Layer architecture

NPC System — Schedule, Task, and Layer Architecture The Sandbox NPC system uses a layered architecture: Layers handle continuous behaviours (navigation, senses,…

terminalCode Example
May 10, 2026

s&box JSONObject Save Data Helper for Components

This s&box-focused sample shows how to programmatically construct and deconstruct JSON for component save data. It is useful for player saves, world unlock stat…

terminalCode Example
May 4, 2026

Sandbox: Stacker tool — duplicate objects in a line or arc with StackAlignMode

Stacker Tool — Duplicate Objects in a Line or Arc The Stacker tool clones a selected object N times along a configurable axis with optional rotation and gap. It…

terminalCode Example
May 5, 2026

Custom GameResource assets — defining asset types with ResourceLibrary and PostLoad registry

Custom GameResource Assets lets you define your own asset types with a custom file extension, inspector UI, and hot-reload support. Assets are JSON files under …

terminalCode Example
May 3, 2026

Sync Properties for Networked State

Sync Properties for Multiplayer The attribute automatically synchronizes property values to all clients when they change. Basic Sync Sync Flags Customize sync b…

terminalCode Example
May 10, 2026

Extensible Player Data Save Hooks for World Components

This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…

terminalCode Example
May 4, 2026

Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage

BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…

terminalCode Example
May 5, 2026

CharacterController — capsule movement, ground checks, and velocity control

CharacterController in s&box is a built-in s&box component for capsule-based movement. Unlike , you control velocity directly — the controller handles collision…

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 4, 2026

Sandbox: ControlSystem — vehicle seat and contraption control with IPlayerControllable

ControlSystem — Vehicle Seat and Contraption Control is a that drives components on contraptions. When a player sits in a , the system walks the connected contr…

terminalCode Example
May 3, 2026

Physics Tracing Code Examples

Physics Tracing Code Examples Raycast and shape trace examples using — the builder pattern for physics queries. TraceResult Properties Builder Pattern Methods

terminalCode Example
May 3, 2026

Component Event Interfaces for Tool Interactions

Component Event Interfaces (IPhysgunEvent, IToolgunEvent) Event interfaces that allow components to respond to tool interactions. These use s&box's pattern for …