Base class for all Character entities.
๐ชBase Class
This is a Base Class. Base Classes are abstract definitions used to share common methods and events between related child classes, thus you cannot spawn it directly.
Classes that share methods and events from this Base Class:
Character,
CharacterSimple.
๐งโ๐ปAPI Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our
GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
๐ฆ ย Functionsโ


AddSkeletalMeshAttachedโ
Spawns and attaches a SkeletalMesh to this entity, the SkeletalMesh must have the same skeleton used by this Actor's mesh, and will follow all animations from it. Uses a custom ID to be used for removing/customizing it afterwards
๐Updated Function
This method was recently updated in ver.
1.144. See the
Compatibility Versions page for more information.
my_pawn:AddSkeletalMeshAttached(id, skeletal_mesh_path, socket?, relative_location?, relative_rotation?, use_parent_bounds?, use_base_leader_pose_component?, animation_path?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | id | Required parameter | Used further for removing or applying material settings on it |
| SkeletalMesh Reference | skeletal_mesh_path | Required parameter | Path to SkeletalMesh asset to attach |
| string | socket? |
| Bone socket to attach to. Pass empty string to attach to the root component (i.e. Capsule). Pass 'root' to attach to the root bone of the main skeletal mesh component |
| Vector | relative_location? | Vector(0, 0, 0)
| Relative location |
| Rotator | relative_rotation? | Rotator(0, 0, 0)
| Relative rotation |
| boolean | use_parent_bounds? | true
| If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together |
| boolean | use_base_leader_pose_component? | true
| If true, this component will use the base leader pose component for copying its animation |
| Animation Reference | animation_path? |
| Path to Animation asset to play on the Skeletal Mesh attached |
| string | attachable_id? |
| Optionally attaches this to another attached skeletal mesh (instead of attaching to the root component) |
See also RemoveSkeletalMeshAttached.


AddStaticMeshAttachedโ
Spawns and attaches a StaticMesh to this entity in a Socket with a relative location and rotation. Uses a custom ID to be used for removing/customizing it afterwards
my_pawn:AddStaticMeshAttached(id, static_mesh_path, socket?, relative_location?, relative_rotation?, use_parent_bounds?, attachable_id?)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | id | Required parameter | Unique ID to assign to the StaticMesh |
| StaticMesh Reference | static_mesh_path | Required parameter | Path to StaticMesh asset to attach |
| string | socket? |
| Bone socket to attach to |
| Vector | relative_location? | Vector(0, 0, 0)
| Relative location |
| Rotator | relative_rotation? | Rotator(0, 0, 0)
| Relative rotation |
| boolean | use_parent_bounds? | true
| If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together |
| string | attachable_id? |
| Optionally attaches this to another attached static mesh (instead of attaching to the root component) |
See also SetStaticMeshAttachedTransform, RemoveStaticMeshAttached.

AI: Makes this Character to follow another actor
Triggers event MoveComplete
my_pawn:Follow(actor, acceptance_radius?, stop_on_succeed?, stop_on_fail?, update_rate?)
Parameters
| Type | Parameter | Default | Description |
|---|
| Base Actor | actor | Required parameter | Actor to follow |
| float | acceptance_radius? | 50
| Radius to consider success |
| boolean | stop_on_succeed? | false
| Whether to stop when reaching the target |
| boolean | stop_on_fail? | false
| Whether to stop when failed to reach the target |
| float | update_rate? | 0.25
| How often to recalculate the AI path |
See also StopMovement, MoveTo, GetMovingTo, MoveComplete.


GetAllSkeletalMeshAttachedโ
Gets all Skeletal Meshes attached to this entity
local ret = my_pawn:GetAllSkeletalMeshAttached()
Returns
| Type | Description |
|---|
| table of string | the key as the Attached ID, and the value as the Asset Path |


GetAllStaticMeshAttachedโ
Gets all Static Meshes attached to this entity
local ret = my_pawn:GetAllStaticMeshAttached()
Returns
| Type | Description |
|---|
| table of string | the key as the Attached ID, and the value as the Asset Path |


GetCapsuleSizeโ
Gets the Capsule Size
local capsule_sizes = my_pawn:GetCapsuleSize()
Returns
| Type | Description |
|---|
| table | capsule_sizes with this format |
See also SetCapsuleSize.


GetControlRotationโ
Gets the Control Rotation
local control_rotation = my_pawn:GetControlRotation()
Returns
| Type | Description |
|---|
| Rotator | control_rotation |
See also SetControlRotation.


GetFlyingModeโ
Gets if it's in Flying mode
local flying_mode = my_pawn:GetFlyingMode()
See also SetFlyingMode.


GetGravityScaleโ
Gets the gravity scale
local gravity_scale = my_pawn:GetGravityScale()
Returns
| Type | Description |
|---|
| float | gravity_scale |
See also SetGravityScale.


GetMeshโ
Gets the base Mesh Asset
local skeletal_mesh_asset = my_pawn:GetMesh()


GetMovingToโ
Gets the Moving To location
local location = my_pawn:GetMovingTo()
Returns
| Type | Description |
|---|
| Vector | the moving to location or Vector(0, 0, 0) if not moving |


GetPlayerโ
Gets the possessing Player
local possesser = my_pawn:GetPlayer()
See also Possess, UnPossess.


HideBoneโ
Hides a bone of this Character.
Check Bone Names List
my_pawn:HideBone(bone_name?)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | bone_name? |
| Bone to hide |
See also UnHideBone, IsBoneHidden.


IsBoneHiddenโ
Gets if a bone is hidden
local is_hidden = my_pawn:IsBoneHidden(bone_name)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | bone_name | Required parameter | Bone to check |
Returns
| Type | Description |
|---|
| boolean | if the bone is hidden |
See also UnHideBone, HideBone.

Triggers this Character to jump

AI: Makes this Character to walk to the Location
Triggers event MoveComplete
my_pawn:MoveTo(location, acceptance_radius?)
Parameters
| Type | Parameter | Default | Description |
|---|
| Vector | location | Required parameter | No description provided |
| float | acceptance_radius? | 50
| No description provided |
See also StopMovement, Follow, GetMovingTo, MoveComplete.


RemoveAllSkeletalMeshesAttachedโ
Removes all SkeletalMeshes attached
my_pawn:RemoveAllSkeletalMeshesAttached()


RemoveAllStaticMeshesAttachedโ
Removes all StaticMeshes attached
my_pawn:RemoveAllStaticMeshesAttached()


RemoveSkeletalMeshAttachedโ
Removes, if it exists, a SkeletalMesh from this entity given its custom ID
my_pawn:RemoveSkeletalMeshAttached(id)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | id | Required parameter | Unique ID of the SkeletalMesh to remove |
See also AddSkeletalMeshAttached.


RemoveStaticMeshAttachedโ
Removes, if it exists, a StaticMesh from this entity given its custom ID
my_pawn:RemoveStaticMeshAttached(id)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | id | Required parameter | Unique ID of the StaticMesh to remove |
See also AddStaticMeshAttached.


SetAIAvoidanceSettingsโ
AI: Configures the RVO (Reciprocal Velocity Obstacles) Avoidance system used by the AIs when moving
my_pawn:SetAIAvoidanceSettings(enabled, avoidance_consideration_radius?)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | enabled | Required parameter | Whether to enable the RVO Avoidance |
| integer | avoidance_consideration_radius? | 300
| The radius of the circle used to determine the avoidance distance |


SetBrakingSettingsโ
Sets the Movement Braking Settings of this Character
my_pawn:SetBrakingSettings(ground_friction?, braking_friction_factor?, braking_walking?, braking_flying?, braking_swimming?, braking_falling?)
Parameters
| Type | Parameter | Default | Description |
|---|
| float | ground_friction? | 2
| No description provided |
| float | braking_friction_factor? | 2
| No description provided |
| integer | braking_walking? | 96
| No description provided |
| integer | braking_flying? | 3000
| No description provided |
| integer | braking_swimming? | 10
| No description provided |
| integer | braking_falling? | 0
| No description provided |


SetCanCrouchโ
Sets if this Character is allowed to Crouch and to Prone
my_pawn:SetCanCrouch(can_crouch)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | can_crouch | Required parameter | No description provided |


SetCanJumpโ
Sets if this Character is allowed to Jump
my_pawn:SetCanJump(can_jump)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | can_jump | Required parameter | No description provided |


SetCapsuleSizeโ
Sets this Character's Capsule size (will affect Camera location and Character's collision)
๐Updated Function
This method was recently updated in ver.
1.144. See the
Compatibility Versions page for more information.
my_pawn:SetCapsuleSize(radius?, half_height?, crouched_half_height?)
Parameters
| Type | Parameter | Default | Description |
|---|
| integer | radius? | 0
| Pass 0 to auto calculate the radius based on the mesh bounds |
| integer | half_height? | 0
| Pass 0 to auto calculate the half height based on the mesh bounds |
| integer | crouched_half_height? | 0
| Pass 0 to auto calculate the crouched half height based on the mesh bounds |
See also GetCapsuleSize.


SetControlRotationโ
Sets the Control Rotation
my_pawn:SetControlRotation(control_rotation)
Parameters
| Type | Parameter | Default | Description |
|---|
| Rotator | control_rotation | Required parameter | No description provided |
See also GetControlRotation.


SetFlyingModeโ
Sets the Flying Mode
my_pawn:SetFlyingMode(flying_mode)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | flying_mode | Required parameter | No description provided |
See also GetFlyingMode.


SetGravityScaleโ
Changes the Gravity Scale of this Character (can be negative)
my_pawn:SetGravityScale(gravity_scale)
Parameters
| Type | Parameter | Default | Description |
|---|
| float | gravity_scale | Required parameter | No description provided |
See also GetGravityScale.


SetHitReactionEnabledโ
Sets if the character will react to damage by applying small dynamic ragdoll effect to local bones damaged
my_pawn:SetHitReactionEnabled(is_enabled)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | is_enabled | Required parameter | No description provided |


SetJumpZVelocityโ
Sets the velocity of the jump
my_pawn:SetJumpZVelocity(jump_z_velocity)
Parameters
| Type | Parameter | Default | Description |
|---|
| integer | jump_z_velocity | Required parameter | Default is 450 |


SetMeshSettingsโ
Configures the mesh attachment settings and visibility
my_pawn:SetMeshSettings(relative_location?, relative_rotation?, is_visible?)
Parameters
| Type | Parameter | Default | Description |
|---|
| Vector | relative_location? | Vector(0, 0, 0)
| No description provided |
| Rotator | relative_rotation? | Rotator(0, -90, 0)
| No description provided |
| bool | is_visible? | true
| Whether the mesh is visible (useful for using retargeters using child meshes) |


SetRagdollOnDeathEnabledโ
Sets if the character will enter ragdoll mode when it dies. You can set it to false to apply custom Death animations
my_pawn:SetRagdollOnDeathEnabled(is_enabled)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | is_enabled | Required parameter | No description provided |

Sets a Static Mesh Attached location and rotation
my_pawn:SetStaticMeshAttachedTransform(id, relative_location, relative_rotation)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | id | Required parameter | Unique ID of the StaticMesh set with AddStaticMeshAttached |
| Vector | relative_location | Required parameter | New relative location |
| Rotator | relative_rotation | Required parameter | New relative rotation |
See also AddStaticMeshAttached.


StopAnimationโ
Stops an Animation Montage on this character
my_pawn:StopAnimation(animation_asset)
Parameters
| Type | Parameter | Default | Description |
|---|
| Animation Reference | animation_asset | Required parameter | No description provided |


StopMovementโ
AI: Stops the movement, optionally zeroing the velocity as well (stops even for non AI)
Triggers event MoveComplete
my_pawn:StopMovement(stops_velocity?)
Parameters
| Type | Parameter | Default | Description |
|---|
| boolean | stops_velocity? | false
| Also stops the Pawn's current velocity |
See also Follow, MoveTo, GetMovingTo, MoveComplete.


UnHideBoneโ
UnHide a bone of this Character.
Check Bone Names List
my_pawn:UnHideBone(bone_name)
Parameters
| Type | Parameter | Default | Description |
|---|
| string | bone_name | Required parameter | Bone to unhide |
See also HideBone, IsBoneHidden.
๐ย Eventsโ

AnimationBeginNotifyโ
When an Animation Montage Notify begins
Pawn.Subscribe("AnimationBeginNotify", function(self, notify_name, animation_name, trigger_begin_time, trigger_end_time)
end)
Arguments
| Type | Argument | Description |
|---|
| Character | self | No description provided |
| string | notify_name | No description provided |
| string | animation_name | No description provided |
| number | trigger_begin_time | No description provided |
| number | trigger_end_time | No description provided |

AnimationEndNotifyโ
When an Animation Montage Notify ends
Pawn.Subscribe("AnimationEndNotify", function(self, notify_name, animation_name, trigger_begin_time, trigger_end_time)
end)
Arguments
| Type | Argument | Description |
|---|
| Character | self | No description provided |
| string | notify_name | No description provided |
| string | animation_name | No description provided |
| number | trigger_begin_time | No description provided |
| number | trigger_end_time | No description provided |

MoveCompleteโ
Called when AI reaches its destination, or when it fails
Pawn.Subscribe("MoveComplete", function(self, succeeded)
end)
Arguments
| Type | Argument | Description |
|---|
| Base Pawn | self | No description provided |
| boolean | succeeded | No description provided |
See also StopMovement, MoveTo, Follow, GetMovingTo.

Possessโ
When Character is possessed by a Player
Pawn.Subscribe("Possess", function(self, player)
end)
Arguments
| Type | Argument | Description |
|---|
| Base Pawn | self | No description provided |
| Player | player | No description provided |
See also UnPossess, GetPlayer.

UnPossessโ
When Character is unpossessed by a Player
Pawn.Subscribe("UnPossess", function(self, old_player)
end)
Arguments
| Type | Argument | Description |
|---|
| Base Pawn | self | No description provided |
| Player | old_player | No description provided |
See also Possess, GetPlayer.