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 "logic" 53 results closeClear
menu_bookDocumentation
May 3, 2026

ActionGraph - Visual Scripting System

ActionGraph - Visual Scripting System Create game logic using node-based visual scripting without writing code. Overview ActionGraph lets you: Build gameplay lo…

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…

menu_bookDocumentation
May 20, 2026

Serverside Code: #if SERVER Blocks and .Server.cs Files for Hidden Logic

s&box supports serverside-only code that is stripped from client builds. This only works when running local projects on dedicated servers. #if SERVER Blocks Cod…

codeAPI Reference
May 12, 2026

s&box ManualLink: Logical link component

ManualLink Component API Reference ManualLink is a Component that creates a non-physics logical link between two GameObjects, used by the Linker tool to group u…

groupsCommunity
May 3, 2026

Project Structure Recommendations

Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…

menu_bookDocumentation
May 5, 2026

GameObjectSystem — scene-wide systems with stage-ordered execution and static access

GameObjectSystem — Scene-Wide Systems is a base class for scene-level systems that need to run at specific points in the frame — before or after physics, render…

menu_bookDocumentation
May 4, 2026

RealTime vs Time: Wall-Clock vs Scene Time — RealTimeSince, RealTimeUntil, GlobalNow, and SmoothDelta

RealTime vs Time: Wall-Clock vs Scene Time — When to Use Each s&box has two time systems. Choosing the wrong one is a common source of bugs. Time (Scene Time) ,…

menu_bookDocumentation
May 20, 2026

GameObjectSystem: Batch Processing and Execution Order Control

A GameObjectSystem lets you run logic at specific points during the frame for all components of a type, rather than relying on individual component Update metho…

menu_bookDocumentation
May 20, 2026

IScenePhysicsEvents: Pre and Post Physics Step Hooks

lets Components or GameObjectSystems wrap logic around the physics step. Implement it when you have systems that work closely with physics and need to run code …

menu_bookDocumentation
May 4, 2026

Network Visibility Culling: AlwaysTransmit, INetworkVisible, CullDelay, and PVS-Based Object Culling

Network Visibility Culling: How s&box Decides What to Send to Each Client s&box has a built-in network visibility culling system that avoids sending updates for…

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

menu_bookDocumentation
Jun 16, 2026

Building a Networked Radio System with 3D Audio and Sync

Building a functional, interactive, and multiplayer-compatible radio system in s&box requires coordinating networked replication, local 3D audio handles, extern…

menu_bookDocumentation
May 5, 2026

Custom Particle Controller - s&box Documentation

Official s&box documentation for the Particle System - visual effects. Particle Effect creates GPU-accelerated visual effects. Custom Particle Controllers scrip…

menu_bookDocumentation
May 5, 2026

Unit Tests - s&box Documentation

Official s&box documentation for Unit Tests - automated testing. Unit Tests covers writing and running tests for s&box code. Tests can verify component behavior…

menu_bookDocumentation
May 3, 2026

Network Helper

Network Helper Pre-built component for common multiplayer scenarios. What It Does NetworkHelper handles typical multiplayer setup: Auto-creates server if enable…

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…

codeAPI Reference
May 3, 2026

BaseConstraintToolMode for Constraint Tools

BaseConstraintToolMode Abstract Class Base class for two-stage constraint tools (weld, rope, elastic, etc.) with selection point handling. Class Overview Contro…

menu_bookDocumentation
May 5, 2026

GameObjectSystem - s&box Scene Documentation

GameObjectSystem GameObjectSystems are global systems that operate on groups of GameObjects. Unlike Components which are attached to single GameObjects, systems…

menu_bookDocumentation
May 5, 2026

Execution Order - s&box Documentation

Execution Order Understanding the order in which component methods are called. Flowchart Component lifecycle follows a specific order: Constructor — Object crea…