S&box Wiki




Sandbox.TaskSource Task
Allows Task. Delay calls etc that are automatically cancelled when the entity is destroyed


static IReadOnlyList<Sandbox.Entity> All { get; }
A list of all active entities
Angles AngularVelocity { get; set; }
The angular velocity in local coords
Vector3 BaseVelocity { get; set; }
Generally describes the velocity of this object that is caused by its parent moving. Examples would be conveyor belts and elevators.
Sandbox.ICamera Camera { get; set; }
bool EnableDrawing { get; set; }
Turning this off will compleletely prevent the entity from drawing
bool EnableDrawOverWorld { get; set; }
similar to ignorez to draw over world but still having depth info
bool EnableHideInFirstPerson { get; set; }
Hide this model when in first person, or our parent is in first person
bool EnableShadowCasting { get; set; }
Don't cast no shadow
bool EnableShadowInFirstPerson { get; set; }
Render Shadows when hidden due to being in first person
bool EnableShadowOnly { get; set; }
Render Only Shadows
bool EnableShadowReceive { get; set; }
Don't receive no shadow [TODO: DOESNT WORK]
bool EnableViewmodelRendering { get; set; }
Enable Viewmodel Rendering
string EngineEntityName { get; }
The internal class name of this entity. For debug purposes only.
string EntityName { get; set; }
The entity target name. This is typically used by map IO and to generally access specific entities from code.
Vector3 EyePos { get; set; }
Vector3 EyePosLocal { get; set; }
Rotation EyeRot { get; set; }
Rotation EyeRotLocal { get; set; }
Sandbox.Entity GroundEntity { get; set; }
Generally describes the velocity of this object that is caused by its parent moving. Examples would be conveyor belts and elevators.
float Health { get; set; }
bool IsAuthority { get; }
Returns true if we have authority over this entity
bool IsClient { get; }
bool IsClientOnly { get; }
Returns true if this entity is a purely clientside entity, with no serverside components
bool IsDormant { get; }
Returns true if this entity is dormant (the client cannot see it, it isn't being networked)
bool IsFirstPersonMode { get; }
If this entity is being viewed through, or is a child of an entity that is being view through - will return true. This can be read are we in first person mode.
bool IsFollowingEntity { get; }
bool IsLocalPawn { get; }
Will return true if we're clientside, this entity has an owner and we're currently treating this owner as the local client. This means the player could be being spectated.
bool IsServer { get; }
bool IsWorld { get; }
Returns true if this entity is the world
Vector3 LocalPosition { get; set; }
The entity's position relative to its parent (or the world if no parent)
Rotation LocalRotation { get; set; }
The entity's local rotation
float LocalScale { get; set; }
The entity's local scale
Vector3 LocalVelocity { get; set; }
Velocity in local coords
Sandbox.MoveType MoveType { get; set; }
int NetworkIdent { get; }
Returns the entity's network id. Client only entities have a network id too!
Sandbox.Entity Owner { get; set; }
The entity that owns this entity
Sandbox.Entity Parent { get; set; }
Sandbox.PhysicsGroup PhysicsGroup { get; }
If this entity has multiple physics objects, a physics group lets you control them all as one.
Vector3 Position { get; set; }
The entity's position relative to its parent (or the world if no parent)
Sandbox.Entity Root { get; }
Gets the top most parent entity. If we don't have a parent, it might be us.
Rotation Rotation { get; set; }
The entity's world rotation
float Scale { get; set; }
The scale of the entity. 1 is normal.
Sandbox.Internal.EntityTags Tags { get; }
Accessor to add, remove and check entity tags
Transform Transform { get; set; }
Vector3 Velocity { get; set; }
The velocity in world coords.
Angles WorldAng { get; set; }
The entity's angle
BBox WorldSpaceBounds { get; }
Axis-aligned bounding box in world space.


void ActiveEnd( Sandbox.Entity ent, bool dropped )
void AddOutputEvent( string name, Sandbox.Entity.StandardOutputDelegate method, float delay = 0 )
void ApplyAbsoluteImpulse( Vector3 impulse )
void ApplyLocalImpulse( Vector3 impulse )
void BuildInput( Sandbox.InputBuilder input )
Pawns get a chance to mess with the input clientside
bool CanCarry( Sandbox.Entity carrier )
Return false if this entity objects to being picked up by this entity
void ClientSpawn()
static Sandbox.Entity Create( string name )
void Delete()
Delete this entity. You shouldn't access it anymore.
async Task DeleteAsync( float fTime )
Delete the entity in seconds
void EndTouch( Sandbox.Entity other )
An entity has stopped touching this entity
static IEnumerable<Sandbox.Entity> FindAllByName( string name )
Finds all entities by given EntityName.
static Sandbox.Entity FindByIndex( int index )
Finds an entity by its NetworkIdent
static Sandbox.Entity FindByName( string name, Sandbox.Entity fallback )
Finds entities by EntityName and returns the first found result, if one was found. This does not handle cases where there are multiple entities with a given name.
async System.Threading.Tasks.ValueTask FireOutput( string output, Sandbox.Entity activator, object value, float delay = 0 )
Try to fire this output
void FrameSimulate( Sandbox.Client cl )
Called each frame clientside only on Pawn (and anything the pawn decides to call it on)
Sandbox.Client GetClientOwner()
Get the client owner. This will ascend up the owner chain to find the actual owner.
bool IsActiveChild()
Returns true if this is its parent's active child
void OnActive()
Entity is active (clientside). This is called after spawn.
void OnAnimGraphCreated()
An anim graph has been created for this entity. You will want to set up initial AnimGraph parameters here.
void OnAnimGraphTag( string tag, Sandbox.Entity.AnimGraphTagEvent fireMode )
Called when the anim graph of this entity has a tag change. This will be called only for Status type tags.
void OnCarryDrop( Sandbox.Entity carrier )
Allow the entity to do what it wants when it's removed from the inventory
void OnCarryStart( Sandbox.Entity carrier )
Allow the entity to do what it wants when it's added to the inventory. Default behaviour is to add the target entity as a parent and stop moving.
void OnClientActive()
Called when a player becomes active
void OnKilled()
Called when there's no health left
void OnNetworkActive()
Entity has re-entered the client's visibility and has started receiving network updates again.
void OnNetworkDormant()
The entity has left the client's visibility and has stopped receiving network updates. When it becomes active again OnNetworkActive will be called.
void PhysicsClear()
Destroy any physics objects
Sandbox.Sound PlaySound( string soundName )
static T ReadForNetwork( T self, System.IO.BinaryReader reader )
void RenderDirty()
Mark render dirty
void ResetInterpolation()
Reset the interpolation. You can use this so if you move an entity it doesn't lerp to the new position
void SetParent( Sandbox.Entity entity, bool boneMerge )
Set the parent to the passed entity
void Simulate( Sandbox.Client cl )
Called when simulating as part of a player's tick. Like if it's a pawn.
void Spawn()
void StartTouch( Sandbox.Entity other )
An entity has started touching this entity
void Touch( Sandbox.Entity other )
An entity has touched this entity
static void WriteForNetwork( Sandbox.Entity self, System.IO.BinaryWriter writer )

Special Pages



Render Time: 15ms

DB GetPage 2
Generate Html 0
SaveChanges (1) 6
Render Body 0
Render Sidebar 1