π§ 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
info
info
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.
Usageβ
-- 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")
Constructor Parametersβ
Type | Name | Default |
---|---|---|
Vector | location | Vector(0, 0, 0) |
Rotator | rotation | Rotator(0, 0, 0) |
SkeletalMesh Asset | skeletal_mesh | nanos-world::SK_Mannequin |
CollisionType | collision_type | CollisionType.Normal |
boolean | gravity_enabled | true |
number | health/max_health | 100 |
string | death_sounds | nanos-world::A_Male_01_Death |
string | pain_sounds | nanos-world::A_Male_01_Pain |
Functionsβ
Inherited Actor Functions
Returns | Name | Description | |
---|---|---|---|
AddImpulse | Applies a Force in world space to this Actor | ||
AttachTo | Attaches this Actor to another Actor | ||
Destroy | Destroys this Actor | ||
Detach | Detaches this Actor if attached | ||
SetCollision | Sets this Actor's collision type | ||
SetForce | Adds a permanent force to this Actor | ||
SetGravityEnabled | Sets whether gravity is enabled on this Actor | ||
![]() | SetVisibility | Sets the Actor visibility | |
SetHighlightEnabled | Sets whether the highlight is enabled on this Actor, and which highlight index to use | ||
SetOutlineEnabled | Sets whether the outline is enabled on this Actor, and which outline index to use | ||
SetLifeSpan | Sets the time (in seconds) before this Actor is destroyed | ||
SetLocation | Sets this Actor's location in the game world | ||
SetNetworkAuthority | Sets the Player this Actor will have its physics calculated on Network Authority | ||
SetRelativeLocation | Sets this Actor's relative location in local space | ||
SetRelativeRotation | Sets this Actor's relative rotation in local space | ||
SetRotation | Sets this Actor's rotation in the game world | ||
SetScale | Sets this Actor's scale | ||
![]() | SetValue | Sets a value in this Actor, which can be accessed by any package | |
TranslateTo | Smoothly moves this Actor to the specified location | ||
RotateTo | Smoothly rotates this Actor to the specified angle | ||
boolean | HasNetworkAuthority | Gets if the LocalPlayer is currently the Network Authority of this Actor | |
boolean | HasAuthority | Gets if this Actor was spawned by the client side | |
![]() | boolean | IsBeingDestroyed | Gets if this Actor is being destroyed |
![]() | boolean | IsGravityEnabled | Gets whether gravity is enabled on this Actor |
![]() | boolean | IsVisible | Gets whether this actor is Visible or not |
![]() | boolean | IsInWater | Gets if this Actor is in water |
![]() | boolean | IsNetworkDistributed | Gets if this Actor is currently Network Distributed |
![]() | boolean | IsValid | Returns if this Actor is valid (i.e. not destroyed) |
![]() | table | GetAttachedEntities | Gets all Actors attached to this Actor |
![]() | any | GetAttachedTo | Gets the Actor this Actor is attached to |
table | GetBounds | Gets this Actor's bounds | |
![]() | number | GetCollision | Gets this Actor's collision type |
![]() | number | GetID | Gets the universal network ID of this Actor |
![]() | Vector | GetLocation | Gets this Actor's location in the game world |
![]() | Rotator | GetRotation | Gets this Actor's angle in the game world |
![]() | Vector | GetForce | Gets this Actor's scale |
![]() | Vector | GetScale | Gets this Actor's scale |
![]() | string | GetType | Gets the type of this Actor |
![]() | any | GetValue | Gets a value stored on this Actor at the given key |
![]() | Vector | GetVelocity | Returns this Actor's current velocity |
string | AddActorTag | Adds an Unreal Actor Tag to this Actor | |
string | RemoveActorTag` | Remove an Unreal Actor Tag from this Actor | |
table | GetActorTags | Gets all Unreal Actor Tags from this Actor | |
![]() | function | Subscribe | Subscribes to an Event |
![]() | Unsubscribe | Unsubscribes from an Event |
Inherited Paintable Functions
Returns | Name | Description | |
---|---|---|---|
![]() | SetMaterial | Sets the material at the specified index of this Actor | |
SetMaterialFromWebUI | Sets the material at the specified index of this Actor to a WebUI object | ||
SetMaterialFromSceneCapture | Sets the material at the specified index of this Actor to a SceneCapture object | ||
ResetMaterial | Resets the material from the specified index to the original one | ||
![]() | SetMaterialColorParameter | Sets a Color parameter in this Actorβs material | |
![]() | SetMaterialScalarParameter | Sets a scalar parameter in this Actorβs material | |
![]() | SetMaterialTextureParameter | Sets a texture parameter in this Actor's material to an image on disk | |
![]() | SetMaterialVectorParameter | Sets a Vector parameter in this Actorβs material | |
![]() | SetPhysicalMaterial | Overrides this Actor's Physical Material with a new one |
Returns | Name | Description | |
---|---|---|---|
number | ApplyDamage | Do damage in a character | |
![]() | AddSkeletalMeshAttached | Spawns and Attaches a SkeletalMesh into this Character | |
![]() | AddStaticMeshAttached | Spawns and Attaches a StaticMesh into this Character | |
Drop | Drops any Pickable the Character is holding | ||
EnterVehicle | Enters the Vehicle at Seat (0 - Driver) | ||
GrabProp | Gives a Prop to the Character | ||
![]() | HideBone | Hides a bone of this Character | |
![]() | UnHideBone | UnHides a bone of this Character | |
![]() | IsBoneHidden | Gets if a bone is hidden | |
Jump | Triggers this Character to jump | ||
LeaveVehicle | Leaves the current Vehicle | ||
LookAt | AI: Tries to make this Character to look at Location | ||
MoveTo | AI: Makes this Character to walk to the Location | ||
Follow | AI: Makes this Character to follow another actor | ||
StopMovement | AI: Stops the movement | ||
PickUp | Gives a Melee/Grenade/Weapon (Pickable) to the Character | ||
PlayAnimation | Plays an Animation Montage on this character | ||
![]() | RemoveSkeletalMeshAttached | Removes, if existing, a SkeletalMesh from this Character given it's custom ID | |
![]() | RemoveStaticMeshAttached | Removes, if existing, a StaticMesh from this Character given it's custom ID | |
![]() | RemoveAllStaticMeshesAttached | Removes all StaticMeshes attached | |
![]() | RemoveAllSkeletalMeshesAttached | Removes all SkeletalMeshes attached | |
Respawn | Respawns the Character, fullying it's Health and moving it to it's Initial Location | ||
SetAccelerationSettings | Sets the Movement Max Acceleration of this Character. | ||
SetBrakingSettings | Sets the Movement Braking Settings of this Character. | ||
SetCameraMode | Sets the Camera Mode | ||
SetCameraOffset | Sets the Camera Offset (only affects TPS) | ||
SetCanCrouch | Sets if this Character is allowed to Crouch and to Prone | ||
SetCanAim | Sets if this Character is allowed to Aim | ||
SetCanDrop | Sets if this Character is allowed to Drop the Picked Up pickable | ||
SetCanSprint | Sets if this Character is allowed to Sprint | ||
SetCanGrabProps | Sets if this Character is allowed to Grab any Prop | ||
SetCanPickupPickables | Sets if this Character is allowed to Pick up any Pickable (Weapon, Grenade, Melee) | ||
SetCanPunch | Sets if this Character is allowed to Punch | ||
SetCanDeployParachute | Sets if this Character is allowed to open the parachute | ||
SetCapsuleSize | Sets this Character's Capsule size | ||
SetDamageMultiplier | Changes how much damage this character takes | ||
SetDeathSound | Changes the Death sound when Character dies | ||
SetFallDamageTaken | Set the Fall Damage multiplier taken when falling from High places | ||
SetFlyingMode | Sets the Flying Mode | ||
SetHighFallingTime | Sets time elapsed until automatically transition to HighFalling state | ||
SetFOVMultiplier | Sets the FOV multiplier | ||
SetGaitMode | Sets the Gait Mode | ||
SetGravityScale | Changes the Gravity Scale of this Character | ||
SetHealth | Sets the Health of this Character. If the character is dead, respawns it with full health | ||
SetImpactDamageTaken | Set the Impact Damage taken when being roamed by things | ||
SetInvulnerable | Sets if the Character can receive any damage | ||
SetJumpZVelocity | Sets the velocity of the jump | ||
SetMaxHealth | Sets the MaxHealth of this Character | ||
SetMesh | Changes the Character Mesh on the fly | ||
![]() | SetMorphTarget | Set Morph Target with Name and Value | |
![]() | GetMorphTarget | Get Morph target with given name | |
![]() | ClearMorphTargets | Clear all Morph Target that are set to this Mesh | |
GetAllMorphTargetNames | Returns the list of all morph targets of this Skeletal Mesh | ||
![]() | SetPhysicalAnimationSettings | Applies the physical animation settings to the body given | |
![]() | ResetPhysicalAnimationSettings | Resets all Physical Animation settings | |
SetMovementEnabled | Enables/Disables Character's Movement | ||
SetParachuteTexture | Changes the Parachute Texture | ||
SetPainSound | Changes the Pain sound when Character takes damage | ||
SetPunchDamage | Set the Punch Damage this Character will apply on others | ||
SetRagdollMode | Sets Character Ragdoll Mode | ||
SetSpeedMultiplier | 1 = normal | ||
SetStanceMode | Stance Modes: None, Standing, Crouching, Proning | ||
SetTeam | Sets a Team which will disable damaging same Team Members. 0 for Neutral | ||
SetViewMode | View Modes: FPS, TPS1, TPS2, TPS3 | ||
SetWeaponAimMode | Aim Modes: None, ADS, ZoomedZoom, Zoomed, ZoomedFar | ||
StopAnimation | Stops an Animation Montage on this character | ||
UnGrabProp | UnGrabs/Drops the Prop the Character is holding | ||
![]() | boolean | IsInRagdollMode | Gets Character Ragdoll Mode |
![]() | boolean | IsInvulnerable | Gets if the Character can receive damage |
![]() | boolean | IsMovementEnabled | Gets Character Movement Enabled |
![]() | CameraMode | GetCameraMode | |
![]() | boolean | GetCanAim | |
![]() | boolean | GetCanCrouch | |
![]() | boolean | GetCanDrop | |
![]() | boolean | GetCanGrabProps | |
![]() | boolean | GetCanPunch | |
![]() | boolean | GetCanSprint | |
![]() | boolean | GetCanPickupPickables | |
![]() | table | GetCapsuleSize | |
table | GetBoneTransform | Gets a bone Location and Rotation | |
![]() | Rotator | GetControlRotation | Gets the rotation this character is looking at |
![]() | number | GetDamageMultiplier | |
![]() | number | GetFallDamageTaken | |
![]() | FallingMode | GetFallingMode | Gets the Falling Mode |
![]() | boolean | GetFlyingMode | Gets if the Character is in Flying Mode |
![]() | CollisionType | GetGaitMode | Gets the Gait Mode |
![]() | Prop | GetGrabbedProp | Gets the Grabbing Prop |
![]() | number | GetGravityScale | Gets the Gravity Scale of this Character |
![]() | number | GetHealth | Gets the Character's Health. |
![]() | number | GetImpactDamageTaken | |
![]() | number | GetJumpZVelocity | |
![]() | number | GetMaxHealth | Gets the Character's MaxHealth. |
![]() | string | GetMesh | Gets the Mesh Asset name |
![]() | Vector | GetMovingTo | Gets if Character is moving to |
![]() | Pickable | GetPicked | Gets the holding Picked Melee/Grenade/Weapon |
![]() | Player | GetPlayer | Gets the Player controlling this Character |
![]() | number | GetPunchDamage | |
![]() | number | GetSpeedMultiplier | |
![]() | StanceMode | GetStanceMode | |
![]() | SwimmingMode | GetSwimmingMode | |
![]() | number | GetTeam | |
![]() | Vehicle | GetVehicle | Gets the Vehicle the Character is on |
![]() | ViewMode | GetViewMode | Gets Character View Mode |
![]() | AimMode | GetWeaponAimMode | Gets Character Aim Mode |
Eventsβ
Inherited Actor Events
Name | Description | |
---|---|---|
Destroy | Triggered when an Actor is destroyed | |
Spawn | Triggered when an Actor is spawned/created | |
ValueChange | Triggered when an Actor has a value changed with :SetValue() |
Name | Description | |
---|---|---|
AnimationBeginNotify | When an Animation Montage Notify begins | |
AnimationEndNotify | When an Animation Montage Notify ends | |
![]() | Death | When Character Dies |
![]() | Drop | When Character drops anything |
![]() | EnterVehicle | When Character enters a vehicle |
AttemptEnterVehicle | When Character attempts to enter a vehicle | |
![]() | FallingModeChanged | |
![]() | Fire | When Character fires a Weapon |
![]() | GaitModeChanged | |
![]() | GrabProp | When Character grabs up a Prop |
![]() | HealthChanged | When Character health is changed |
![]() | Highlight | When Character highlights/looks at a Prop or a Pickable |
Interact | When a Character interacts with a Prop or Pickable to pick it up | |
![]() | LeaveVehicle | When Character leaves a vehicle |
AttemptLeaveVehicle | When Character attempts to leave a vehicle | |
![]() | MoveCompleted | Called when AI reaches it's destination, or when it fails |
![]() | PickUp | When Character picks up anything |
![]() | Possessed | When Character is possessed |
![]() | Punch | When Character punches |
![]() | RagdollModeChanged | |
AttemptReload | When Character attempts to reload a weapon | |
![]() | Reload | When Character reloads a weapon |
![]() | Respawn | When Character Respawns |
![]() | StanceModeChanged | |
![]() | SwimmingModeChanged | |
![]() | TakeDamage | When Character takes Damage |
![]() | UnGrabProp | When Character drops a Prop |
![]() | UnPossessed | When Character is unpossessed |
![]() | ViewModeChanged | |
![]() | WeaponAimModeChanged |
Functions Detailedβ

ApplyDamage
β
Do damage in a character, will trigger all related events and apply modified damage based on bone. Also will apply impulse if it's a heavy explosion
my_character:ApplyDamage(damage, bone_name, damage_type, from_direction, instigator, causer)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | damage | ||
string | bone_name | `` | |
DamageType | damage_type | DamageType.Shot | |
Vector | from_direction | Vector() | |
Player | instigator | nil | |
any | causer | nil | The object which caused the damage |

AddSkeletalMeshAttached
β
Spawns and Attaches a SkeletalMesh into this Character, the SkeletalMesh must have the same Skeletal used by the Character Mesh, and will follow all animations from it. Uses a custom ID to be used for removing it further
For customizing the Materials specific of a SkeletalMeshAttached, please use the following syntax in the Paintable methods:
attachable///[ATTACHABLE_ID]/[PARAMETER_NAME]
, where [ATTACHABLE_ID] is the ID of the Attachable, and [PARAMETER_NAME] is the name of the parameter you want to change.
my_character:AddSkeletalMeshAttached(id, skeletal_mesh_path)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | id | ||
string | skeletal_mesh_path | `` |

AddStaticMeshAttached
β
Spawns and Attaches a StaticMesh into this Character in a Socket with relative Location and Rotation. Uses a custom ID to be used for removing it further
For customizing the Materials specific of a StaticMeshAttached, please use the following syntax as the
id
in the Paintable methods:attachable///[ATTACHABLE_ID]/[PARAMETER_NAME]
, where [ATTACHABLE_ID] is the ID of the Attachable, and [PARAMETER_NAME] is the name of the parameter you want to change.
my_character:AddStaticMeshAttached( id, static_mesh_path, socket, relative_location, relative_rotation)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | id | ||
string | static_mesh_path | `` | |
string | socket | `` | |
Vector | relative_location | Vector() | |
Rotator | relative_rotation | Rotator() |

Drop
β
Drops any Pickable the Character is holding
my_character:Drop()

EnterVehicle
β
Enters the Vehicle at Seat (0 - Driver)
my_character:EnterVehicle(vehicle, seat)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vehicle | vehicle | ||
number | seat | 0 |

GrabProp
β
Gives a Prop to the Character
my_character:GrabProp(prop)
Type | Parameter | Default Value | Description |
---|---|---|---|
Prop | prop |

HideBone
β
Hides a bone of this Character. Check Bone Names List for all Bone names
my_character:HideBone(bone_name)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | bone_name |

UnHideBone
β
UnHide a bone of this Character. Check Bone Names List for all Bone names
my_character:UnHideBone(bone_name)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | bone_name |

IsBoneHidden
β
Check if a Bone is Hidden
Returns boolean
my_character:IsBoneHidden(bone_name)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | bone_name |

Jump
β
Triggers this Character to jump
my_character:Jump()

LeaveVehicle
β
Leaves the current Vehicle
my_character:LeaveVehicle()

LookAt
β
AI: Tries to make this Character to look at Location
my_character:LookAt(location)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vector | location |

MoveTo
β
AI: Makes this Character to walk to the Location
Triggers event MoveCompleted.
my_character:MoveTo(location, acceptance_radius)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vector | location | ||
number | acceptance_radius | 50 |

Follow
β
AI: Makes this Character to follow another Actor
Triggers event MoveCompleted.
my_character:Follow(actor, acceptance_radius, stop_on_succeed, stop_on_fail, update_rate)
Type | Parameter | Default Value | Description |
---|---|---|---|
Actor | actor | ||
number | acceptance_radius | 50 | |
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 |
number | update_rate | 0.25 | How often to recalculate the AI path |

StopMovement
β
AI: Stops the movement
Triggers event MoveCompleted.
my_character:StopMovement()

PickUp
β
Gives a Melee/Grenade/Weapon (Pickable) to the Character
my_character:PickUp(pickable)
Type | Parameter | Default Value | Description |
---|---|---|---|
Pickable | pickable |

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)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | animation_path | ||
AnimationSlotType | slot_type | AnimationSlotType.FullBody | |
boolean | loop_indefinitely | false | |
number | blend_in_time | 0.25 | |
number | blend_out_time | 0.25 | |
number | play_rate | 1.0 | |
boolean | stop_all_montages | false | Stops all running Montages from the same Group |

RemoveSkeletalMeshAttached
β
Removes, if existing, a SkeletalMesh from this Character given it's custom ID
my_character:RemoveSkeletalMeshAttached(id)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | id |

RemoveStaticMeshAttached
β
Removes, if existing, a StaticMesh from this Character given it's custom ID
my_character:RemoveStaticMeshAttached(id)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | id |

RemoveAllStaticMeshesAttached
β
Removes all StaticMeshes attached
my_character:RemoveAllStaticMeshesAttached()

RemoveAllSkeletalMeshesAttached
β
Removes all SkeletalMeshes attached
my_character:RemoveAllSkeletalMeshesAttached()

Respawn
β
Respawns the Character, fullying it's Health and moving it to it's Initial Location
my_character:Respawn(location, rotation)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vector | location | initial location | If not passed will use the initial location passed when the Character spawned |
Rotator | rotation | Rotator(0, 0, 0) |

SetAccelerationSettings
β
Sets the Movement Max Acceleration of this Character.
my_character:SetAccelerationSettings(walking, parachuting, skydiving, falling, swimming, swimming_surface, flying)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | walking | 768 | |
number | parachuting | 512 | |
number | skydiving | 768 | |
number | falling | 128 | |
number | swimming | 256 | |
number | swimming_surface | 256 | |
number | flying | 1024 |

SetBrakingSettings
β
Sets the Movement Braking Settings of this Character.
my_character:SetBrakingSettings(ground_friction, braking_friction_factor, braking_walking, braking_flying, braking_swimming, braking_falling)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | ground_friction | 2 | |
number | braking_friction_factor | 2 | |
number | braking_walking | 96 | |
number | braking_flying | 3000 | |
number | braking_swimming | 10 | |
number | braking_falling | 0 |

SetCameraMode
β
Sets the Camera Mode (i.e. Only TPS, FPS or if allow both)
info
Using FPSOnly CameraMode on AI will lock his body rotation (when using LookAt).
my_character:SetCameraMode(camera_mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
CameraMode | camera_mode |

SetCameraOffset
β
Sets the Camera Offset (only affects TPS)
my_character:SetCameraOffset(camera_offset)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vector | camera_offset |

SetCanCrouch
β
Sets if this Character is allowed to Crouch and to Prone
my_character:SetCanCrouch(can_crouch)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_crouch |

SetCanAim
β
Sets if this Character is allowed to Aim
my_character:SetCanAim(can_aim)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_aim |

SetCanDrop
β
Sets if this Character is allowed to Drop the Picked up item
my_character:SetCanDrop(can_drop)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_drop |

SetCanSprint
β
Sets if this Character is allowed to Sprint
my_character:SetCanSprint(can_sprint)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_sprint |

SetCanGrabProps
β
Sets if this Character is allowed to Grab any Prop
my_character:SetCanGrabProps(can_grab_props)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_grab_props |

SetCanPickupPickables
β
Sets if this Character is allowed to Pick up any Pickable (Weapon, Grenade, Melee...)
my_character:SetCanPickupPickables(can_pickup)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_pickup |

SetCanPunch
β
Sets if this Character is allowed to Punch
my_character:SetCanPunch(can_punch)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_punch |

SetCanDeployParachute
β
Sets if this Character is allowed to deploy the Parachute
my_character:SetCanDeployParachute(can_deploy_parachute)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | can_deploy_parachute |

SetCapsuleSize
β
Sets this Character's Capsule size (will affect Camera location and Character's collision) - default is (42, 96)
my_character:SetCapsuleSize(radius, half_height)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | radius | ||
boolean | half_height |

SetDamageMultiplier
β
Changes how much damage this character takes
my_character:SetDamageMultiplier(bone_name, multiplier)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | bone_name | ||
number | multiplier |

SetDeathSound
β
Changes the Death sound when Character dies
my_character:SetDeathSound(sound_asset)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | sound_asset |

SetFallDamageTaken
β
Set the Fall Damage multiplier taken when falling from High places (default: 10). Setting to 0 will make the Character to do not take damage or enter ragdoll mode
my_character:SetFallDamageTaken(damage)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | damage |

SetFlyingMode
β
Sets the Flying Mode
my_character:SetFlyingMode(flying_mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | flying_mode |

SetFOVMultiplier
β
Sets the Field of View multiplier
my_character:SetFOVMultiplier(multiplier)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | multiplier |

SetHighFallingTime
β
Sets time elapsed until automatically transition to HighFalling state (from SmallFalling). Default is 1 second
my_character:SetHighFallingTime(time)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | time |

SetGaitMode
β
Gait Modes: None, Walking, Sprinting
my_character:SetGaitMode(mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
GaitMode | mode |

SetGravityScale
β
Changes the Gravity Scale of this Character (can be negative)
my_character:SetGravityScale(scale)
Type | Parameter | Default Value | Description |
---|---|---|---|
Vector | scale |

SetHealth
β
Sets the Health of this Character. If the character is dead, respawns it with full health
my_character:SetHealth(new_health)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | new_health |

SetImpactDamageTaken
β
Set the Impact Damage taken when being roamed by things (default: 10). Setting to 0 will make the Character to do not take damage or enter ragdoll mode
my_character:SetImpactDamageTaken(damage)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | damage |

SetInvulnerable
β
Sets if the Character can receive any damage
my_character:SetInvulnerable(is_invulnerable)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | is_invulnerable |

SetJumpZVelocity
β
Sets the velocity of the jump. Default is 450.
my_character:SetJumpZVelocity(velocity)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | velocity |

SetMaxHealth
β
Sets the MaxHealth of this Character
my_character:SetMaxHealth(new_max_health)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | new_max_health |

SetMesh
β
Changes the Character Mesh on the fly
my_character:SetMesh(skeletal_mesh_asset)
Type | Parameter | Default Value | Description |
---|---|---|---|
SkeletalMesh Asset | skeletal_mesh_asset |

SetMorphTarget
β
Set Morph Target with Name and Value
my_character:SetMorphTarget(name, value)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | name | Morph Target Name | |
number | value |

GetMorphTarget
β
Get Morph target with given name
Returns number
my_character:GetMorphTarget(name)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | name | Morph Target Name |

ClearMorphTargets
β
Clear all Morph Target that are set to this Mesh
my_character:ClearMorphTargets()

GetAllMorphTargetNames
β
Returns the list of all morph targets of this Skeletal Mesh
Returns a table
my_character:GetAllMorphTargetNames()

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)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | bone | The body we will be driving | |
boolean | include_self | Whether to modify the given body | |
boolean | is_local_simulation | Whether the drive targets are in world space or local | |
boolean | orientation_strength | 0 | The strength used to correct orientation error |
boolean | angular_velocity_strength | 0 | The strength used to correct angular velocity error |
boolean | position_strength | 0 | The strength used to correct linear position error. Only used for non-local simulation |
boolean | velocity_strength | 0 | The strength used to correct linear velocity error. Only used for non-local simulation |
boolean | max_linear_force | 0 | The max force used to correct linear errors |
boolean | max_angular_force | 0 | The max force used to correct angular errors |

ResetPhysicalAnimationSettings
β
Resets all Physical Animation settings
my_character:ResetPhysicalAnimationSettings()

SetMovementEnabled
β
Resets all Physical Animation settings
my_character:SetMovementEnabled(is_movement_enabled)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | is_movement_enabled |

SetParachuteTexture
β
Changes the Parachute Texture
my_character:SetParachuteTexture(texture)
Type | Parameter | Default Value | Description |
---|---|---|---|
Image Special Path | texture |

SetPainSound
β
Changes the Pain sound when Character takes damage
my_character:SetPainSound(sound_asset)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | sound_asset |

SetPunchDamage
β
Set the Punch Damage this Character will apply on others (default is 15)
my_character:SetPunchDamage(damage)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | damage |

SetRagdollMode
β
Sets Character Ragdoll Mode
my_character:SetRagdollMode(ragdoll_enabled)
Type | Parameter | Default Value | Description |
---|---|---|---|
boolean | ragdoll_enabled |

SetSpeedMultiplier
β
1 = normal
my_character:SetSpeedMultiplier(multiplier)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | multiplier |

SetStanceMode
β
Stance Modes: None, Standing, Crouching, Proning
my_character:SetStanceMode(mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
StanceMode | mode |

SetTeam
β
Sets a Team which will disable damaging same Team Members. 0 for Neutral
my_character:SetTeam(team)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | team |

SetViewMode
β
Changes the Predefined View Mode
View Modes: FPS, TPS1, TPS2, TPS3
my_character:SetViewMode(view_mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
ViewMode | view_mode |

SetWeaponAimMode
β
Aim Modes: None, ADS, ZoomedZoom, Zoomed, ZoomedFar
my_character:SetWeaponAimMode(aim_mode)
Type | Parameter | Default Value | Description |
---|---|---|---|
AimMode | aim_mode |

StopAnimation
β
Stops an Animation Montage on this character
my_character:StopAnimation(animation_path = "")
Type | Parameter | Default Value | Description |
---|---|---|---|
string | animation_path | `` |

UnGrabProp
β
UnGrabs/Drops the Prop the Character is holding
my_character:UnGrabProp()

IsInRagdollMode
β
Gets Character Ragdoll Mode
Returns boolean
my_character:IsInRagdollMode()

IsInvulnerable
β
Gets if the Character can receive damage
Returns boolean
my_character:IsInvulnerable()

IsMovementEnabled
β
Gets Character Movement Enabled
Returns boolean
my_character:IsMovementEnabled()

GetCameraMode
β
Returns CameraMode
my_character:GetCameraMode()

GetCanDrop
β
Returns boolean
my_character:GetCanDrop()

GetCanPunch
β
Returns boolean
my_character:GetCanPunch()

GetCanAim
β
Returns boolean
my_character:GetCanAim()

GetCanCrouch
β
Returns boolean
my_character:GetCanCrouch()

GetCanSprint
β
Returns boolean
my_character:GetCanSprint()

GetCanGrabProps
β
Returns boolean
my_character:GetCanGrabProps()

GetCanPickupPickables
β
Returns boolean
my_character:GetCanPickupPickables()

GetCapsuleSize
β
Gets the Capsule Size set by
:SetCapsuleSize()
Returns a table in the format
{ Radius, HalfHeight }
my_character:GetCapsuleSize()

GetBoneTransform
β
Gets the Bone Transform in World Space
Returns a table in the format
{ Location, Rotation }
my_character:GetBoneTransform(bone_name)
Type | Parameter | Description |
---|---|---|
string | bone_name |

GetControlRotation
β
Gets the rotation this character is looking at
Returns Rotator
my_character:GetControlRotation()

GetDamageMultiplier
β
Returns number
my_character:GetDamageMultiplier(bone_name)
Type | Parameter | Description |
---|---|---|
string | bone_name |

GetFallDamageTaken
β
Returns number
my_character:GetFallDamageTaken()

GetFallingMode
β
Gets the Falling Mode
Returns FallingMode
my_character:GetFallingMode()

GetFlyingMode
β
Gets if the Character is in Flying Mode
Returns FlyingMode
my_character:GetFlyingMode()

GetGaitMode
β
Gets the Gait Mode
Returns GaitMode
my_character:GetGaitMode()

GetGrabbedProp
β
Gets the Grabbing Prop
Returns Prop
my_character:GetGrabbedProp()

GetGravityScale
β
Gets the Gravity Scale of this Character
Returns number
my_character:GetGravityScale()

GetHealth
β
Gets the Character's Health.
Returns number
my_character:GetHealth()

GetImpactDamageTaken
β
Returns number
my_character:GetImpactDamageTaken()

GetJumpZVelocity
β
Returns number
my_character:GetJumpZVelocity()

GetMaxHealth
β
Gets the Character's MaxHealth.
Returns number
my_character:GetMaxHealth()

GetMesh
β
Gets the Mesh Asset name
Returns string
my_character:GetMesh()

GetMovingTo
β
Gets the Character moving to location, returns Vector(0, 0, 0) if it's not
Returns Vector
my_character:GetMovingTo()

GetPicked
β
Gets the holding Picked Melee/Grenade/Weapon
Returns Pickable
my_character:GetPicked()

GetPlayer
β
Gets the Player controlling this Character
Returns Player
my_character:GetPlayer()

GetPunchDamage
β
Returns number
my_character:GetPunchDamage()

GetSpeedMultiplier
β
Returns number
my_character:GetSpeedMultiplier()

GetStanceMode
β
Returns StanceMode
my_character:GetStanceMode()

GetSwimmingMode
β
Returns SwimmingMode
my_character:GetSwimmingMode()

GetTeam
β
Returns number
my_character:GetTeam()

GetVehicle
β
Gets the Vehicle the Character is on
Returns Vehicle
my_character:GetVehicle()

GetViewMode
β
Gets Character View Mode
Returns ViewMode
my_character:GetViewMode()

GetWeaponAimMode
β
Gets Character Aim Mode
Returns AimMode
my_character:GetWeaponAimMode()
Events Detailedβ

AnimationBeginNotify
β
When an Animation Montage Notify begins
Character.Subscribe("AnimationBeginNotify", function(self, notify_name)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
string | notify_name |

AnimationEndNotify
β
When an Animation Montage Notify ends
Character.Subscribe("AnimationEndNotify", function(self, notify_name)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
string | notify_name |

Death
β
When Character Dies
Character.Subscribe("Death", function(self, last_damage_taken, last_bone_damage, damage_type_reason, hit_from_direction, instigator, causer)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
number | last_damage_taken | |
string | last_bone_damaged | |
DamageType | damage_type_reason | |
Vector | hit_from_direction | |
Player | instigator | |
any | causer | The object which caused the damage |
Drop
β
When Character drops the currently picked up Pickable
Character.Subscribe("Drop", function(self, object, triggered_by_player)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Pickable | object | |
boolean | triggered_by_player |
EnterVehicle
β
When Character enters a vehicle
Character.Subscribe("EnterVehicle", function(self, vehicle, seat_index)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Vehicle | vehicle | |
number | seat_index |

AttemptEnterVehicle
β
When Character attempts to enter a vehicle
Return false to prevent it
Character.Subscribe("AttemptEnterVehicle", function(self, vehicle, seat_index)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Vehicle | vehicle | |
number | seat_index |
FallingModeChanged
β
Falling Modes: None, Jumping, Climbing, Vaulting, Falling, HighFalling, Parachuting, SkyDiving
Character.Subscribe("FallingModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
FallingMode | old_state | |
FallingMode | new_state |
Fire
β
When Character fires a Weapon
Character.Subscribe("Fire", function(self, weapon)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Weapon | weapon |
GaitModeChanged
β
Gait Modes: None, Walking, Sprinting
Character.Subscribe("GaitModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
GaitMode | old_state | |
GaitMode | new_state |
GrabProp
β
When Character grabs up a Prop
Character.Subscribe("GrabProp", function(self, prop)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Prop | prop |
HealthChanged
β
When Character has it's Health changed, or because took damage or manually set through scripting or respawning
Character.Subscribe("HealthChanged", function(self, old_health, new_health)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
number | old_health | |
number | new_health |
Highlight
β
When Character highlights/looks at a Prop or a Pickable
Character.Subscribe("Highlight", function(self, is_highlighted, object)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
boolean | is_highlighted | Whether the object is being highlighted or not |
Prop or Pickable | object |

Interact
β
When a Character interacts with a Prop or Pickable to pick it up
Return false to prevent it
Character.Subscribe("Interact", function(self, object)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Pickable or Prop | object |
LeaveVehicle
β
When Character leaves a vehicle
Character.Subscribe("LeaveVehicle", function(self, vehicle)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Vehicle | vehicle |

AttemptLeaveVehicle
β
When Character attempts to leave a vehicle
Return false to prevent it
Character.Subscribe("AttemptLeaveVehicle", function(self, vehicle)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Vehicle | vehicle |
MoveCompleted
β
Called when AI reaches it's destination, or when it fails
Character.Subscribe("MoveCompleted", function(self, succeeded)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
boolean | succeeded |
PickUp
β
When Character picks up anything
Character.Subscribe("PickUp", function(self, object)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Pickable | object |
Possessed
β
When Character is possessed
Character.Subscribe("Possessed", function(self, possesser)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Player | possesser |
Punch
β
When Character punches
Character.Subscribe("Punch", function(self)
end)
Type | Parameter | Description |
---|---|---|
Character | self |
RagdollModeChanged
β
When Character enters or leaves ragdoll
Character.Subscribe("RagdollModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
boolean | old_state | |
boolean | new_state |
AttemptReload
β
When Character attempts to reload a weapon
Return false to prevent it
Character.Subscribe("AttemptReload", function(self, weapon)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Weapon | weapon |
Reload
β
When Character reloads a weapon
Character.Subscribe("Reload", function(self, weapon, ammo_to_reload)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Weapon | weapon | |
number | ammo_to_reload |
Respawn
β
When Character Respawns
Character.Subscribe("Respawn", function(self)
end)
Type | Parameter | Description |
---|---|---|
Character | self |
StanceModeChanged
β
Stance Modes: None, Standing, Crouching, Proning
Character.Subscribe("StanceModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
StanceMode | old_state | |
StanceMode | new_state |
SwimmingModeChanged
β
Swimming Modes: None, Surface, Underwater
Character.Subscribe("SwimmingModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
SwimmingMode | old_state | |
SwimmingMode | new_state |
TakeDamage
β
When Character takes Damage
Return false to cancel the damage (will still display animations, particles and apply impact forces)
Character.Subscribe("TakeDamage", function(self, damage, bone, type, from_direction, instigator, causer)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
number | damage | |
string | bone | Damaged bone |
DamageType | type | Damage Type |
Vector | from_direction | Direction of the damage relative to the damaged actor |
Player | instigator | The player which caused the damage |
any | causer | The object which caused the damage |
UnGrabProp
β
When Character drops a Prop
Character.Subscribe("UnGrabProp", function(self, prop)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Prop | prop |
UnPossessed
β
When Character is unpossessed
Character.Subscribe("UnPossessed", function(self, old_possesser)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
Player | old_possesser |
ViewModeChanged
β
When Character changes it's View Mode: FPS, TPS1, TPS2, TPS3
Character.Subscribe("ViewModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
ViewMode | old_state | |
ViewMode | new_state |
WeaponAimModeChanged
β
Aim Modes: None, ADS, ZoomedZoom, Zoomed, ZoomedFar
Character.Subscribe("WeaponAimModeChanged", function(self, old_state, new_state)
end)
Type | Parameter | Description |
---|---|---|
Character | self | |
AimMode | old_state | |
AimMode | new_state |
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 Targets | Mat. Scalar Params | Mat. Color Params | Mat. Texture Params |
---|---|---|---|
nose1 | BaseColorPower | LipstickTint | Texture |
nose2 | Muscular | BrowsTint | LipstickMask |
brows | Specular | BlushTint | BrowsMask |
mouth | Roughness | EyeShadowTint | BlushMask |
fat | Scatter | UnderwearTint | EyeShadowMask |
nose3 | DetailAmount | HairTint | Normal |
chin | DetailScale | Tint | NormalMuscular |
face | UnderwearRoughness | UnderwearMask | |
nose4 | UnderwearSpecular | SR | |
skinny | HairScatter | HairTexture | |
jaw | HairAlphaPower | HairSpecular | |
brows2 | HairSpecularMultiplier | HairRoughness | |
angry | HairRoughnessMultiplier | HairTangent | |
smirk | HairPixelDepth | ||
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