Entity

Physical object in the game world

Functions

Entity:CanBeCarried()

View source »

Returns if a entity can be carried

Returns

  • bool

    Can be carried

Entity:EmitBudgetSound(sound, range, volume, pitch)

View source »

Emits a that is only networked to nearby players

Parameters

  • range int default: 660

    Radius in Source units to network the sound to

  • volume int default: 1

    Volume of the sound

  • pitch int default: 100

    Pitch of the sound

Entity:EmitQueuedSounds(sounds, delay, spacing, volume, pitch)

View source »

Emits queued sounds on an entity one by one

Parameters

  • sounds

    A table of all the sounds

  • delay int default: 0

    The delay between each sound

  • spacing int default: 0.1

    The spacing between each sound

  • volume int default: 1

    The volume of each sound

  • pitch int default: 100

    The pitch of each sound

Returns

  • int

    How long it will take to emit all the sounds

Entity:IsButton()

View source »

Returns if entity is a button

Returns

  • bool

    Is button

Entity:IsChair()

View source »

Returns if a entity is a chair

Returns

  • bool

    Is chair

Entity:IsDoor()

View source »

Returns if the entity is a door

Returns

  • bool

    Is door

Entity:IsDoorLocked()

View source »

Returns if a door is locked

Returns

  • bool

    Is locked

Entity:IsPropDoor()

View source »

Helper function that can detect if the door is a players prop door

Returns

  • bool

    Is player prop door

Entity:SetParentAttachment(attachment)

View source »

Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.

Parameters

  • attachment