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 "player" in codeAPI Reference 56 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 BasePickup: Pickup item base

BasePickup Abstract Class API Reference BasePickup is an abstract Component for items that can be picked up by players. Implements ITriggerListener and ICollisi…

codeAPI Reference
May 12, 2026

s&box IPlayerControllable: Player control interface

IPlayerControllable API Reference IPlayerControllable is an interface for Components that can be controlled by seated players through the ControlSystem. Type Si…

codeAPI Reference
May 3, 2026

BasePickup with ITriggerListener and ICollisionListener

BasePickup Abstract Class Abstract base for item pickups using trigger and collision detection with host-only consumption. Key Patterns **** — trigger volume pi…

codeAPI Reference
May 12, 2026

s&box LimitsSystem: Spawn and tool limits

LimitsSystem GameObjectSystem API Reference LimitsSystem enforces configurable limits on spawning and tool usage. Maintains a per-player tracked object list pop…

codeAPI Reference
May 12, 2026

s&box ClientInput: Input scope for controlled objects

Client input scope struct for routing input to controlled objects. Used by ControlSystem to redirect player input during chair/vehicle control. Static Propertie…

codeAPI Reference
May 12, 2026

s&box PlayerFallDamage: Fall damage component

PlayerFallDamage Component API Reference PlayerFallDamage is a Component that applies fall damage to the player when they land. It implements Local.IPlayerEvent…

codeAPI Reference
May 3, 2026

PlayerData Component for Stats and Respawn

PlayerData Component Persistent player data component tracking stats (kills, deaths), respawn state, and providing connection lookup. Key Properties Connection …

codeAPI Reference
May 12, 2026

s&box BasePickup: Trigger and collision-based pickup system

BasePickup API Reference BasePickup is an abstract Component for creating trigger or collision-based pickups (weapons, ammo, items). Type Signature Required Com…

codeAPI Reference
May 12, 2026

s&box BanSystem: Player ban management

BanSystem GameObjectSystem API Reference BanSystem holds a banlist and can ban users. Implements INetworkListener to reject banned connections. Bans are persist…

codeAPI Reference
May 3, 2026

Player Component with Static Accessors

Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…

codeAPI Reference
May 12, 2026

s&box UndoSystem: Per-player undo stacks

GameObjectSystem that provides per-player undo stacks with 128-step limit. Tracks GameObjects for destruction on undo. Classes PlayerStack Per-player undo stack…

codeAPI Reference
May 3, 2026

Sandbox.VrAnchor

Sandbox.VrAnchor Locks VR player position. Overview VrAnchor locks the player's playspace to a GameObject's transform. Essential for seated VR, vehicles, and ro…

codeAPI Reference
May 12, 2026

s&box IKillSource: Kill feed attacker interface

IKillSource Interface API Reference IKillSource is an interface for Components that can appear as an attacker in the kill feed. Implement on Player, Npc, explos…

codeAPI Reference
May 12, 2026

s&box ISpawner: Spawner interface

ISpawner Interface API Reference ISpawner describes something that can be spawned into the world. Implementations handle their own preview rendering and spawn l…

codeAPI Reference
May 12, 2026

s&box IToolActionEvents: Tool action callbacks

IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…

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

LinkedGameObjectBuilder for Finding Connected Objects

LinkedGameObjectBuilder Utility class for building a set of connected GameObjects by traversing physics joints, constraints, and manual links. Class Definition …

codeAPI Reference
May 12, 2026

s&box AmmoInventory: Shared ammo pools

AmmoInventory Component API Reference AmmoInventory stores shared ammo pools on a player, keyed by AmmoResource. Add this component to the player prefab alongsi…

codeAPI Reference
May 12, 2026

s&box CombatNpc: Combat NPC

CombatNpc Class API Reference CombatNpc is a combat NPC that searches for players, advances on them, fires in bursts, and repositions. When friendly, follows pl…