Skip to main content
Version: bleeding-edge ๐Ÿฉธ

Base Actor

An Actor is an object which can be spawned and destroyed through Lua.
Actors support 3D transformations such as translation (location), rotation, and scale.

An Actor is the base for several entities, and all those entities share the same Methods and Events described in this page.

๐Ÿ‘ชBase Class
This is a Base Class, an abstract definition that shares common methods and events with it's child classes. You cannot spawn it, and you cannot call anything on the Base Class name itself. Use any class that inherits it.

Classes that share methods and events from this Base Class: Billboard, Blueprint, Cable, Character, CharacterSimple, Decal, Gizmo, Grenade, InstancedStaticMesh, Light, Melee, Particle, Prop, SceneCapture, StaticMesh, Sound, TextRender, Text3D, Trigger, VehicleWheeled, VehicleWater, Weapon, Widget3D.

๐Ÿฆ ย Functionsโ€‹

caution

Some of the following methods may not work on certain Actor classes.

ReturnsNameDescription
AddActorTagAdds an Unreal Actor Tag to this Actor
AddAngularImpulseAdd an angular impulse to this Actor. Good for one time instant burst
AddImpulseAdd an impulse to this Actor. Good for one time instant burst
booleanAttachToAttaches this Actor to any other Actor, optionally at a specific bone
DetachDetaches this Actor from AttachedTo Actor
table of stringGetActorTagsGets all Unreal Actor Tags on this Actor
VectorGetAngularForceGets this Actor's angular force (set by SetAngularForce())
floatGetAngularVelocityReturns the angular velocity of this Actor
table of Base ActorGetAttachedEntitiesGets all Actors attached to this Actor
Base Actor or nilGetAttachedToGets the Actor this Actor is attached to
stringGetAttachedToSocketGets the bone or socket name this Actor is attached to
tableGetBoundsGets this Actor's bounds, useful to know its size in the world
CollisionTypeGetCollisionGets this Actor's collision type
integerGetDimensionGets this Actor's dimension
floatGetDistanceFromCameraGets the distance of this Actor from the Camera
VectorGetForceGets this Actor's force (set by SetForce())
floatGetLifeSpanGets the time (in seconds) left before this Actor is destroyed
VectorGetLocationGets this Actor's location in the game world
floatGetMassReturns the mass of this Actor
Player or nilGetNetworkAuthorityGets this Actor's Network Authority Player
VectorGetRelativeLocationGets this Actor's Relative Location if it's attached
RotatorGetRelativeRotationGets this Actor's Relative Rotation if it's attached
RotatorGetRotationGets this Actor's angle in the game world
VectorGetScaleGets this Actor's scale
floatGetScreenPercentageGets the percentage of this Actor size in the screen
tableGetSocketTransformGets a Socket Transform in world space given a bone or socket name
VectorGetVelocityGets this Actor's current velocity
booleanHasNetworkAuthorityReturns true if the local Player is currently the Network Authority of this Actor
booleanIsGravityEnabledReturns true if gravity is enabled on this Actor
booleanIsInWaterReturns true if this Actor is in water
booleanIsNetworkDistributedReturns true if this Actor is currently network distributed
booleanIsVisibleReturns true if this Actor is visible
RemoveActorTagRemoves an Unreal Actor Tag from this Actor
RotateToSmoothly rotates this actor to an angle over a certain time
SetAngularForceAdds a permanent angular force to this Actor, set to Vector(0, 0, 0) to cancel
SetCastShadowSets this Actor's to cast shadows or not
SetCollisionSets this Actor's collision type
SetDimensionSets this Actor's Dimension. Actors only see and interact with entities in the same Dimension
SetDistanceOptimizationMultiplierSets this Actor's distance optimization multiplier
SetForceAdds a permanent force to this Actor, set to Vector(0, 0, 0) to cancel
SetGravityEnabledSets whether gravity is enabled on this Actor
SetHighlightEnabledSets whether the highlight is enabled on this Actor, and which highlight index to use
SetLifeSpanSets the time (in seconds) before this Actor is destroyed. After this time has passed, the actor will be automatically destroyed.
SetLocationSets this Actor's location in the game world
SetNetworkAuthoritySets the Player to have network authority over this Actor
SetNetworkAuthorityAutoDistributedSets if this Actor will auto distribute the network authority between players
SetOutlineEnabledSets whether the outline is enabled on this Actor, and which outline index to use
SetRelativeLocationSets this Actor's relative location in local space (only if this actor is attached)
SetRelativeRotationSets this Actor's relative rotation in local space (only if this actor is attached)
SetRenderCullDistanceSets this Actor's render cull distance
SetRotationSets this Actor's rotation in the game world
SetScaleSets this Actor's scale
SetVisibilitySets whether the actor is visible or not
TranslateToSmoothly moves this actor to a location over a certain time
booleanWasRecentlyRenderedGets if this Actor was recently rendered on screen

Optimal

AddActorTagโ€‹

Adds an Unreal Actor Tag to this Actor
my_actor:AddActorTag(tag)

Parameters

TypeParameterDefaultDescription
stringtag Required parameter The tag to add

See also RemoveActorTag, GetActorTags.


Optimal

AddAngularImpulseโ€‹

Add an angular impulse to this Actor. Good for one time instant burst
my_actor:AddAngularImpulse(angular_impulse, velocity_change?)

Parameters

TypeParameterDefaultDescription
Vectorangular_impulse Required parameter Magnitude and direction of impulse to apply. Direction is axis of rotation. In Radians
booleanvelocity_change?false
Whether to ignore mass

Optimal

AddImpulseโ€‹

Add an impulse to this Actor. Good for one time instant burst
my_actor:AddImpulse(impulse, velocity_change?)

Parameters

TypeParameterDefaultDescription
Vectorimpulse Required parameter Magnitude and direction of impulse to apply
booleanvelocity_change?false
Whether to ignore mass

Moderate

AttachToโ€‹

Attaches this Actor to any other Actor, optionally at a specific bone
local attached_successfully = my_actor:AttachTo(other, attachment_rule?, bone_name?, lifespan_when_detached?, use_absolute_rotation?)

Parameters

TypeParameterDefaultDescription
Base Actorother Required parameter Other actor to attach
AttachmentRuleattachment_rule?AttachmentRule.SnapToTarget
How to attach
stringbone_name?
Which bone to attach to. If empty it will be attached to the Actor, otherwise to the Mesh at the bone/socket
floatlifespan_when_detached?-1
Seconds before destroying this Actor when detached, setting it to 0 will automatically destroy this actor when detached, setting it to 10 will destroy this after 10 seconds when detached
booleanuse_absolute_rotation?false
Whether to force attached object to use absolute rotation (will not follow parent)

Returns

TypeDescription
booleanif it was attached successfully

Optimal

Detachโ€‹

Detaches this Actor from AttachedTo Actor
my_actor:Detach()

Moderate

GetActorTagsโ€‹

Gets all Unreal Actor Tags on this Actor
local ret = my_actor:GetActorTags()

Returns

TypeDescription
table of stringAll Unreal Actor Tags on this Actor

See also AddActorTag, RemoveActorTag.


Optimal

GetAngularForceโ€‹

Gets this Actor's angular force (set by SetAngularForce())
local angular_force = my_actor:GetAngularForce()

Returns

TypeDescription
VectorThis Actor's angular force

See also SetAngularForce.


Optimal

GetAngularVelocityโ€‹

Returns the angular velocity of this Actor
local angular_velocity = my_actor:GetAngularVelocity()

Returns

TypeDescription
floatAngular velocity of this Actor

Moderate

GetAttachedEntitiesโ€‹

Gets all Actors attached to this Actor
local ret = my_actor:GetAttachedEntities(recursively?)

Parameters

TypeParameterDefaultDescription
booleanrecursively?false
Also returns the Actors attached to the attached Actors

Returns

TypeDescription
table of Base ActorAll Actors attached to this Actor

Optimal

GetAttachedToโ€‹

Gets the Actor this Actor is attached to
local ret = my_actor:GetAttachedTo()

Returns

TypeDescription
Base Actor or nilActor this Actor is attached to

Optimal

GetAttachedToSocketโ€‹

Gets the bone or socket name this Actor is attached to
local ret = my_actor:GetAttachedToSocket()

Returns

TypeDescription
stringThe bone or socket name, or an empty string if not attached to a bone

Moderate

GetBoundsโ€‹

Gets this Actor's bounds, useful to know its size in the world
local ret = my_actor:GetBounds()

Returns

TypeDescription
tableThis Actor's bounds with this format

Optimal

GetCollisionโ€‹

Gets this Actor's collision type
local collision_type = my_actor:GetCollision()

Returns

TypeDescription
CollisionTypeThis Actor's collision type

See also SetCollision.


Optimal

GetDimensionโ€‹

Gets this Actor's dimension
local dimension = my_actor:GetDimension()

Returns

TypeDescription
integerThis Actor's dimension

See also SetDimension, DimensionChange.


Optimal

GetDistanceFromCameraโ€‹

Gets the distance of this Actor from the Camera
local ret = my_actor:GetDistanceFromCamera()

Returns

TypeDescription
floatDistance of this Actor from the Camera

Optimal

GetForceโ€‹

Gets this Actor's force (set by SetForce())
local force = my_actor:GetForce()

Returns

TypeDescription
VectorThis Actor's force

See also SetForce.


Optimal

GetLifeSpanโ€‹

Gets the time (in seconds) left before this Actor is destroyed
local ret = my_actor:GetLifeSpan()

Returns

TypeDescription
floatSeconds before being destroyed

See also SetLifeSpan.


Optimal

GetLocationโ€‹

Gets this Actor's location in the game world
local location = my_actor:GetLocation()

Returns

TypeDescription
VectorThis Actor's location in the game world

See also SetLocation.


Optimal

GetMassโ€‹

Returns the mass of this Actor
local mass = my_actor:GetMass()

Returns

TypeDescription
floatMass of this Actor

Optimal

GetNetworkAuthorityโ€‹

Gets this Actor's Network Authority Player
local ret = my_actor:GetNetworkAuthority()

Returns

TypeDescription
Player or nilThis Actor's Network Authority Player

See also SetNetworkAuthority.


Optimal

GetRelativeLocationโ€‹

Gets this Actor's Relative Location if it's attached
local relative_location = my_actor:GetRelativeLocation()

Returns

TypeDescription
VectorThis Actor's Relative Location if it's attached

See also SetRelativeLocation.


Optimal

GetRelativeRotationโ€‹

Gets this Actor's Relative Rotation if it's attached
local relative_rotation = my_actor:GetRelativeRotation()

Returns

TypeDescription
RotatorThis Actor's Relative Rotation if it's attached

See also SetRelativeRotation.


Optimal

GetRotationโ€‹

Gets this Actor's angle in the game world
local rotation = my_actor:GetRotation()

Returns

TypeDescription
RotatorThis Actor's angle in the game world

See also SetRotation.


Optimal

GetScaleโ€‹

Gets this Actor's scale
local scale = my_actor:GetScale()

Returns

TypeDescription
VectorThis Actor's scale

See also SetScale.


Optimal

GetScreenPercentageโ€‹

Gets the percentage of this Actor size in the screen
local ret = my_actor:GetScreenPercentage()

Returns

TypeDescription
floatPercentage of this Actor size in the screen

Moderate

GetSocketTransformโ€‹

Gets a Socket Transform in world space given a bone or socket name
local ret = my_actor:GetSocketTransform(socket_name, attachable_id?)

Parameters

TypeParameterDefaultDescription
stringsocket_name Required parameter Name of the socket
stringattachable_id?
The attachable ID (set with AddSkeletalMeshAttached or AddStaticMeshAttached) to read the Socket from. Pass empty to read from the main mesh

Returns

TypeDescription
tableSocket Transform in world space given a bone or socket name with this format

Optimal

GetVelocityโ€‹

Gets this Actor's current velocity
local velocity = my_actor:GetVelocity()

Returns

TypeDescription
VectorThis Actor's current velocity

Optimal

HasNetworkAuthorityโ€‹

Returns true if the local Player is currently the Network Authority of this Actor
local has_network_authority = my_actor:HasNetworkAuthority()

Returns

TypeDescription
booleanWhether the local Player is currently the Network Authority of this Actor

Optimal

IsGravityEnabledโ€‹

Returns true if gravity is enabled on this Actor
local gravity_enabled = my_actor:IsGravityEnabled()

Returns

TypeDescription
booleanWhether gravity is enabled on this Actor

See also SetGravityEnabled.


Optimal

IsInWaterโ€‹

Returns true if this Actor is in water. Only Actors that simulate physics work for this function, such as Prop, Vehicle, Pickables and Character only.
local in_water = my_actor:IsInWater()

Returns

TypeDescription
booleanWhether this Actor is in water

Optimal

IsNetworkDistributedโ€‹

Returns true if this Actor is currently network distributed. Only actors being network distributed can have their network authority set
Entities have NetworkDistributed automatically disabled when: Attached, Possessed, Grabbed, Picked Up or Driving
local ret = my_actor:IsNetworkDistributed()

Returns

TypeDescription
booleanWhether this Actor is currently network distributed

See also SetNetworkAuthorityAutoDistributed, SetNetworkAuthority.


Optimal

IsVisibleโ€‹

Returns true if this Actor is visible
local is_visible = my_actor:IsVisible()

Returns

TypeDescription
booleanWhether this Actor is visible

Optimal

RemoveActorTagโ€‹

Removes an Unreal Actor Tag from this Actor
my_actor:RemoveActorTag(tag)

Parameters

TypeParameterDefaultDescription
stringtag Required parameter The tag to remove

See also AddActorTag, GetActorTags.


Optimal

RotateToโ€‹

Smoothly rotates this actor to an angle over a certain time
my_actor:RotateTo(rotation, time, exp?)

Parameters

TypeParameterDefaultDescription
Rotatorrotation Required parameter The target rotation
floattime Required parameter Time to interpolate from current location to target location
floatexp?0
Exponent used to smooth interpolation. Use 0 for linear movement

Optimal

SetAngularForceโ€‹

Adds a permanent angular force to this Actor, set to Vector(0, 0, 0) to cancel
my_actor:SetAngularForce(angular_force)

Parameters

TypeParameterDefaultDescription
Vectorangular_force Required parameter The angular force to apply every frame

See also GetAngularForce.


Moderate

SetCastShadowโ€‹

Sets this Actor's to cast shadows or not
my_actor:SetCastShadow(cast_shadow)

Parameters

TypeParameterDefaultDescription
booleancast_shadow Required parameter The new to cast shadows or not

Optimal

SetCollisionโ€‹

Sets this Actor's collision type
my_actor:SetCollision(collision_type)

Parameters

TypeParameterDefaultDescription
CollisionTypecollision_type Required parameter The new collision type

See also GetCollision.


Moderate

SetDimensionโ€‹

Sets this Actor's Dimension. Actors only see and interact with entities in the same Dimension
my_actor:SetDimension(dimension)

Parameters

TypeParameterDefaultDescription
integerdimension Required parameter The new Dimension

See also GetDimension, DimensionChange.


Optimal

SetDistanceOptimizationMultiplierโ€‹

Sets this Actor's distance optimization multiplier.
A value of 0 disables optimization. Values under 1 decrease the effect, while values over 1 increase it
my_actor:SetDistanceOptimizationMultiplier(multiplier)

Parameters

TypeParameterDefaultDescription
floatmultiplier Required parameter The new distance optimization multiplier

Optimal

SetForceโ€‹

Adds a permanent force to this Actor, set to Vector(0, 0, 0) to cancel
my_actor:SetForce(force, is_local?)

Parameters

TypeParameterDefaultDescription
Vectorforce Required parameter The force to apply every frame
booleanis_local?true
Whether to apply the force in local space

See also GetForce.


Optimal

SetGravityEnabledโ€‹

Sets whether gravity is enabled on this Actor
my_actor:SetGravityEnabled(gravity_enabled)

Parameters

TypeParameterDefaultDescription
booleangravity_enabled Required parameter Whether gravity is enabled on this Actor

See also IsGravityEnabled.


Optimal

SetHighlightEnabledโ€‹

Sets whether the highlight is enabled on this Actor, and which highlight index to use. This will apply the highlight on every attached entity too
my_actor:SetHighlightEnabled(is_enabled, index?)

Parameters

TypeParameterDefaultDescription
booleanis_enabled Required parameter Whether the highlight is enabled
integerindex?0
Index to use (should be 0, 1 or 2)

See also Client.SetHighlightColor().


Optimal

SetLifeSpanโ€‹

Sets the time (in seconds) before this Actor is destroyed. After this time has passed, the actor will be automatically destroyed.
my_actor:SetLifeSpan(seconds)

Parameters

TypeParameterDefaultDescription
floatseconds Required parameter Seconds before being destroyed

See also GetLifeSpan.


Moderate

SetLocationโ€‹

Sets this Actor's location in the game world
my_actor:SetLocation(location)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter The new location in the game world

See also GetLocation.


Moderate

SetNetworkAuthorityโ€‹

Sets the Player to have network authority over this Actor. This Player will be manually assigned to handle this Actor's physics and share its location with other clients. The authority assignment will still be overridden by the game automatically

Please refer to Network Authority for more information
my_actor:SetNetworkAuthority(player?)

Parameters

TypeParameterDefaultDescription
Playerplayer?nil
New player which will assume the Network Authority of this Actor

See also SetNetworkAuthorityAutoDistributed, IsNetworkDistributed, GetNetworkAuthority, NetworkAuthorityChange.


Optimal

SetNetworkAuthorityAutoDistributedโ€‹

Sets if this Actor will auto distribute the network authority between players when idle

Please refer to Network Authority for more information
my_actor:SetNetworkAuthorityAutoDistributed(auto_distribute)

Parameters

TypeParameterDefaultDescription
booleanauto_distribute Required parameter If this Actor will be auto network distributed

See also SetNetworkAuthority, IsNetworkDistributed.


Optimal

SetOutlineEnabledโ€‹

Sets whether the outline is enabled on this Actor, and which outline index to use. This will apply the outline on every attached entity too
my_actor:SetOutlineEnabled(is_enabled, index?)

Parameters

TypeParameterDefaultDescription
booleanis_enabled Required parameter Whether the outline is enabled
integerindex?0
Index to use (should be 0, 1 or 2)

See also Client.SetOutlineColor().


Moderate

SetRelativeLocationโ€‹

Sets this Actor's relative location in local space (only if this actor is attached)
my_actor:SetRelativeLocation(relative_location)

Parameters

TypeParameterDefaultDescription
Vectorrelative_location Required parameter The new relative location in local space

See also GetRelativeLocation.


Moderate

SetRelativeRotationโ€‹

Sets this Actor's relative rotation in local space (only if this actor is attached)
my_actor:SetRelativeRotation(relative_rotation)

Parameters

TypeParameterDefaultDescription
Rotatorrelative_rotation Required parameter The new relative rotation in local space

See also GetRelativeRotation.


Moderate

SetRenderCullDistanceโ€‹

Sets this Actor's render cull distance. Note: this will only affect the rendering distance, the entity will still be spawned and synced normally regardless of this distance
my_actor:SetRenderCullDistance(max_distance)

Parameters

TypeParameterDefaultDescription
integermax_distance Required parameter The new render cull distance

Moderate

SetRotationโ€‹

Sets this Actor's rotation in the game world
my_actor:SetRotation(rotation)

Parameters

TypeParameterDefaultDescription
Rotatorrotation Required parameter The new rotation in the game world

See also GetRotation.


Slow

SetScaleโ€‹

Sets this Actor's scale
my_actor:SetScale(scale)

Parameters

TypeParameterDefaultDescription
Vectorscale Required parameter The new scale

See also GetScale.


Optimal

SetVisibilityโ€‹

Sets whether the actor is visible or not
my_actor:SetVisibility(is_visible)

Parameters

TypeParameterDefaultDescription
booleanis_visible Required parameter Whether the actor is visible or not

Optimal

TranslateToโ€‹

Smoothly moves this actor to a location over a certain time
my_actor:TranslateTo(location, time, exp?)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter The target location
floattime Required parameter Time to interpolate from current location to target location
floatexp?0
Exponent used to smooth interpolation. Use 0 for linear movement

Moderate

WasRecentlyRenderedโ€‹

Gets if this Actor was recently rendered on screen
local ret = my_actor:WasRecentlyRendered()

Returns

TypeDescription
booleanWhether this Actor was recently rendered on screen

๐Ÿš€ย Eventsโ€‹

NameDescription
DimensionChangeTriggered when an Actor changes its dimension
EnterWaterTriggered when an Actor enters a water body
LeaveWaterTriggered when an Actor leaves a water body
NetworkAuthorityChangeTriggered when an Actor changes its network authority Player
NetworkAuthorityChangeTriggered when the local Player gets/loses network authority over this actor

DimensionChangeโ€‹

Triggered when an Actor changes its dimension
<AnyActorClass>.Subscribe("DimensionChange", function(self, old_dimension, new_dimension)
-- DimensionChange was called
end)

Arguments

TypeArgumentDescription
Base ActorselfThe Actor that triggered the event
integerold_dimensionThe previous dimension
integernew_dimensionThe new dimension

See also SetDimension, GetDimension.


EnterWaterโ€‹

Triggered when an Actor enters a water body. Only Actors that simulate physics trigger this event, such as Prop, Vehicle, Pickables and Character only.
<AnyActorClass>.Subscribe("EnterWater", function(self)
-- EnterWater was called
end)

Arguments

TypeArgumentDescription
Base ActorselfThe Actor that triggered the event

See also IsInWater.


LeaveWaterโ€‹

Triggered when an Actor leaves a water body. Only Actors that simulate physics trigger this event, such as Prop, Vehicle, Pickables and Character only.
<AnyActorClass>.Subscribe("LeaveWater", function(self)
-- LeaveWater was called
end)

Arguments

TypeArgumentDescription
Base ActorselfThe Actor that triggered the event

See also IsInWater.


NetworkAuthorityChangeโ€‹

Triggered when an Actor changes its network authority Player
<AnyActorClass>.Subscribe("NetworkAuthorityChange", function(self, old_network_authority, new_network_authority)
-- NetworkAuthorityChange was called
end)

Arguments

TypeArgumentDescription
Base ActorselfThe Actor that triggered the event
Player or nilold_network_authorityThe old Network Authority Player, if any
Player or nilnew_network_authorityThe new Network Authority Player, if any

See also SetNetworkAuthority, GetNetworkAuthority.


NetworkAuthorityChangeโ€‹

Triggered when the local Player gets/loses network authority over this actor
<AnyActorClass>.Subscribe("NetworkAuthorityChange", function(self, is_network_authority)
-- NetworkAuthorityChange was called
end)

Arguments

TypeArgumentDescription
Base ActorselfThe Actor that triggered the event
booleanis_network_authorityWhether the local Player is now the Network Authority of this Actor

See also SetNetworkAuthority, GetNetworkAuthority.