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 "events" in codeAPI Reference 29 results closeClear
codeAPI Reference
May 3, 2026

Player Event Interfaces (Local and Global)

Local.IPlayerEvents and Global.IPlayerEvents Event interfaces for player lifecycle, damage, inventory, and camera events. Local fires to player hierarchy only; …

codeAPI Reference
May 12, 2026

s&box BaseCarryable.IEvent: World model events

BaseCarryable.IEvent Interface API Reference BaseCarryable.IEvent is an interface for receiving world model lifecycle events on carryable objects (weapons, item…

codeAPI Reference
May 12, 2026

s&box Global.ISpawnEvents: Spawn event callbacks

Global.ISpawnEvents Interface API Reference Global.ISpawnEvents is an interface for Components that want to listen to spawn events across the scene. Implement t…

codeAPI Reference
May 3, 2026

Global.ISpawnEvents Spawn Event Interface

Global.ISpawnEvents Interface Scene-wide event interface for listening to spawn operations. Implement on components to receive pre/post spawn callbacks. Interfa…

codeAPI Reference
May 12, 2026

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…

codeAPI Reference
May 12, 2026

s&box IToolgunEvent: Toolgun selection interception

IToolgunEvent Interface API Reference IToolgunEvent is an interface for Components that want to intercept toolgun selection attempts. Implement to allow or reje…

codeAPI Reference
May 12, 2026

s&box IPhysgunEvent: Physgun grab interception

IPhysgunEvent Interface API Reference IPhysgunEvent is an interface for Components that want to intercept physgun grab attempts. Implement to allow or reject ph…

codeAPI Reference
May 12, 2026

s&box Global.ISaveEvents: Save/load event callbacks

Global.ISaveEvents Interface API Reference Global.ISaveEvents is an interface for Components that want to listen to SaveSystem events. Implement to receive call…

codeAPI Reference
May 12, 2026

BaseCarryable.IEvent interface

BaseCarryable.IEvent Interface Scene event interface for world model lifecycle events on s&box carryable items. Methods OnCreateWorldModel Called when the world…

codeAPI Reference
May 12, 2026

s&box ICleanupEvents: Cleanup event callbacks

ICleanupEvents API Reference ICleanupEvents is an interface for receiving callbacks when the scene is cleaned up (map reset). Type Signature Method - Called aft…

codeAPI Reference
May 12, 2026

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…

codeAPI Reference
May 3, 2026

Sandbox.PhysicsWorld

Sandbox.PhysicsWorld Access to the physics simulation. Overview PhysicsWorld provides access to the physics simulation, including gravity, time step, and broad …

codeAPI Reference
May 12, 2026

s&box SaveSystem: Scene save/load with metadata and event hooks

SaveSystem API Reference SaveSystem is a GameObjectSystem that captures differences between the current scene state and the original scene, enabling save/load f…

codeAPI Reference
May 12, 2026

s&box IToolActionEvents: Tool action event interface

IToolActionEvents API Reference IToolActionEvents is a scene-wide interface for listening to toolgun actions before and after they execute. Type Signature Actio…

codeAPI Reference
May 12, 2026

IDefinitionResource interface

IDefinitionResource Interface Interface for s&box game resources that have title and description metadata. Properties Title () - Display title for the resource …

codeAPI Reference
May 12, 2026

s&box TriggerTeleport: Trigger-based teleportation

TriggerTeleport Component API Reference TriggerTeleport is a Component that teleports objects that enter its trigger collider to a target GameObject. Type Signa…

codeAPI Reference
May 12, 2026

s&box BaseToggle: Toggle state base class

Abstract base class for toggle state with [Sync] support and event callbacks. Properties Methods Usage Inherit from this class for any component that needs a sy…

codeAPI Reference
May 12, 2026

s&box Ownable: Ownership tracking component

Ownable Component API Reference Ownable is a Component that tracks which Connection (player) spawned a GameObject, enabling prop protection and ownership checks…

codeAPI Reference
May 3, 2026

GameManager.Spawn RPC with Ident Parsing

GameManager.Spawn RPC Broadcast RPC for spawning entities from string identifiers with automatic weapon pickup detection. Ident Format - Spawn a prop from asset…

codeAPI Reference
May 4, 2026

s&box TimeSince and TimeUntil: Convenient Time Measurement Structs

s&box TimeSince and TimeUntil: Convenient Time Measurement Structs Both structs use internally and support implicit conversion from /. TimeSince Measures time e…