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 "fire" 83 results closeClear
codeAPI Reference
May 12, 2026

s&box ToolAction: Toolgun input binding

ToolAction Enums and ToolActionEntry API Reference ToolInput, InputMode, and ToolActionEntry are used by the toolgun system to bind actions to input slots with …

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…

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; …

terminalCode Example
May 4, 2026

Sandbox: BaseBulletWeapon — hitscan shooting with BulletConfiguration, recoil, and IronSightsWeapon

BaseBulletWeapon — Hitscan Shooting with Recoil and Camera Noise extends and implements hitscan bullet firing with configurable aim cone, recoil, and camera noi…

terminalCode Example
May 4, 2026

Sandbox: Physgun — grab, freeze, launch, and pull mechanics

Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…

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…

menu_bookDocumentation
May 4, 2026

Scene.Load and Scene.LoadFromFile: Loading Scenes, DontDestroyOnLoad, and the Loading Sequence

Scene.Load and Scene.LoadFromFile: Loading Scenes Locally loads a scene file into the current scene. This is a local-only operation — it does not bring other cl…

menu_bookDocumentation
May 3, 2026

Particle Effects System

Particle Effects System CPU-simulated, fully controllable particle system for effects like fire, smoke, sparks, and explosions. Architecture The particle system…

menu_bookDocumentation
May 4, 2026

IGameObjectNetworkEvents: StartControl, StopControl, and NetworkOwnerChanged Callbacks

IGameObjectNetworkEvents: Ownership Change Callbacks Implement on a component to receive callbacks when network ownership of the parent changes. Interface Metho…

menu_bookDocumentation
May 4, 2026

[Change] Attribute: Callbacks When Properties Change — Works with [Sync] and [ConVar], Priority, and All-Client Firing

[Change] Attribute: Callbacks When Properties Change The attribute invokes a method whenever a property's value changes. It works with any property but is espec…

menu_bookDocumentation
May 4, 2026

s&box Component Lifecycle: Exact Execution Order and Internal Guards

s&box Component Lifecycle: Exact Execution Order and Internal Guards Derived directly from and in the s&box engine source. Execution Order **** — Called once wh…

codeAPI Reference
May 12, 2026

s&box EmitMode: Emitter firing mode

EmitMode Enum API Reference EmitMode is an enum that defines how an emitter fires - either toggling on/off with a press, or emitting only while input is held do…

terminalCode Example
May 5, 2026

ConVar and ConCmd — console variables and commands with flags and game settings

ConVar and ConCmd — Console Variables and Commands and are s&box attributes for exposing variables and commands to the developer console. Console Commands Conso…

terminalCode Example
May 4, 2026

Sandbox: ISpawner interface — custom spawner pattern with ISpawnEvents

ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …

menu_bookDocumentation
May 5, 2026

Input - s&box Gameplay Documentation

Input s&box provides a comprehensive input system that handles keyboard, mouse, and gamepad input. The input system uses named actions defined in your project s…

terminalCode Example
May 4, 2026

Sandbox: Player spawn flow with PlayerData, events, and NetworkSpawn

Player Spawn Flow in s&box Sandbox The Sandbox game uses a (a ) to handle player connections and spawning. Here's the full pattern: GameManager spawns players o…

terminalCode Example
May 5, 2026

SpawnPoint and TriggerHurt — spawn locations and damage trigger volumes

SpawnPoint and TriggerHurt in s&box SpawnPoint is a built-in s&box component that marks a world location for player or NPC spawning. uses to find valid spawn lo…

menu_bookDocumentation
May 3, 2026

Property Attributes for Editor Inspector

Property Attributes for Editor Inspector Property attributes customize how fields appear and behave in the s&box editor inspector. Organization Attributes Visib…

codeAPI Reference
May 12, 2026

s&box ScriptedEmitter: Particle emitter GameResource

ScriptedEmitter GameResource API Reference ScriptedEmitter is a GameResource that defines a particle/VFX emitter with a prefab, used for spawning visual effects…

terminalCode Example
May 12, 2026

s&box Vector3 extension for aim cone randomization

s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…