Base Pawn
Base class for all Character entities.
Classes that share methods and events from this Base Class: Character, CharacterSimple.
๐ฆ ย Functionsโ
| Returns | Name | Description | |
|---|---|---|---|
AddSkeletalMeshAttached | Attaches a Skeletal Mesh as master pose to this entity | ||
AddStaticMeshAttached | Attaches a Static Mesh to this entity | ||
Follow | AI: Makes this Character to follow another actor | ||
| table of string | GetAllSkeletalMeshAttached | Gets all Skeletal Meshes attached to this entity | |
| table of string | GetAllStaticMeshAttached | Gets all Static Meshes attached to this entity | |
| table | GetCapsuleSize | Gets the Capsule Size | |
| Rotator | GetControlRotation | Gets the Control Rotation | |
| boolean | GetFlyingMode | Gets if it's in Flying mode | |
| float | GetGravityScale | Gets the gravity scale | |
| SkeletalMesh Reference | GetMesh | Gets the base Mesh Asset | |
| Vector | GetMovingTo | Gets the Moving To location | |
| Player or nil | GetPlayer | Gets the possessing Player | |
HideBone | Hides a bone of this Character | ||
| boolean | IsBoneHidden | Gets if a bone is hidden | |
Jump | Triggers this Character to jump | ||
MoveTo | AI: Makes this Character to walk to the Location | ||
RemoveAllSkeletalMeshesAttached | Removes all SkeletalMeshes attached | ||
RemoveAllStaticMeshesAttached | Removes all StaticMeshes attached | ||
RemoveSkeletalMeshAttached | Removes, if it exists, a SkeletalMesh from this entity given its custom ID | ||
RemoveStaticMeshAttached | Removes, if it exists, a StaticMesh from this entity given its custom ID | ||
SetAIAvoidanceSettings | AI: Configures the RVO (Reciprocal Velocity Obstacles) Avoidance system used by the AIs when moving | ||
SetBrakingSettings | Sets the Movement Braking Settings of this Character | ||
SetCanCrouch | Sets if this Character is allowed to Crouch and to Prone | ||
SetCanJump | Sets if this Character is allowed to Jump | ||
SetCapsuleSize | Sets this Character's Capsule size | ||
SetControlRotation | Sets the Control Rotation | ||
SetFlyingMode | Sets the Flying Mode | ||
SetGravityScale | Changes the Gravity Scale | ||
SetHitReactionEnabled | Sets if the character will react to damage by applying small dynamic ragdoll effect to local bones damaged | ||
SetJumpZVelocity | Sets the velocity of the jump | ||
SetMeshSettings | Configures the mesh attachment settings and visibility | ||
SetRagdollOnDeathEnabled | Sets if the character will enter ragdoll mode when it dies. You can set it to false to apply custom Death animations | ||
SetStaticMeshAttachedTransform | Sets a Static Mesh Attached location and rotation | ||
StopAnimation | Stops an Animation Montage on this character | ||
StopMovement | AI: Stops the movement, optionally zeroing the velocity as well | ||
UnHideBone | UnHide a bone of this Character |
Slow

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
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.
Slow

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.
Optimal

Followโ
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.
Moderate

GetAllSkeletalMeshAttachedโ
Gets all Skeletal Meshes attached to this entity
local ret = my_pawn:GetAllSkeletalMeshAttached()
Moderate

GetAllStaticMeshAttachedโ
Gets all Static Meshes attached to this entity
local ret = my_pawn:GetAllStaticMeshAttached()
Optimal

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

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

GetFlyingModeโ
Gets if it's in Flying mode
local flying_mode = my_pawn:GetFlyingMode()
Returns
| Type | Description |
|---|---|
| boolean | flying_mode |
See also SetFlyingMode.
Optimal

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

GetMeshโ
Gets the base Mesh Asset
local skeletal_mesh_asset = my_pawn:GetMesh()
Returns
| Type | Description |
|---|---|
| SkeletalMesh Reference | skeletal_mesh_asset |
Optimal

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 |
Optimal

GetPlayerโ
Gets the possessing Player
local possesser = my_pawn:GetPlayer()
Optimal

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

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.
Optimal

Jumpโ
Triggers this Character to jump
my_pawn:Jump()
Optimal

MoveToโ
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.
Optimal

RemoveAllSkeletalMeshesAttachedโ
Removes all SkeletalMeshes attached
my_pawn:RemoveAllSkeletalMeshesAttached()
Optimal

RemoveAllStaticMeshesAttachedโ
Removes all StaticMeshes attached
my_pawn:RemoveAllStaticMeshesAttached()
Optimal

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.
Optimal

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.
Optimal

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 |
Optimal

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 |
Optimal

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 |
Optimal

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 |
Optimal

SetCapsuleSizeโ
Sets this Character's Capsule size (will affect Camera location and Character's collision)
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.
Optimal

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.
Optimal

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.
Optimal

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.
Optimal

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 |
Moderate

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 |
Optimal

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) |
Optimal

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 |
Moderate

SetStaticMeshAttachedTransformโ
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.
Optimal

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 |
Optimal

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.
Optimal

UnHideBoneโ
UnHide a bone of this Character
my_pawn:UnHideBone(bone_name)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | bone_name | Required parameter | Bone to unhide |
See also HideBone, IsBoneHidden.
๐ย Eventsโ
| Name | Description | |
|---|---|---|
AnimationBeginNotify | When an Animation Montage Notify begins | |
AnimationEndNotify | When an Animation Montage Notify ends | |
MoveComplete | Called when AI reaches its destination, or when it fails | |
Possess | When Character is possessed by a Player | |
UnPossess | When Character is unpossessed by a Player |

AnimationBeginNotifyโ
When an Animation Montage Notify begins
<AnyPawnClass>.Subscribe("AnimationBeginNotify", function(self, notify_name, animation_name, trigger_begin_time, trigger_end_time)
-- AnimationBeginNotify was called
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
<AnyPawnClass>.Subscribe("AnimationEndNotify", function(self, notify_name, animation_name, trigger_begin_time, trigger_end_time)
-- AnimationEndNotify was called
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
<AnyPawnClass>.Subscribe("MoveComplete", function(self, succeeded)
-- MoveComplete was called
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
<AnyPawnClass>.Subscribe("Possess", function(self, player)
-- Possess was called
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
<AnyPawnClass>.Subscribe("UnPossess", function(self, old_player)
-- UnPossess was called
end)


