Ir para o conteúdo principal
Version: latest - a1.73.x ⚖️

🧑 Character

Characters represents Actors which can be possessed, can move and interact with world. They are the default Skeletal Mesh Character built for nanos world.


💂Authority
This class can only be spawned on 🟦 Server side.
👪Inheritance
This class shares methods and events from , , , , .
🧑‍💻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!

Characters are Skeletal Meshes using Unreal's Mannequin Skeletal, with animations and interactivity already natively integrated into nanos world. It is possible to import any Skeletal Mesh (which uses Unreal's Mannequin Skeletal) to this Character.

🎒 Examples

Server/Index.lua
-- The following examples are using all Skeletal Meshes which we currently have for examples, including the officials Woman, Man and Mannequin:
local woman = Character(Vector(100, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_Female")
local man = Character(Vector(200, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_Male")
local mannequin = Character(Vector(300, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_Mannequin")
local mannequin_female = Character(Vector(400, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_Mannequin_Female")

local post_apocalyptic = Character(Vector(400, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_PostApocalyptic")
local classic_male = Character(Vector(500, 0, 100), Rotator(0, 0, 0), "nanos-world::SK_ClassicMale")

-- Adds Clothes to Man. Note: some Meshes only supports a specific Mesh (Men/Woman)
man:AddSkeletalMeshAttached("shirt", "nanos-world::SK_Shirt") -- Men only
man:AddSkeletalMeshAttached("shirt", "nanos-world::SK_Underwear") -- Men only
man:AddSkeletalMeshAttached("pants", "nanos-world::SK_Pants") -- Men only
man:AddSkeletalMeshAttached("shoes", "nanos-world::SK_Shoes_01")
man:AddSkeletalMeshAttached("tie", "nanos-world::SK_Tie")

-- Adds Clothes to Woman
woman:AddSkeletalMeshAttached("full", "nanos-world::SK_CasualSet") -- Woman only
woman:AddSkeletalMeshAttached("shoes", "nanos-world::SK_Sneakers")

-- Adds Beard to Man
man:AddStaticMeshAttached("beard", "nanos-world::SM_Beard_Extra", "beard")
man:AddStaticMeshAttached("beard", "nanos-world::SM_Beard_Middle", "beard")
man:AddStaticMeshAttached("beard", "nanos-world::SM_Beard_Mustache_01", "beard")
man:AddStaticMeshAttached("beard", "nanos-world::SM_Beard_Mustache_02", "beard")
man:AddStaticMeshAttached("beard", "nanos-world::SM_Beard_Side", "beard")

-- Adds Hair to Man
man:AddStaticMeshAttached("hair", "nanos-world::SM_Hair_Long", "hair_male")
man:AddStaticMeshAttached("hair", "nanos-world::SM_Hair_Short", "hair_male")

-- Adds Hair to Woman
woman:AddStaticMeshAttached("hair", "nanos-world::SM_Hair_Kwang", "hair_female")

More related examples:

Play as Propgetting-started/tutorials-and-examples/play-as-prop Nametagsgetting-started/tutorials-and-examples/name-tags Character Meshes Guideassets-modding/creating-assets/skeletal-meshes/characters-meshes

🛠 Constructors

Default Constructor

No description provided

local my_character = Character(location, rotation, skeletal_mesh_asset, collision_type?, gravity_enabled?, max_health?, death_sound?, pain_sound?)
TypeNameDefaultDescription
Vectorlocation Required parameter No description provided
Rotatorrotation Required parameter No description provided
skeletal_mesh_asset Required parameter No description provided
collision_typeCollisionType.AutoNo description provided
gravity_enabledtrueNo description provided
max_health100Current / Max Health
death_soundnanos-world::A_Male_01_DeathPlayed when Character dies
pain_soundnanos-world::A_Male_01_PainPlayed when Character takes damage

🗿 Static Functions

Inherited Entity Static Functions
Character inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/Entity
ReturnsNameDescription
of Returns a table containing all Entities of the class this is called on
Returns a specific Entity of this class at an index
Returns how many Entities of this class exist
of Gets a list of all directly inherited classes from this Class created with the Inheriting System
Returns an iterator with all Entities of this class to be used with pairs()
or Gets the parent class if this Class was created with the Inheriting System
Inherits this class with the Inheriting System
Gets if this Class is child of another class if this Class was created with the Inheriting System
Subscribes to an Event for all entities of this Class
Subscribes to a custom event called from server
Unsubscribes all callbacks from this Event in this Class within this Package, or only the callback passed

This class doesn't have own static functions.

🦠 Functions

Inherited Entity Functions
Character inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/Entity
ReturnsNameDescription
Calls a custom remote event directly on this entity to all Players
Calls a custom remote event directly on this entity to a specific Player
Calls a custom remote event directly on this entity
Destroys this Entity
of Gets a list of all values keys
Gets the class of this entity
Gets the universal network ID of this Entity (same on both client and server)
Gets a Value stored on this Entity at the given key
Recursively checks if this entity is inherited from a Class
Returns true if this Entity is valid (i.e. wasn't destroyed and points to a valid Entity)
Sets a Value in this Entity
Subscribes to an Event on this specific entity
Subscribes to a custom event called from server on this specific entity
Unsubscribes all callbacks from this Event in this Entity within this Package, or only the callback passed
Inherited Actor Functions
Character inherits from Base Actor Class, sharing it's methods and functions:
Base Actorscripting-reference/classes/base-classes/Actor
ReturnsNameDescription
Adds an Unreal Actor Tag to this Actor
Applies a force in world world to this Actor
Attaches this Actor to any other Actor, optionally at a specific bone
Detaches this Actor from AttachedTo Actor
of Gets all Unreal Actor Tags on this Actor
of Gets all Actors attached to this Actor
or Gets the Actor this Actor is attached to
Gets this Actor's bounds
Gets this Actor's collision type
Gets this Actor's dimension
Gets the distance of this Actor from the Camera
VectorGets this Actor's force (set by SetForce())
VectorGets this Actor's location in the game world
Player or Gets this Actor's Network Authority Player
VectorGets this Actor's Relative Location if it's attached
RotatorGets this Actor's Relative Rotation if it's attached
RotatorGets this Actor's angle in the game world
VectorGets this Actor's scale
Gets the percentage of this Actor size in the screen
Gets a Socket Transform in world space given a bone or socket name
VectorGets this Actor's current velocity
Gets if this Actor was spawned by the client side
Returns true if the local Player is currently the Network Authority of this Actor
Returns true if this Actor is being destroyed
Returns true if gravity is enabled on this Actor
Returns true if this Actor is in water
Returns true if this Actor is currently network distributed
Returns true if this Actor is visible
Removes an Unreal Actor Tag from this Actor
Smoothly rotates this actor to an angle over a certain time
Sets this Actor's collision type
Sets this Actor's Dimension
Adds a permanent force to this Actor, set to Vector(0, 0, 0) to cancel
Sets whether gravity is enabled on this Actor
Sets whether the highlight is enabled on this Actor, and which highlight index to use
Sets the time (in seconds) before this Actor is destroyed. After this time has passed, the actor will be automatically destroyed.
Sets this Actor's location in the game world
Sets the Player to have network authority over this Actor
Sets if this Actor will auto distribute the network authority between players
Sets whether the outline is enabled on this Actor, and which outline index to use
Sets this Actor's relative location in local space (only if this actor is attached)
Sets this Actor's relative rotation in local space (only if this actor is attached)
Sets this Actor's rotation in the game world
Sets this Actor's scale
Sets whether the actor is visible or not
Smoothly moves this actor to a location over a certain time
Gets if this Actor was recently rendered on screen
Inherited Paintable Functions
Character inherits from Base Paintable Class, sharing it's methods and functions:
Base Paintablescripting-reference/classes/base-classes/Paintable
ReturnsNameDescription
Resets the material from the specified index to the original one
Sets the material at the specified index of this Actor
Sets a Color parameter in this Actor's material
Sets the material at the specified index of this Actor to a Canvas object
Sets the material at the specified index of this Actor to a SceneCapture object
Sets the material at the specified index of this Actor to a WebUI object
Sets a Scalar parameter in this Actor's material
Sets a texture parameter in this Actor's material to an image on disk
Sets a Vector parameter in this Actor's material
Overrides this Actor's Physical Material with a new one
Inherited Damageable Functions
Character inherits from Base Damageable Class, sharing it's methods and functions:
Base Damageablescripting-reference/classes/base-classes/Damageable
ReturnsNameDescription
Do damage to this entity
Gets the current health
Gets the Max Health
Respawns the Entity, fullying it's Health and moving it to it's Initial Location
Sets the Health of this Entity
Sets the MaxHealth of this Entity
Inherited Pawn Functions
Character inherits from Base Pawn Class, sharing it's methods and functions:
Base Pawnscripting-reference/classes/base-classes/Pawn
ReturnsNameDescription
Attaches a Skeletal Mesh as master pose to this entity
Attaches a Static Mesh to this entity
AI: Makes this Character to follow another actor
of Gets all Skeletal Meshes attached to this entity
of Gets all Static Meshes attached to this entity
Gets the Capsule Size
RotatorGets the Control Rotation
Gets the gravity scale
Gets the base Mesh Asset
VectorGets the Moving To location
Player or Gets the possessing Player
Hides a bone of this Character
Gets if a bone is hidden
Triggers this Character to jump
AI: Makes this Character to walk to the Location
Removes all SkeletalMeshes attached
Removes all StaticMeshes attached
Removes, if it exists, a SkeletalMesh from this entity given its custom ID
Removes, if it exists, a StaticMesh from this enitity given its custom ID
AI: Configures the RVO (Reciprocal Velocity Obstacles) Avoidance system used by the AIs when moving
Sets the Movement Braking Settings of this Character
Sets if this Character is allowed to Crouch and to Prone
Sets if this Character is allowed to Jump
Sets this Character's Capsule size
Changes the Gravity Scale
Sets the velocity of the jump
Sets a Static Mesh Attached location and rotation
Stops an Animation Montage on this character
AI: Stops the movement
UnHide a bone of this Character
ReturnsNameDescription
Clear all Morph Target that are set to this Mesh
Drops any Pickable the Character is holding
Enters the Vehicle at Seat (0 - Driver)
of Returns a table with all morph targets available
Gets the camera mode
Gets if can aim
Gets if can crouch
Gets if can drop
Gets if can grab props
Gets if can pickup Pickables (Weapons, Melee, Grenade...)
Gets if can punch
Gets if can sprint
Gets the Damage Multiplier of a bone
Gets the Fall Damage
Gets the FallingMode
Gets if it's in Flying mode
Gets the GaitMode
Prop or Gets the Grabbed Prop
Gets the impact damage taken
Gets the Jump Z Velocity
Returns the value of a Morph Target
or Gets the Pickable if picking up
Gets the punch damage
Gets the speed multiplier
Gets the Stance Mode
Gets the Swimming Mode
Gets the Team
or Gets the entered Vehicle
Gets the entered Vehicle seat
Gets the View Mode
Gets the Weapon Aim Mode
Gives a Prop to the Character
Gets if has input enabled
Gets if Character is in ragdoll mode
Gets if is invulnerable
Leaves the current Vehicle
AI: Tries to make this Character to look at Location
Gives a Melee/Grenade/Weapon (Pickable) to the Character
Plays an Animation Montage on this character
Resets all Physical Animation settings
Sets the Movement Max Acceleration of this Character
Sets the amount of movement control allowed when it is in air
Sets the Blend Space (2D) Animation for Crouching

Horizontal Axis stands for Speed X and Vertical Axis for Speed Y
Sets the Blend Space (2D) Animation for Proning

Horizontal Axis stands for Speed X and Vertical Axis for Speed Y
Sets the Blend Space (2D) Animation for Standing
Sets the Transition Animation between Crouching and Proning
Sets the Transition Animation between Standing and Crouching
Sets the Camera Mode
Sets the Camera Offset (only affects TPS)
Sets if this Character is allowed to Aim
Sets if this Character is allowed to deploy the Parachute
Sets if this Character is allowed to Dive
Sets if this Character is allowed to Drop the Picked up item
Sets if this Character is allowed to Grab any Prop
Sets if this Character is allowed to Pick up any Pickable (Weapon, Grenade, Melee...)
Sets if this Character is allowed to Punch
Sets if this Character is allowed to Sprint
Changes how much damage this character takes on specific bones
Changes the Death sound when Character dies
Set the Fall Damage multiplier taken when falling from High places
Sets the Flying Mode
Set the Footstep Volume multiplier
Sets the Field of View multiplier
Sets the Gait Mode
Sets time to transition to HighFalling state
Sets if the character will react to damage by applying small dynamic ragdoll effect to local bones damaged
Set the Impact Damage taken when being roamed by things
Enables/Disables Character's Input
Sets if the Character can receive any damage
Changes the Character Mesh on the fly
Set Morph Target with Name and Value
Changes the Pain sound when Character takes damage
Changes the Parachute Texture
Applies the physical animation settings to the body given
Set the Punch Damage this Character will apply on others
Set the minimum radial damage (e.g. explosions) taken to enter in ragdoll mode
Sets Character Ragdoll Mode
Sets the Character Capsule to simulate physics
Sets all speed multiplier
Sets the Stance Mode
Sets a Team which will disable damaging same Team Members
Sets the View Mode
Sets the Weapon's Aim Mode
UnGrabs/Drops the Prop the Character is holding

ClearMorphTargets

Clear all Morph Target that are set to this Mesh

my_character:ClearMorphTargets()

See also SetMorphTarget, GetMorphTarget, GetAllMorphTargetNames.


Drop

Drops any Pickable the Character is holding

my_character:Drop()

See also GetPicked, PickUp.


EnterVehicle

Enters the Vehicle at Seat (0 - Driver)

my_character:EnterVehicle(vehicle, seat?)
TypeParameterDefaultDescription
vehicle Required parameter No description provided
seat?0No description provided

See also GetVehicle, GetVehicleSeat, EnterVehicle, AttemptEnterVehicle.


GetAllMorphTargetNames

Returns a table with all morph targets available

— Returns of (table with all morph targets available).

local ret = my_character:GetAllMorphTargetNames()

See also SetMorphTarget, GetMorphTarget, ClearMorphTargets.


GetCameraMode

Gets the camera mode

— Returns .

local ret = my_character:GetCameraMode()

See also SetCameraMode.


GetCanAim

Gets if can aim

— Returns .

local ret = my_character:GetCanAim()

See also SetCanAim.


GetCanCrouch

Gets if can crouch

— Returns .

local ret = my_character:GetCanCrouch()

GetCanDrop

Gets if can drop

— Returns .

local ret = my_character:GetCanDrop()

See also SetCanDrop.


GetCanGrabProps

Gets if can grab props

— Returns .

local ret = my_character:GetCanGrabProps()

See also SetCanGrabProps.


GetCanPickupPickables

Gets if can pickup Pickables (Weapons, Melee, Grenade...)

— Returns .

local ret = my_character:GetCanPickupPickables()

See also SetCanPickupPickables.


GetCanPunch

Gets if can punch

— Returns .

local ret = my_character:GetCanPunch()

See also SetCanPunch.


GetCanSprint

Gets if can sprint

— Returns .

local ret = my_character:GetCanSprint()

See also SetCanSprint.


GetDamageMultiplier

Gets the Damage Multiplier of a bone

— Returns (the damage multiplier of the bone).

local ret = my_character:GetDamageMultiplier(bone_name)
TypeParameterDefaultDescription
bone_name Required parameter No description provided

See also SetDamageMultiplier.


GetFallDamageTaken

Gets the Fall Damage

— Returns .

local ret = my_character:GetFallDamageTaken()

See also SetFallDamageTaken.


GetFallingMode

Gets the FallingMode

— Returns .

local ret = my_character:GetFallingMode()

GetFlyingMode

Gets if it's in Flying mode

— Returns .

local ret = my_character:GetFlyingMode()

See also SetFlyingMode.


GetGaitMode

Gets the GaitMode

— Returns .

local ret = my_character:GetGaitMode()

See also SetGaitMode.


GetGrabbedProp

Gets the Grabbed Prop

— Returns Prop or .

local ret = my_character:GetGrabbedProp()

See also GrabProp, UnGrabProp.


GetImpactDamageTaken

Gets the impact damage taken

— Returns .

local ret = my_character:GetImpactDamageTaken()

See also SetImpactDamageTaken.


GetJumpZVelocity

Gets the Jump Z Velocity

— Returns .

local ret = my_character:GetJumpZVelocity()

GetMorphTarget

Returns the value of a Morph Target

— Returns (value of the Morph Target).

local ret = my_character:GetMorphTarget(name)
TypeParameterDefaultDescription
name Required parameter Morph Target Name

See also SetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


GetPicked

Gets the Pickable if picking up

— Returns or .

local ret = my_character:GetPicked()

See also PickUp, Drop.


GetPunchDamage

Gets the punch damage

— Returns .

local ret = my_character:GetPunchDamage()

See also SetPunchDamage.


GetSpeedMultiplier

Gets the speed multiplier

— Returns .

local ret = my_character:GetSpeedMultiplier()

See also SetSpeedMultiplier.


GetStanceMode

Gets the Stance Mode

— Returns .

local ret = my_character:GetStanceMode()

See also SetStanceMode.


GetSwimmingMode

Gets the Swimming Mode

— Returns .

local ret = my_character:GetSwimmingMode()

GetTeam

Gets the Team

— Returns .

local ret = my_character:GetTeam()

See also SetTeam.


GetVehicle

Gets the entered Vehicle

— Returns or .

local ret = my_character:GetVehicle()

See also EnterVehicle, LeaveVehicle.


GetVehicleSeat

Gets the entered Vehicle seat

— Returns .

local ret = my_character:GetVehicleSeat()

GetViewMode

Gets the View Mode

— Returns .

local ret = my_character:GetViewMode()

See also SetViewMode.


GetWeaponAimMode

Gets the Weapon Aim Mode

— Returns .

local ret = my_character:GetWeaponAimMode()

See also SetWeaponAimMode.


GrabProp

Gives a Prop to the Character

my_character:GrabProp(prop)
TypeParameterDefaultDescription
Propprop Required parameter No description provided

See also GetGrabbedProp.


IsInputEnabled

Gets if has input enabled

— Returns .

local ret = my_character:IsInputEnabled()

See also SetInputEnabled.


IsInRagdollMode

Gets if Character is in ragdoll mode

— Returns .

local ret = my_character:IsInRagdollMode()

IsInvulnerable

Gets if is invulnerable

— Returns .

local ret = my_character:IsInvulnerable()

See also SetInvulnerable.


LeaveVehicle

Leaves the current Vehicle

my_character:LeaveVehicle()

See also EnterVehicle, GetVehicle, LeaveVehicle, AttemptLeaveVehicle.


LookAt

AI: Tries to make this Character to look at Location

my_character:LookAt(location)
TypeParameterDefaultDescription
Vectorlocation Required parameter World location to look

PickUp

Gives a Melee/Grenade/Weapon (Pickable) to the Character

my_character:PickUp(pickable)
TypeParameterDefaultDescription
pickable Required parameter No description provided

See also Drop, GetPicked.


PlayAnimation

Plays an Animation Montage on this character

my_character:PlayAnimation(animation_path, slot_type?, loop_indefinitely?, blend_in_time?, blend_out_time?, play_rate?, stop_all_montages?)
TypeParameterDefaultDescription
animation_path Required parameter No description provided
slot_type?AnimationSlotType.FullBodyNo description provided
loop_indefinitely?falseNo description provided
blend_in_time?0.25No description provided
blend_out_time?0.25No description provided
play_rate?1.0No description provided
stop_all_montages?falseStops all running Montages from the same Group

See also StopAnimation.


ResetPhysicalAnimationSettings

Resets all Physical Animation settings

my_character:ResetPhysicalAnimationSettings()

SetAccelerationSettings

Sets the Movement Max Acceleration of this Character

my_character:SetAccelerationSettings(walking?, parachuting?, skydiving?, falling?, swimming?, swimming_surface?, flying?)
TypeParameterDefaultDescription
walking?768No description provided
parachuting?512No description provided
skydiving?768No description provided
falling?128No description provided
swimming?256No description provided
swimming_surface?256No description provided
flying?1024No description provided

SetAirControl

Sets the amount of movement control allowed when it is in air

my_character:SetAirControl(air_control?, boost_multiplier?, boost_velocity_threshold?)
TypeParameterDefaultDescription
air_control?0.2When falling, amount of lateral movement control available to the character. 0 = no control, 1 = full control at max speed of MaxWalkSpeed
boost_multiplier?512When falling, multiplier applied to air_control when lateral velocity is less than boost_velocity_threshold. Setting this to zero will disable air control boosting. Final result is clamped at 1
boost_velocity_threshold?25When falling, if lateral velocity magnitude is less than this value, air_control is multiplied by boost_multiplier. Setting this to zero will disable air control boosting

SetAnimationIdleWalkRunCrouching

Sets the Blend Space (2D) Animation for Crouching

Horizontal Axis stands for Speed X and Vertical Axis for Speed Y

my_character:SetAnimationIdleWalkRunCrouching(blend_space_path, enable_turn_in_place?)
TypeParameterDefaultDescription
blend_space_path Required parameter No description provided
enable_turn_in_place?falseNo description provided

SetAnimationIdleWalkRunProning

Sets the Blend Space (2D) Animation for Proning

Horizontal Axis stands for Speed X and Vertical Axis for Speed Y

my_character:SetAnimationIdleWalkRunProning(blend_space_path)
TypeParameterDefaultDescription
blend_space_path Required parameter No description provided

SetAnimationIdleWalkRunStanding

Sets the Blend Space (2D) Animation for Standing

Horizontal Axis stands for Speed X and Vertical Axis for Speed Y

my_character:SetAnimationIdleWalkRunStanding(blend_space_path, enable_turn_in_place?)
TypeParameterDefaultDescription
blend_space_path Required parameter No description provided
enable_turn_in_place?falseNo description provided

SetAnimationsTransitionCrouchingProning

Sets the Transition Animation between Crouching and Proning

my_character:SetAnimationsTransitionCrouchingProning(crouching_to_proning, pronng_to_crouching)
TypeParameterDefaultDescription
crouching_to_proning Required parameter No description provided
pronng_to_crouching Required parameter No description provided

SetAnimationsTransitionStandingCrouching

Sets the Transition Animation between Standing and Crouching

my_character:SetAnimationsTransitionStandingCrouching(standing_to_crouching, crouching_to_standing)
TypeParameterDefaultDescription
standing_to_crouching Required parameter No description provided
crouching_to_standing Required parameter No description provided

SetCameraMode

Sets the Camera Mode (i.e. Only TPS, FPS or if allow both)

Using FPSOnly CameraMode on AI will lock his body rotation (when using LookAt)

my_character:SetCameraMode(camera_mode)
TypeParameterDefaultDescription
camera_mode Required parameter No description provided

See also GetCameraMode.


SetCameraOffset

Sets the Camera Offset (only affects TPS)

my_character:SetCameraOffset(camera_offset)
TypeParameterDefaultDescription
Vectorcamera_offset Required parameter No description provided

SetCanAim

Sets if this Character is allowed to Aim

my_character:SetCanAim(can_aim)
TypeParameterDefaultDescription
can_aim Required parameter No description provided

See also GetCanAim.


SetCanDeployParachute

Sets if this Character is allowed to deploy the Parachute

my_character:SetCanDeployParachute(can_deploy_parachute)
TypeParameterDefaultDescription
can_deploy_parachute Required parameter No description provided

SetCanDive

Sets if this Character is allowed to Dive

my_character:SetCanDive(can_dive)
TypeParameterDefaultDescription
can_dive Required parameter No description provided

SetCanDrop

Sets if this Character is allowed to Drop the Picked up item

my_character:SetCanDrop(can_drop)
TypeParameterDefaultDescription
can_drop Required parameter No description provided

See also GetCanDrop.


SetCanGrabProps

Sets if this Character is allowed to Grab any Prop

my_character:SetCanGrabProps(can_grab_props)
TypeParameterDefaultDescription
can_grab_props Required parameter No description provided

See also GetCanGrabProps.


SetCanPickupPickables

Sets if this Character is allowed to Pick up any Pickable (Weapon, Grenade, Melee...)

my_character:SetCanPickupPickables(can_pickup)
TypeParameterDefaultDescription
can_pickup Required parameter No description provided

See also GetCanPickupPickables.


SetCanPunch

Sets if this Character is allowed to Punch

my_character:SetCanPunch(can_punch)
TypeParameterDefaultDescription
can_punch Required parameter No description provided

See also GetCanPunch.


SetCanSprint

Sets if this Character is allowed to Sprint

my_character:SetCanSprint(can_sprint)
TypeParameterDefaultDescription
can_sprint Required parameter No description provided

See also GetCanSprint.


SetDamageMultiplier

Changes how much damage this character takes on specific bones

my_character:SetDamageMultiplier(bone_name, multiplier)
TypeParameterDefaultDescription
bone_name Required parameter No description provided
multiplier Required parameter No description provided

See also GetDamageMultiplier.


SetDeathSound

Changes the Death sound when Character dies

my_character:SetDeathSound(sound_asset)
TypeParameterDefaultDescription
sound_asset Required parameter No description provided

SetFallDamageTaken

Set the Fall Damage multiplier taken when falling from High places.

Setting to 0 will make the Character to do not take any damage

my_character:SetFallDamageTaken(damage)
TypeParameterDefaultDescription
damage Required parameter Default is 10

See also GetFallDamageTaken.


SetFlyingMode

Sets the Flying Mode

my_character:SetFlyingMode(flying_mode)
TypeParameterDefaultDescription
flying_mode Required parameter No description provided

See also GetFlyingMode.


SetFootstepVolumeMultiplier

Set the Footstep Volume multiplier

my_character:SetFootstepVolumeMultiplier(volume_multiplier)
TypeParameterDefaultDescription
volume_multiplier Required parameter No description provided

SetFOVMultiplier

Sets the Field of View multiplier

my_character:SetFOVMultiplier(multiplier)
TypeParameterDefaultDescription
multiplier Required parameter No description provided

SetGaitMode

Sets the Gait Mode

my_character:SetGaitMode(gait_mode)
TypeParameterDefaultDescription
gait_mode Required parameter No description provided

See also GetGaitMode.


SetHighFallingTime

Sets time elapsed until automatically transition to HighFalling state (from SmallFalling) in seconds

Set it to -1 to never enter HighFalling time and consequently do not ragdoll when falling

my_character:SetHighFallingTime(time)
TypeParameterDefaultDescription
time Required parameter Default is 1 second

SetHitReactionEnabled

Sets if the character will react to damage by applying small dynamic ragdoll effect to local bones damaged

my_character:SetHitReactionEnabled(is_enabled)
TypeParameterDefaultDescription
is_enabled Required parameter No description provided

SetImpactDamageTaken

Set the Impact Damage taken when being roamed by things.

Setting to 0 will make the Character to do not take damage or enter ragdoll mode

my_character:SetImpactDamageTaken(impact_damage)
TypeParameterDefaultDescription
impact_damage Required parameter Default is 10

See also GetImpactDamageTaken.


SetInputEnabled

Enables/Disables Character's Input

my_character:SetInputEnabled(is_enabled)
TypeParameterDefaultDescription
is_enabled Required parameter No description provided

See also IsInputEnabled.


SetInvulnerable

Sets if the Character can receive any damage

my_character:SetInvulnerable(is_invulnerable)
TypeParameterDefaultDescription
is_invulnerable Required parameter No description provided

See also IsInvulnerable.


SetMesh

Changes the Character Mesh on the fly

my_character:SetMesh(skeletal_mesh_asset)
TypeParameterDefaultDescription
skeletal_mesh_asset Required parameter No description provided

SetMorphTarget

Set Morph Target with Name and Value

my_character:SetMorphTarget(name, value)
TypeParameterDefaultDescription
name Required parameter Morph Target Name
value Required parameter No description provided

See also GetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


SetPainSound

Changes the Pain sound when Character takes damage

my_character:SetPainSound(sound_asset)
TypeParameterDefaultDescription
sound_asset Required parameter No description provided

SetParachuteTexture

Changes the Parachute Texture

my_character:SetParachuteTexture(texture)
TypeParameterDefaultDescription
texture Required parameter No description provided

SetPhysicalAnimationSettings

Applies the physical animation settings to the body given

my_character:SetPhysicalAnimationSettings(bone, include_self, is_local_simulation, orientation_strength?, angular_velocity_strength?, position_strength?, velocity_strength?, max_linear_force?, max_angular_force?)
TypeParameterDefaultDescription
bone Required parameter The body we will be driving
include_self Required parameter Whether to modify the given body
is_local_simulation Required parameter Whether the drive targets are in world space or local
orientation_strength?0The strength used to correct orientation error
angular_velocity_strength?0The strength used to correct angular velocity error
position_strength?0The strength used to correct linear position error. Only used for non-local simulation
velocity_strength?0The strength used to correct linear velocity error. Only used for non-local simulation
max_linear_force?0The max force used to correct linear errors
max_angular_force?0The max force used to correct angular errors

SetPunchDamage

Set the Punch Damage this Character will apply on others

my_character:SetPunchDamage(punch_damage)
TypeParameterDefaultDescription
punch_damage Required parameter Default is 15

See also GetPunchDamage.


SetRadialDamageToRagdoll

Set the minimum radial damage taken (e.g. explosions) to enter in ragdoll mode.

Setting to -1 will make the Character to do not enter ragdoll mode when getting radial damage

my_character:SetRadialDamageToRagdoll(damage)
TypeParameterDefaultDescription
damage Required parameter Default is 50

SetRagdollMode

Sets Character Ragdoll Mode

my_character:SetRagdollMode(ragdoll_enabled)
TypeParameterDefaultDescription
ragdoll_enabled Required parameter No description provided

SetSimulatePhysics

Sets the Character Capsule to simulate physics

my_character:SetSimulatePhysics(simulate_physics)
TypeParameterDefaultDescription
simulate_physics Required parameter No description provided

SetSpeedMultiplier

Sets all speed multiplier

my_character:SetSpeedMultiplier(speed_multiplier)
TypeParameterDefaultDescription
speed_multiplier Required parameter 1 is normal

See also GetSpeedMultiplier.


SetStanceMode

Sets the Stance Mode

my_character:SetStanceMode(stance_mode)
TypeParameterDefaultDescription
stance_mode Required parameter No description provided

See also GetStanceMode.


SetTeam

Sets a Team which will disable damaging same Team Members

my_character:SetTeam(team)
TypeParameterDefaultDescription
team Required parameter 0 is neutral and default

See also GetTeam.


SetViewMode

Sets the View Mode

my_character:SetViewMode(view_mode)
TypeParameterDefaultDescription
view_mode Required parameter No description provided

See also GetViewMode.


SetWeaponAimMode

Sets the Weapon's Aim Mode

my_character:SetWeaponAimMode(aim_mode)
TypeParameterDefaultDescription
aim_mode Required parameter No description provided

See also GetWeaponAimMode.


UnGrabProp

UnGrabs/Drops the Prop the Character is holding

my_character:UnGrabProp()

🚀 Events

Inherited Entity Events
Character inherits from Base Entity Class, sharing it's events:
Base Entityscripting-reference/classes/base-classes/Entity
NameDescription
Triggered when a new Class is registered with the Inheriting System
Triggered when an Entity is destroyed
Triggered when an Entity is spawned/created
Triggered when an Entity has a value changed with :SetValue()
Inherited Actor Events
Character inherits from Base Actor Class, sharing it's events:
Base Actorscripting-reference/classes/base-classes/Actor
NameDescription
Triggered when an Actor changes it's dimension
Inherited Damageable Events
Character inherits from Base Damageable Class, sharing it's events:
Base Damageablescripting-reference/classes/base-classes/Damageable
NameDescription
When Entity Dies
When Entity has it's Health changed, or because took damage or manually set through scripting or respawning
When Entity Respawns
Triggered when this Entity takes damage
Inherited Pawn Events
Character inherits from Base Pawn Class, sharing it's events:
Base Pawnscripting-reference/classes/base-classes/Pawn
NameDescription
When an Animation Montage Notify begins
When an Animation Montage Notify ends
Called when AI reaches it's destination, or when it fails
When Character is possessed by a Player
When Character is unpossessed by a Player
NameDescription
Triggered when the Character effectively attacks with a Melee
Triggered when a Character attempts to enter a vehicle
Triggered when this Character attempts to leave a vehicle
Triggered when this Character attempts to reload
When Character drops the currently picked up Pickable
When Character enters a vehicle
Called when FallingMode changes
When Character fires a Weapon
Called when GaitMode changes
When Character grabs up a Prop
When Character highlights/looks at a Prop or a Pickable
Triggered when a Character interacts with a Prop or Pickable
When Character leaves a vehicle
When Character picks up anything
Triggered when a Character presses the use button for a Pickable (i.e. clicks left mouse button with this equipped)
When Character punches
When Character enters or leaves ragdoll
Triggered when a Character releases the use button for a Pickable (i.e. releases left mouse button with this equipped)
When Character reloads a weapon
Called when StanceMode changes
Called when Swimming Mode changes
When Character drops a Prop
When Character changes it's View Mode
Called when Weapon Aim Mode changes

Attack

Triggered when the Character effectively attacks with a Melee
Character.Subscribe("Attack", function(self, melee)
-- Attack was called
end)
TypeArgumentDescription
CharacterselfNo description provided
MeleemeleeNo description provided

AttemptEnterVehicle

Triggered when a Character attempts to enter a vehicle

Return false to prevent it
Character.Subscribe("AttemptEnterVehicle", function(self, vehicle, seat_index)
-- AttemptEnterVehicle was called
end)
TypeArgumentDescription
CharacterselfNo description provided
vehicleNo description provided
seat_indexNo description provided

See also GetVehicle, EnterVehicle, EnterVehicle.


AttemptLeaveVehicle

Triggered when this Character attempts to leave a vehicle

Return false to prevent it
Character.Subscribe("AttemptLeaveVehicle", function(self, vehicle)
-- AttemptLeaveVehicle was called
end)
TypeArgumentDescription
CharacterselfNo description provided
vehicleNo description provided

See also LeaveVehicle, LeaveVehicle.


AttemptReload

Triggered when this Character attempts to reload

Return false to prevent it
Character.Subscribe("AttemptReload", function(self, weapon)
-- AttemptReload was called
end)
TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided

Drop

When Character drops the currently picked up Pickable
Character.Subscribe("Drop", function(self, object, triggered_by_player)
-- Drop was called
end)
TypeArgumentDescription
CharacterselfNo description provided
objectNo description provided
triggered_by_playerNo description provided

EnterVehicle

When Character enters a vehicle
Character.Subscribe("EnterVehicle", function(self, vehicle, seat_index)
-- EnterVehicle was called
end)
TypeArgumentDescription
CharacterselfNo description provided
vehicleNo description provided
seat_indexNo description provided

See also GetVehicle, EnterVehicle, AttemptEnterVehicle.


FallingModeChange

Called when FallingMode changes
Character.Subscribe("FallingModeChange", function(self, old_state, new_state)
-- FallingModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

Fire

When Character fires a Weapon
Character.Subscribe("Fire", function(self, weapon)
-- Fire was called
end)
TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided

GaitModeChange

Called when GaitMode changes
Character.Subscribe("GaitModeChange", function(self, old_state, new_state)
-- GaitModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

GrabProp

When Character grabs up a Prop
Character.Subscribe("GrabProp", function(self, prop)
-- GrabProp was called
end)
TypeArgumentDescription
CharacterselfNo description provided
ProppropNo description provided

Highlight

When Character highlights/looks at a Prop or a Pickable
Character.Subscribe("Highlight", function(self, is_highlighted, object)
-- Highlight was called
end)
TypeArgumentDescription
CharacterselfNo description provided
is_highlightedWhether the object is being highlighted or not
Prop or objectNo description provided

Interact

Triggered when a Character interacts with a Prop or Pickable

Return false to prevent it
Character.Subscribe("Interact", function(self, object)
-- Interact was called
end)
TypeArgumentDescription
CharacterselfNo description provided
Prop or objectNo description provided

LeaveVehicle

When Character leaves a vehicle
Character.Subscribe("LeaveVehicle", function(self, vehicle)
-- LeaveVehicle was called
end)
TypeArgumentDescription
CharacterselfNo description provided
vehicleNo description provided

See also LeaveVehicle, AttemptLeaveVehicle.


PickUp

When Character picks up anything
Character.Subscribe("PickUp", function(self, object)
-- PickUp was called
end)
TypeArgumentDescription
CharacterselfNo description provided
objectNo description provided

See also GetPicked.


PullUse

Triggered when a Character presses the use button for a Pickable (i.e. clicks left mouse button with this equipped)
Character.Subscribe("PullUse", function(self, pickable)
-- PullUse was called
end)
TypeArgumentDescription
CharacterselfThe Character that used it
pickableThe Pickable which has just been used

Punch

When Character punches
Character.Subscribe("Punch", function(self)
-- Punch was called
end)
TypeArgumentDescription
CharacterselfNo description provided

RagdollModeChange

When Character enters or leaves ragdoll
Character.Subscribe("RagdollModeChange", function(self, old_state, new_state)
-- RagdollModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

ReleaseUse

Triggered when a Character releases the use button for a Pickable (i.e. releases left mouse button with this equipped)
Character.Subscribe("ReleaseUse", function(self, pickable)
-- ReleaseUse was called
end)
TypeArgumentDescription
CharacterselfThe Character that stopped using it
pickableThe Pickable which has just stopped being used

Reload

When Character reloads a weapon
Character.Subscribe("Reload", function(self, weapon, ammo_to_reload)
-- Reload was called
end)
TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided
ammo_to_reloadNo description provided

StanceModeChange

Called when StanceMode changes
Character.Subscribe("StanceModeChange", function(self, old_state, new_state)
-- StanceModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

SwimmingModeChange

Called when Swimming Mode changes
Character.Subscribe("SwimmingModeChange", function(self, old_state, new_state)
-- SwimmingModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

UnGrabProp

When Character drops a Prop
Character.Subscribe("UnGrabProp", function(self, prop)
-- UnGrabProp was called
end)
TypeArgumentDescription
CharacterselfNo description provided
ProppropNo description provided

ViewModeChange

When Character changes it's View Mode
Character.Subscribe("ViewModeChange", function(self, old_state, new_state)
-- ViewModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

WeaponAimModeChange

Called when Weapon Aim Mode changes
Character.Subscribe("WeaponAimModeChange", function(self, old_state, new_state)
-- WeaponAimModeChange was called
end)
TypeArgumentDescription
CharacterselfNo description provided
old_stateNo description provided
new_stateNo description provided

Male & Female Customization

The following items can be used to customize Male & Female (nanos-world::SK_Male & nanos-world::SK_Female) default meshes from nanos world.

Morph TargetsMat. Scalar ParamsMat. Color ParamsMat. Texture Params
nose1BaseColorPowerLipstickTintTexture
nose2MuscularBrowsTintLipstickMask
browsSpecularBlushTintBrowsMask
mouthRoughnessEyeShadowTintBlushMask
fatScatterUnderwearTintEyeShadowMask
nose3DetailAmountHairTintNormal
chinDetailScaleTintNormalMuscular
faceUnderwearRoughnessUnderwearMask
nose4UnderwearSpecularSR
skinnyHairScatterHairTexture
jawHairAlphaPowerHairSpecular
brows2HairSpecularMultiplierHairRoughness
angryHairRoughnessMultiplierHairTangent
smirkHairPixelDepth
smirk2
smirk3
smile
nose6
jaw_forward
lips
lips2
mouth_wide
eyes1
eyes2
eyes3
eyes4
eyes_retraction
lips3
eyes5
nose7
forehead
bodyfat

Character's Skeleton Bone Names

info

Ugly list I know.

  • root
    • pelvis
      • spine_01
        • spine_02
          • spine_03
            • clavicle_l
              • upperarm_l
                • lowerarm_l
                  • hand_l
                    • index_01_l
                      • index_02_l
                        • index_03_l
                    • middle_01_l
                      • middle_02_l
                        • middle_03_l
                    • pinky_01_l
                      • pinky_02_l
                        • pinky_03_l
                    • ring_01_l
                      • ring_02_l
                        • ring_03_l
                    • thumb_01_l
                      • thumb_02_l
                        • thumb_03_l
                    • weapon_l
            • clavicle_r
              • upperarm_r
                • lowerarm_r
                  • hand_r
                    • index_01_r
                      • index_02_r
                        • index_03_r
                    • middle_01_r
                      • middle_02_r
                        • middle_03_r
                    • pinky_01_r
                      • pinky_02_r
                        • pinky_03_r
                    • ring_01_r
                      • ring_02_r
                        • ring_03_r
                    • thumb_01_r
                      • thumb_02_r
                        • thumb_03_r
                    • weapon_r
            • neck_01
              • head
                • lefteye
                • righteye
                • leftlidup
                • leftlidlow
                • rightlidup
                • rightlitlow
      • thigh_l
        • calf_l
          • foot_l
            • ball_l
      • thigh_r
        • calf_r
          • foot_r
            • ball_r