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 …
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…
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; …
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…
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…
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…
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…
Particle Effects System
Particle Effects System CPU-simulated, fully controllable particle system for effects like fire, smoke, sparks, and explosions. Architecture The particle system…
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…
[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…
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…
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…
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…
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 , , …
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…
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…
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…
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…
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…
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…