Classes
Base class
Entity
<b>Entity</b> is the base for all Classes, and all those entities share the same <b>Methods</b> and <b>Events</b> described in this page.
35 own
Static functions 11
- GetAll Returns a table containing all Entities of the class this is called on
- GetByIndex Returns a specific Entity of this class at an index
- GetCount Returns how many Entities of this class exist
- GetInheritedClasses Gets a list of all directly inherited classes from this Class created with the <a href='/docs/core-concepts/scripting/inheriting-classes'>Inheriting System</a>
- GetPairs Returns an iterator with all Entities of this class to be used with <code>pairs()</code>
- GetParentClass Gets the parent class if this Class was created with the <a href='/docs/core-concepts/scripting/inheriting-classes'>Inheriting System</a>
- Inherit Inherits this class with the <a href='/docs/core-concepts/scripting/inheriting-classes'>Inheriting System</a>
- IsChildOf Gets if this Class is child of another class if this Class was created with the <a href='/docs/core-concepts/scripting/inheriting-classes'>Inheriting System</a>
- Subscribe Subscribes to an <a href='/docs/core-concepts/scripting/events-guide'>Event</a> for all entities of this Class
- SubscribeRemote Subscribes to a custom event called from server
- Unsubscribe Unsubscribes all callbacks from this <a href='/docs/core-concepts/scripting/events-guide'>Event</a> in this Class within this Package, or only the callback passed
Functions 20
- BroadcastRemoteEvent Calls a custom remote event directly on this entity to all Players
- BroadcastRemoteInRadiusEvent Calls a custom remote event directly on this entity to all Players in a radius
- CallRemoteEvent Calls a custom remote event directly on this entity
- CallRemotePlayersEvent Calls a custom remote event directly on this entity to a list of Players
- Destroy Destroys this Entity
- FinishSpawn Finish the spawning process and send the entity to clients if it was spawned with a deferred <code>spawn_mode</code>
- GetAllValuesKeys Gets a list of all values keys
- GetClass Gets the class of this entity
- GetID Gets the universal network ID of this Entity (same on both client and server)
- GetValue Gets a <a href='/docs/core-concepts/scripting/entity-values'>Value</a> stored on this Entity at the given key
- HasAuthority Gets if the local context has authority over this Entity (true if spawned by the client, false if spawned by the server)
- IsA Recursively checks if this entity is <a href='/docs/core-concepts/scripting/inheriting-classes'>inherited</a> from a Class
- IsBeingDestroyed Returns true if this Entity is being destroyed
- IsSpawned Gets if this Entity finished spawning
- IsValid Returns true if this Entity is valid (i.e. wasn't destroyed and points to a valid Entity)
- SetSpawnMode Overrides when this Entity finishes spawning, from the Constructor of an Inherited Class
- SetValue Sets a <a href='/docs/core-concepts/scripting/entity-values'>Value</a> in this Entity
- Subscribe Subscribes to an <a href='/docs/core-concepts/scripting/events-guide'>Event</a> on this specific entity
- SubscribeRemote Subscribes to a custom event called from server on this specific entity
- Unsubscribe Unsubscribes all callbacks from this <a href='/docs/core-concepts/scripting/events-guide'>Event</a> in this Entity within this Package, or only the callback passed
Events 4
- ClassRegister Triggered when a new Class is registered with the <a href='/docs/core-concepts/scripting/inheriting-classes'>Inheriting System</a>
- Destroy Triggered when an Entity is destroyed
- Spawn Triggered when an Entity is spawned/created
- ValueChange Triggered when an Entity has a value changed with <code>:SetValue()</code>