DynamiteEntity Explosive Entity Pattern
DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…
Component Event Interfaces for Tool Interactions
Component Event Interfaces (IPhysgunEvent, IToolgunEvent) Event interfaces that allow components to respond to tool interactions. These use s&box's pattern for …
Reusable World-Space Interaction Prompt Framework
A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode and RequireComponent
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode Reference Components provide convenient lookup methods for finding other compone…
Prop Component: Procedural Components, Damage System, Gib Spawning, and DamageInfo Patterns
Prop Component: Procedural Physics, Gibs, Damage, and Network Patterns The component is a high-level s&box component that automatically creates , , and componen…
Network Events: INetworkListener and INetworkSpawn Interfaces
React to players joining and leaving by implementing or on a component in the scene. INetworkListener Example Spawn a player object when someone joins: INetwork…
BaseWeapon and BaseCarryable Weapon Framework
BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…
Network Events: INetworkListener for Player Join, Leave, and Active Callbacks
Implement or on a component to react to players joining and leaving the game. INetworkListener Example Spawn a player object when someone joins: INetworkListene…
FindMode and Component Lookup: GetComponent, GetAll, ComponentList, and Hierarchy Search
FindMode and Component Lookup: GetComponent, GetAll, and ComponentList s&box uses a flags enum to control how component searches traverse the hierarchy. Underst…