Garry's Mod Wiki

Entity Callbacks

All possible callbacks for Entity:AddCallback.

See also ENTITY:CalcAbsolutePosition and ENTITY:RenderOverride, which are hooks that work on any entity (not just SENTs).

Callback Description
OnAngleChange Called whenever the entity angles change.

The arguments are:
* Entity ent - Our entity with new angles
* Angle ang - The new angles
BuildBonePositions Called whenever the bones are being built.

The arguments are:
* Entity ent - Our entity
* number numbones - The max amount of bones this entity has, same as calling Entity:GetBoneCount
PhysicsCollide Called when we collide with something else.

The arguments are:
* Entity ent - Our entity
* table data - The collision data. See CollisionData structure
BuildFlexWeights Called whenever the flexes are being built.
The arguments are:
* Entity ent - Our entity
* number numFlexes - Number of flexes in the table
* table data - A number-indexed table of flex values starting at index 0

Return the edited data table to apply any changes.