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…
Performance Best Practices
s&box Performance Best Practices Community guide for writing performant s&box code based on engine behavior and developer recommendations. Object Pooling Avoid …
s&box AmmoResource: Shared ammo type GameResource
AmmoResource GameResource API Reference AmmoResource is a GameResource that defines a type of ammo that can be shared across weapons. Weapons that reference the…
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…
Randomized Clothing for NPC Citizens using Dresser.Randomize() on Prefabs
Overview This demonstrates how to create NPC citizen prefabs with randomized clothing using the built-in component. Each time the prefab spawns or is enabled, i…
Sandbox.ParticleEffect
Sandbox.ParticleEffect Controls particle system playback. Overview ParticleEffect is the root component for playing particle effects (.vpcf files). Setup Playba…