🧑 角色
角色代表可以被附身、移动并与世界互动的 Actor。它们是为 nanos world 构建的默认骨骼网格体角色。

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.
🎒 示例
-- 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")
更多相关示例:
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🛠 构造函数
Default Constructor
No description provided
local my_character = Character(location, rotation, skeletal_mesh_asset, collision_type?, gravity_enabled?, max_health?, death_sound?, pain_sound?, defer_spawn?)
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | No description provided |
| Rotator | rotation | Required parameter | No description provided |
| SkeletalMesh Reference | skeletal_mesh_asset | Required parameter | No description provided |
| CollisionType | collision_type | CollisionType.Auto | No description provided |
| boolean | gravity_enabled | true | No description provided |
| integer | max_health | 100 | 当前 / 最大生命值 |
| Sound Reference | death_sound | nanos-world::A_Male_01_Death | 角色死亡时播放 |
| Sound Reference | pain_sound | nanos-world::A_Male_01_Pain | 角色受到伤害时播放 |
| boolean | defer_spawn | false | 传入 true 以避免立即将该实体发送给客户端,从而在你想要通过设置多个配置来调整它时提高性能。最后必须调用 FinishSpawn() |
🗿 静态函数
Inherited Entity Static Functions
Base Entityscripting-reference/classes/base-classes/entity
| Returns | Name | Description | |
|---|---|---|---|
| table of Base Entity | GetAll | 返回一个包含调用此方法的类中所有实体的表 | |
| Base Entity | GetByIndex | 返回该类中指定索引处的特定实体 | |
| integer | GetCount | 返回该类当前存在的实体数量 | |
| table of table | GetInheritedClasses | 获取使用 继承系统 创建的、直接继承自该类的所有子类列表 | |
| iterator | GetPairs | 返回一个包含该类所有实体的迭代器,用于 pairs() 循环 | |
| table or nil | GetParentClass | 如果该类是使用 继承系统 创建的,则获取其父类 | |
| table | Inherit | 使用 继承系统 继承此类 | |
| boolean | IsChildOf | 如果该类是使用 继承系统 创建的,检查此类是否为另一个类的子类 | |
| function | Subscribe | 为该类的所有实体订阅一个 事件 | |
| function | SubscribeRemote | 订阅从服务器调用的自定义远程事件 | |
Unsubscribe | 退订此包内该类中此 事件 的所有回调,或者仅取消传入的特定回调 |
This class doesn't have own static functions.
🦠 函数
Inherited Entity Functions
Base Entityscripting-reference/classes/base-classes/entity
| Returns | Name | Description | |
|---|---|---|---|
BroadcastRemoteEvent | 直接在此实体上向所有玩家调用自定义远程事件 | ||
BroadcastRemoteInRadiusEvent | 直接针对此实体调用自定义远程事件,并将该事件传递给半径范围内的所有玩家 | ||
CallRemoteEvent | 直接在此实体上向特定玩家调用自定义远程事件 | ||
CallRemoteEvent | 直接在此实体上调用自定义远程事件 | ||
CallRemotePlayersEvent | 直接在此实体上调用自定义远程事件,并将事件传递给玩家列表 | ||
Destroy | 销毁该实体 | ||
FinishSpawn | 完成生成过程,如果实体是通过 defer_spawn 生成的,则将实体发送给客户端 | ||
| table of string | GetAllValuesKeys | 获取所有值键的列表 | |
| table | GetClass | 获取该实体的类 | |
| integer | GetID | 获取该实体的全网通用网络 ID(在客户端和服务器上相同) | |
| any | GetValue | 获取此实体上存储在给定键处的 值 | |
| boolean | HasAuthority | 获取本地上下文是否对此实体拥有主控(如果由客户端生成则为 true,由服务器生成则为 false) | |
| boolean | IsA | 递归检查此实体是否继承自某个类 | |
| boolean | IsBeingDestroyed | 如果该实体正在被销毁,则返回 true | |
| boolean | IsValid | 如果该实体有效(即未被销毁且指向一个有效的实体),则返回 true | |
SetValue | 在此实体中设置一个值 | ||
| function | Subscribe | 在这个特定实体上订阅一个事件 | |
| function | SubscribeRemote | 在这个特定实体上订阅一个从服务器调用的自定义远程事件 | |
Unsubscribe | 退订此包内该实体中此 事件 的所有回调,或者仅取消传入的特定回调 |
Inherited Actor Functions
Base Actorscripting-reference/classes/base-classes/actor
| Returns | Name | Description | |
|---|---|---|---|
AddActorTag | 向该 Actor 添加一个虚幻 Actor 标签 | ||
AddAngularImpulse | 向该 Actor 添加角冲量。适用于单次瞬间爆发 | ||
AddImpulse | 向该 Actor 添加冲量。适用于单次瞬间爆发 | ||
| boolean | AttachTo | 将该 Actor 附加到任何其他 Actor 上,可选择附加在特定骨骼处 | |
Detach | 将该 Actor 从其附加的 Actor 上分离 | ||
| table of string | GetActorTags | 获取该 Actor 上的所有虚幻 Actor 标签 | |
| Vector | GetAngularForce | 获取该 Actor 的角外力(由 SetAngularForce() 设置) | |
| float | GetAngularVelocity | Returns the angular velocity of this Actor | |
| table of Base Actor | GetAttachedEntities | 获取附加到该 Actor 的所有 Actor | |
| Base Actor or nil | GetAttachedTo | 获取该 Actor 所附加到的父级 Actor | |
| table | GetBounds | 获取该 Actor 的边界范围 | |
| CollisionType | GetCollision | 获取该 Actor 的碰撞类型 | |
| integer | GetDimension | 获取该 Actor 的维度 | |
| float | GetDistanceFromCamera | 获取该 Actor 距离相机的距离 | |
| Vector | GetForce | 获取该 Actor 的持续外力(由 SetForce() 设置) | |
| Vector | GetLocation | 获取该 Actor 在游戏世界中的位置 | |
| float | GetMass | Returns the mass of this Actor | |
| Player or nil | GetNetworkAuthority | 获取该 Actor 的网络主控玩家 | |
| Vector | GetRelativeLocation | 如果该 Actor 已附加,获取其相对位置 | |
| Rotator | GetRelativeRotation | 如果该 Actor 已附加,获取其相对旋转 | |
| Rotator | GetRotation | 获取该 Actor 在游戏世界中的角度值 | |
| Vector | GetScale | 获取该 Actor 的缩放比例 | |
| float | GetScreenPercentage | 获取该 Actor 在屏幕中所占尺寸的百分比 | |
| table | GetSocketTransform | 在给定骨骼或插槽名称的情况下,获取世界空间中的插槽变换 | |
| Vector | GetVelocity | 获取该 Actor 当前的速度 | |
| boolean | HasNetworkAuthority | 如果本地玩家当前是该 Actor 的网络主控(Network Authority),则返回 true | |
| boolean | IsGravityEnabled | 如果该 Actor 启用了重力,则返回 true | |
| boolean | IsInWater | 如果该 Actor 处于水中,则返回 true | |
| boolean | IsNetworkDistributed | 如果该 Actor 当前处于网络分配状态,则返回 true | |
| boolean | IsVisible | 如果该 Actor 可见,则返回 true | |
RemoveActorTag | 从该 Actor 中移除一个虚幻 Actor 标签 | ||
RotateTo | 在一定时间内平滑旋转该 Actor 到指定角度 | ||
SetAngularForce | 向该 Actor 添加一个永久的角外力,设为 Vector(0, 0, 0) 可以取消 | ||
SetCastShadow | 设置该 Actor 是否投射阴影 | ||
SetCollision | 设置该 Actor 的碰撞类型 | ||
SetDimension | 设置该 Actor 的维度 | ||
SetDistanceOptimizationMultiplier | Sets this Actor's distance optimization multiplier | ||
SetForce | Adds a permanent force to this Actor, set to Vector(0, 0, 0) to cancel | ||
SetGravityEnabled | Sets whether gravity is enabled on this Actor | ||
SetHighlightEnabled | Sets whether the highlight is enabled on this Actor, and which highlight index to use | ||
SetLifeSpan | Sets the time (in seconds) before this Actor is destroyed. After this time has passed, the actor will be automatically destroyed. | ||
SetLocation | Sets this Actor's location in the game world | ||
SetNetworkAuthority | Sets the Player to have network authority over this Actor | ||
SetNetworkAuthorityAutoDistributed | Sets if this Actor will auto distribute the network authority between players | ||
SetOutlineEnabled | Sets whether the outline is enabled on this Actor, and which outline index to use | ||
SetRelativeLocation | Sets this Actor's relative location in local space (only if this actor is attached) | ||
SetRelativeRotation | Sets this Actor's relative rotation in local space (only if this actor is attached) | ||
SetRenderCullDistance | Sets this Actor's render cull distance | ||
SetRotation | Sets this Actor's rotation in the game world | ||
SetScale | Sets this Actor's scale | ||
SetVisibility | Sets whether the actor is visible or not | ||
TranslateTo | Smoothly moves this actor to a location over a certain time | ||
| boolean | WasRecentlyRendered | Gets if this Actor was recently rendered on screen |
Inherited Paintable Functions
Base Paintablescripting-reference/classes/base-classes/paintable
| Returns | Name | Description | |
|---|---|---|---|
| Color | GetMaterialColorParameter | 从该 Actor 的材质中获取 Color 参数 | |
| float | GetMaterialScalarParameter | 从该 Actor 的材质中获取 Scalar 参数 | |
| string | GetMaterialTextureParameter | 从该 Actor 的材质中获取 Texture 参数 | |
| Vector | GetMaterialVectorParameter | 从该 Actor 的材质中获取 Vector 参数 | |
ResetMaterial | 将指定索引处的材质重置为原始材质 | ||
SetMaterial | 设置该 Actor 指定索引处的材质 | ||
SetMaterialColorParameter | 设置该 Actor 材质中的 Color 参数 | ||
SetMaterialFromCanvas | 将该 Actor 指定索引处的材质设为 Canvas 对象 | ||
SetMaterialFromSceneCapture | 将该 Actor 指定索引处的材质设为 SceneCapture 对象 | ||
SetMaterialFromWebUI | 将该 Actor 指定索引处的材质设为 WebUI 对象 | ||
SetMaterialScalarParameter | 设置该 Actor 材质中的 Scalar 参数 | ||
SetMaterialTextureParameter | 将该 Actor 材质中的纹理参数设为一张图像 | ||
SetMaterialVectorParameter | 设置该 Actor 材质中的 Vector 参数 | ||
SetPhysicalMaterial | 使用新的物理材质覆盖该 Actor 的物理材质 |
Inherited Damageable Functions
Base Damageablescripting-reference/classes/base-classes/damageable
| Returns | Name | Description | |
|---|---|---|---|
| integer | ApplyDamage | 对该实体造成伤害 | |
| float | GetDamageMultiplier | 获取特定骨骼的伤害系数 | |
| integer | GetHealth | 获取当前生命值 | |
| integer | GetMaxHealth | 获取最大生命值 | |
| boolean | IsDead | 返回该实体是否已死亡 | |
Respawn | 重生该实体,恢复其生命值并将其移动到初始位置 | ||
SetDamageMultiplier | 更改该实体在特定骨骼上受到的伤害大小 | ||
SetHealth | 设置该实体的生命值 | ||
SetMaxHealth | 设置该实体的最大生命值 |
Inherited Pawn Functions
Base Pawnscripting-reference/classes/base-classes/pawn
| Returns | Name | Description | |
|---|---|---|---|
AddSkeletalMeshAttached | 附加一个骨骼网格体作为该实体的骨骼主姿态 | ||
AddStaticMeshAttached | 附加一个静态网格体到此实体 | ||
Follow | AI:让该角色跟随另一个 Actor | ||
| table of string | GetAllSkeletalMeshAttached | 获取附加到此实体的所有骨骼网格体 | |
| table of string | GetAllStaticMeshAttached | 获取附加到此实体的所有静态网格体 | |
| table | GetCapsuleSize | 获取胶囊体大小 | |
| Rotator | GetControlRotation | 获取控制旋转 | |
| boolean | GetFlyingMode | 获取是否处于飞行模式 | |
| float | GetGravityScale | 获取重力缩放值 | |
| SkeletalMesh Reference | GetMesh | 获取基础网格体资产 | |
| Vector | GetMovingTo | 获取正在移动去往的位置 | |
| Player or nil | GetPlayer | 获取当前控制此实体的玩家 | |
HideBone | 隐藏此角色的某根骨骼 | ||
| boolean | IsBoneHidden | 获取某根骨骼是否被隐藏 | |
Jump | 触发此角色进行跳跃 | ||
MoveTo | AI:让该角色步行移动到指定位置 | ||
RemoveAllSkeletalMeshesAttached | 移除所有已附加的骨骼网格体 | ||
RemoveAllStaticMeshesAttached | 移除所有已附加的静态网格体 | ||
RemoveSkeletalMeshAttached | 根据自定义 ID 移除此实体上已存在的骨骼网格体 | ||
RemoveStaticMeshAttached | 根据自定义 ID 移除此实体上已存在的静态网格体 | ||
SetAIAvoidanceSettings | AI:配置 AI 移动时使用的 RVO(相互速度障碍物)避让系统 | ||
SetBrakingSettings | 设置此角色的移动制动设置 | ||
SetCanCrouch | 设置此角色是否被允许下蹲和俯卧 | ||
SetCanJump | 设置此角色是否被允许跳跃 | ||
SetCapsuleSize | 设置此角色的胶囊体大小 | ||
SetControlRotation | 设置控制旋转 | ||
SetFlyingMode | 设置飞行模式 | ||
SetGravityScale | 更改重力缩放值 | ||
SetHitReactionEnabled | 设置角色在受到伤害时是否触发受击反应,通过对受损的本地骨骼应用微小的动态布娃娃效果 | ||
SetJumpZVelocity | 设置跳跃的速度 | ||
SetMeshSettings | 配置网格体附加设置和可见性 | ||
SetRagdollOnDeathEnabled | Sets if the character will enter ragdoll mode when it dies. You can set it to false to apply custom Death animations | ||
SetStaticMeshAttachedTransform | 设置已附加静态网格体的位置和旋转 | ||
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 |


ClearMorphTargets
清除设置在此网格体上的所有变形目标
my_character:ClearMorphTargets()
See also SetMorphTarget, GetMorphTarget, GetAllMorphTargetNames.


Drop
丢弃角色当前持有的任何可拾取物
my_character:Drop()


EnterVehicle
进入载具的指定座位(0 - 驾驶人)
my_character:EnterVehicle(vehicle, seat?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Base Vehicle | vehicle | Required parameter | No description provided |
| integer | seat? | 0 | No description provided |
See also GetVehicle, GetVehicleSeat, EnterVehicle, AttemptEnterVehicle.


GetAllMorphTargetNames
返回一个包含所有可用变形目标的表
local ret = my_character:GetAllMorphTargetNames()
See also SetMorphTarget, GetMorphTarget, ClearMorphTargets.


GetCameraMode
获取相机模式
local camera_mode = my_character:GetCameraMode()
Returns
| Type | Description |
|---|---|
| CameraMode | camera_mode |
See also SetCameraMode.


GetCanAim
获取是否可以瞄准
local can_aim = my_character:GetCanAim()
Returns
| Type | Description |
|---|---|
| boolean | can_aim |
See also SetCanAim.


GetCanCrouch
获取是否可以下蹲
local can_crouch = my_character:GetCanCrouch()
Returns
| Type | Description |
|---|---|
| boolean | can_crouch |


GetCanDrop
获取是否可以丢弃物品
local can_drop = my_character:GetCanDrop()
Returns
| Type | Description |
|---|---|
| boolean | can_drop |
See also SetCanDrop.


GetCanGrabProps
获取是否可以抓取道具
local can_grab_props = my_character:GetCanGrabProps()
Returns
| Type | Description |
|---|---|
| boolean | can_grab_props |
See also SetCanGrabProps.


GetCanPickupPickables
获取是否可以拾取可拾取物(武器、近战武器、手榴弹……)
local can_pickup = my_character:GetCanPickupPickables()
Returns
| Type | Description |
|---|---|
| boolean | can_pickup |
See also SetCanPickupPickables.


GetCanPunch
获取是否可以出拳
local can_punch = my_character:GetCanPunch()
Returns
| Type | Description |
|---|---|
| boolean | can_punch |
See also SetCanPunch.


GetCanSprint
获取是否可以疾跑
local can_sprint = my_character:GetCanSprint()
Returns
| Type | Description |
|---|---|
| boolean | can_sprint |
See also SetCanSprint.


GetCanUsePickables
获取是否可以使用可拾取物(武器、近战武器、手榴弹……)
local can_use = my_character:GetCanUsePickables()
Returns
| Type | Description |
|---|---|
| boolean | can_use |
See also SetCanUsePickables.


GetFallDamageTaken
获取坠落伤害
local damage = my_character:GetFallDamageTaken()
Returns
| Type | Description |
|---|---|
| integer | damage |
See also SetFallDamageTaken.


GetFallingMode
获取 FallingMode(坠落模式)
local ret = my_character:GetFallingMode()
Returns
| Type | Description |
|---|---|
| FallingMode | No description provided |


GetGaitMode
获取 GaitMode(步态模式)
local gait_mode = my_character:GetGaitMode()
Returns
| Type | Description |
|---|---|
| GaitMode | gait_mode |
See also SetGaitMode.


GetGrabbedProp
获取被抓取的道具
local prop = my_character:GetGrabbedProp()
See also GrabProp, UnGrabProp.


GetImpactDamageTaken
获取受到的撞击伤害
local impact_damage = my_character:GetImpactDamageTaken()
Returns
| Type | Description |
|---|---|
| integer | impact_damage |
See also SetImpactDamageTaken.


GetJumpZVelocity
获取跳跃 Z 轴速度
local jump_z_velocity = my_character:GetJumpZVelocity()
Returns
| Type | Description |
|---|---|
| integer | jump_z_velocity |


GetMorphTarget
返回指定变形目标的值
local value = my_character:GetMorphTarget(name)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | name | Required parameter | 变形目标名称 |
Returns
| Type | Description |
|---|---|
| float | 变形目标的值 |
See also SetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


GetPicked
获取当前正在拾取的可拾取物
local object = my_character:GetPicked()
Returns
| Type | Description |
|---|---|
| Base Pickable or nil | object |


GetPunchDamage
获取出拳伤害
local punch_damage = my_character:GetPunchDamage()
Returns
| Type | Description |
|---|---|
| integer | punch_damage |
See also SetPunchDamage.


GetSpeedMultiplier
获取速度系数
local speed_multiplier = my_character:GetSpeedMultiplier()
Returns
| Type | Description |
|---|---|
| float | speed_multiplier |
See also SetSpeedMultiplier.


GetStanceMode
获取姿态模式
local stance_mode = my_character:GetStanceMode()
Returns
| Type | Description |
|---|---|
| StanceMode | stance_mode |
See also SetStanceMode.


GetSwimmingMode
获取游泳模式
local swimming_mode = my_character:GetSwimmingMode()
Returns
| Type | Description |
|---|---|
| SwimmingMode | swimming_mode |


GetTeam
获取团队
local team = my_character:GetTeam()
Returns
| Type | Description |
|---|---|
| integer | team |
See also SetTeam.


GetVehicle
获取已进入的载具
local vehicle = my_character:GetVehicle()
Returns
| Type | Description |
|---|---|
| Base Vehicle or nil | vehicle |
See also EnterVehicle, LeaveVehicle.


GetVehicleSeat
获取已进入的载具座位
local seat_index = my_character:GetVehicleSeat()
Returns
| Type | Description |
|---|---|
| integer | The seat index the Character is sitting in the Vehicle. -1 if not in a Vehicle |


GetViewMode
获取视角模式
local view_mode = my_character:GetViewMode()
Returns
| Type | Description |
|---|---|
| ViewMode | view_mode |
See also SetViewMode.


GetWeaponAimMode
获取武器瞄准模式
local aim_mode = my_character:GetWeaponAimMode()
Returns
| Type | Description |
|---|---|
| AimMode | aim_mode |
See also SetWeaponAimMode.


GrabProp
给予角色一个道具
my_character:GrabProp(prop)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Prop | prop | Required parameter | No description provided |
See also GetGrabbedProp.


IsInputEnabled
获取是否启用了输入
local is_enabled = my_character:IsInputEnabled()
Returns
| Type | Description |
|---|---|
| boolean | is_enabled |
See also SetInputEnabled.


IsInRagdollMode
获取角色是否处于布娃娃模式
local ragdoll_enabled = my_character:IsInRagdollMode()
Returns
| Type | Description |
|---|---|
| boolean | ragdoll_enabled |


IsInvulnerable
获取是否无敌
local is_invulnerable = my_character:IsInvulnerable()
Returns
| Type | Description |
|---|---|
| boolean | is_invulnerable |
See also SetInvulnerable.


LeaveVehicle
离开当前载具
my_character:LeaveVehicle()
See also EnterVehicle, GetVehicle, LeaveVehicle, AttemptLeaveVehicle.


LookAt
AI:尝试使该角色看向指定位置
my_character:LookAt(location)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | 要注视的世界坐标位置 |


PickUp
给予角色一个近战武器/手榴弹/武器(可拾取物)
my_character:PickUp(pickable)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Base Pickable | pickable | Required parameter | No description provided |


PlayAnimation
在此角色上播放动画蒙太奇
my_character:PlayAnimation(animation_path, slot_type?, loop_indefinitely?, blend_in_time?, blend_out_time?, play_rate?, stop_all_montages?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | animation_path | Required parameter | No description provided |
| AnimationSlotType | slot_type? | AnimationSlotType.FullBody | No description provided |
| boolean | loop_indefinitely? | false | No description provided |
| float | blend_in_time? | 0.25 | No description provided |
| float | blend_out_time? | 0.25 | 传入 -1 以禁用自动混出,并使动画永远保持在最后一帧姿态 |
| float | play_rate? | 1.0 | No description provided |
| boolean | stop_all_montages? | false | 停止来自同一组的所有正在播放的蒙太奇 |
See also StopAnimation.


ResetPhysicalAnimationSettings
重置所有物理动画设置
my_character:ResetPhysicalAnimationSettings()


SetAccelerationSettings
设置此角色的移动最大加速度
my_character:SetAccelerationSettings(walking?, parachuting?, skydiving?, falling?, swimming?, swimming_surface?, flying?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | walking? | 768 | No description provided |
| integer | parachuting? | 512 | No description provided |
| integer | skydiving? | 768 | No description provided |
| integer | falling? | 128 | No description provided |
| integer | swimming? | 256 | No description provided |
| integer | swimming_surface? | 256 | No description provided |
| integer | flying? | 1024 | No description provided |


SetAirControl
设置角色处于空中时允许的移动控制量
my_character:SetAirControl(air_control?, boost_multiplier?, boost_velocity_threshold?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | air_control? | 0.2 | 下落时,角色可用的横向移动控制量。0 = 无法控制,1 = 在 MaxWalkSpeed 最大速度下完全控制 |
| float | boost_multiplier? | 512 | 下落时,当横向速度小于 boost_velocity_threshold 时应用于 air_control 的系数。将其设为 0 将禁用空中控制增强。最终结果会被限制在 1 以内 |
| float | boost_velocity_threshold? | 25 | 下落时,如果横向速度大小小于该值,则 air_control 会乘以 boost_multiplier。将其设为 0 将禁用空中控制增强 |


SetAnimationIdleWalkRunCrouching
设置下蹲状态的混合空间(2D)动画
水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunCrouching(blend_space_path, enable_turn_in_place?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | blend_space_path | Required parameter | No description provided |
| boolean | enable_turn_in_place? | false | No description provided |


SetAnimationIdleWalkRunProning
设置俯卧状态的混合空间(2D)动画
水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunProning(blend_space_path)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | blend_space_path | Required parameter | No description provided |


SetAnimationIdleWalkRunStanding
设置站立状态的混合空间(2D)动画
水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunStanding(blend_space_path, enable_turn_in_place?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | blend_space_path | Required parameter | No description provided |
| boolean | enable_turn_in_place? | false | No description provided |


SetAnimationsTransitionCrouchingProning
设置下蹲与俯卧之间的过渡动画
my_character:SetAnimationsTransitionCrouchingProning(crouching_to_proning, proning_to_crouching)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | crouching_to_proning | Required parameter | No description provided |
| Animation Reference | proning_to_crouching | Required parameter | No description provided |


SetAnimationsTransitionStandingCrouching
设置站立与下蹲之间的过渡动画
my_character:SetAnimationsTransitionStandingCrouching(standing_to_crouching, crouching_to_standing)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Animation Reference | standing_to_crouching | Required parameter | No description provided |
| Animation Reference | crouching_to_standing | Required parameter | No description provided |


SetCameraMode
设置相机模式(例如:仅第三人称 (TPS)、仅第一人称 (FPS) 或允许两者)
对 AI 使用 FPSOnly 相机模式将锁定其身体旋转(当使用 LookAt 时)
my_character:SetCameraMode(camera_mode)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| CameraMode | camera_mode | Required parameter | No description provided |
See also GetCameraMode.


SetCanAim
设置此角色是否允许瞄准
my_character:SetCanAim(can_aim)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_aim | Required parameter | No description provided |
See also GetCanAim.


SetCanDeployParachute
设置此角色是否允许部署降落伞
my_character:SetCanDeployParachute(can_deploy_parachute)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_deploy_parachute | Required parameter | No description provided |


SetCanDive
设置此角色是否允许下潜
my_character:SetCanDive(can_dive)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_dive | Required parameter | No description provided |


SetCanDrop
设置此角色是否允许丢弃当前拾取的物品
my_character:SetCanDrop(can_drop)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_drop | Required parameter | No description provided |
See also GetCanDrop.


SetCanGrabProps
设置此角色是否允许抓取任何道具
my_character:SetCanGrabProps(can_grab_props)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_grab_props | Required parameter | No description provided |
See also GetCanGrabProps.


SetCanPickupPickables
设置此角色是否允许拾取任何可拾取物(武器、手榴弹、近战武器……)
my_character:SetCanPickupPickables(can_pickup)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_pickup | Required parameter | No description provided |
See also GetCanPickupPickables.


SetCanPunch
设置此角色是否允许出拳
my_character:SetCanPunch(can_punch)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_punch | Required parameter | No description provided |
See also GetCanPunch.


SetCanSprint
设置此角色是否允许疾跑
my_character:SetCanSprint(can_sprint)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_sprint | Required parameter | No description provided |
See also GetCanSprint.


SetCanUsePickables
设置此角色是否允许使用可拾取物(武器、手榴弹、近战武器……)
my_character:SetCanUsePickables(can_use)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | can_use | Required parameter | No description provided |
See also GetCanUsePickables.


SetDeathSound
更改角色死亡时的死亡声音
my_character:SetDeathSound(sound_asset)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Sound Reference | sound_asset | Required parameter | No description provided |


SetFallDamageTaken
设置从高处坠落时承受的坠落伤害系数。
设为 0 将使角色不受到任何坠落伤害
my_character:SetFallDamageTaken(damage)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | damage | Required parameter | 默认值为 10 |
See also GetFallDamageTaken.


SetFootstepVolumeMultiplier
设置脚步声音量系数
my_character:SetFootstepVolumeMultiplier(volume_multiplier)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | volume_multiplier | Required parameter | No description provided |


SetFOVMultiplier
设置视场角系数
my_character:SetFOVMultiplier(multiplier)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | multiplier | Required parameter | No description provided |


SetGaitMode
设置步态模式
my_character:SetGaitMode(gait_mode)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| GaitMode | gait_mode | Required parameter | No description provided |
See also GetGaitMode.


SetHighFallingTime
设置自动从 SmallFalling 过渡到 HighFalling 状态所经过的时间(秒)
将其设为 -1 将永远不会进入 HighFalling 状态,因此下落时不会成为布娃娃
my_character:SetHighFallingTime(time)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | time | Required parameter | 默认值为 1 秒 |
See also SetRagdollOnHitEnabled.


SetImpactDamageTaken
设置被物体碾压时承受的撞击伤害。
设为 0 将使角色不承受伤害,也不会进入布娃娃模式
my_character:SetImpactDamageTaken(impact_damage)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | impact_damage | Required parameter | 默认值为 10 |
See also SetRagdollOnHitEnabled, GetImpactDamageTaken.


SetInputEnabled
启用/禁用角色的输入
my_character:SetInputEnabled(is_enabled)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | is_enabled | Required parameter | No description provided |
See also IsInputEnabled.


SetInvulnerable
设置角色是否可以接受任何伤害
my_character:SetInvulnerable(is_invulnerable)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | is_invulnerable | Required parameter | No description provided |
See also IsInvulnerable.


SetMesh
动态更改角色的网格体
my_character:SetMesh(skeletal_mesh_asset)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| SkeletalMesh Reference | skeletal_mesh_asset | Required parameter | No description provided |


SetMorphTarget
通过名称和值设置变形目标
my_character:SetMorphTarget(name, value)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | name | Required parameter | 变形目标名称 |
| float | value | Required parameter | No description provided |
See also GetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


SetPainSound
更改角色受到伤害时的痛苦声音
my_character:SetPainSound(sound_asset)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Sound Reference | sound_asset | Required parameter | No description provided |


SetParachuteTexture
更改降落伞的纹理
my_character:SetParachuteTexture(texture)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Image Path | texture | Required parameter | No description provided |


SetPhysicalAnimationSettings
将物理动画设置应用给指定的骨骼体
my_character:SetPhysicalAnimationSettings(bone, include_self, is_local_simulation, orientation_strength?, angular_velocity_strength?, position_strength?, velocity_strength?, max_linear_force?, max_angular_force?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | bone | Required parameter | 我们将驱动的骨骼体 |
| boolean | include_self | Required parameter | 是否修改给定的骨骼体 |
| boolean | is_local_simulation | Required parameter | 驱动目标是在世界空间还是本地空间 |
| float | orientation_strength? | 0 | 用于修正朝向误差的强度 |
| float | angular_velocity_strength? | 0 | 用于修正角速度误差的强度 |
| float | position_strength? | 0 | 用于修正线性位置误差的强度。仅用于非本地模拟 |
| float | velocity_strength? | 0 | 用于修正线性速度误差的强度。仅用于非本地模拟 |
| float | max_linear_force? | 0 | 用于修正线性误差的最大力 |
| float | max_angular_force? | 0 | 用于修正角度误差的最大力 |


SetPhysicsAsset
设置角色的物理资产
my_character:SetPhysicsAsset(physics_asset)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Other | physics_asset | Required parameter | No description provided |


SetPunchDamage
设置该角色对他人施加的出拳伤害
my_character:SetPunchDamage(punch_damage)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | punch_damage | Required parameter | 默认值为 15 |
See also GetPunchDamage.


SetRadialDamageToRagdoll
设置触发角色进入布娃娃模式所需的最小径向伤害(例如爆炸)。
设为 -1 将使角色在受到径向伤害时不会进入布娃娃模式
my_character:SetRadialDamageToRagdoll(damage)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | damage | Required parameter | 默认值为 50 |


SetRagdollMode
设置角色的布娃娃模式
my_character:SetRagdollMode(ragdoll_enabled)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | ragdoll_enabled | Required parameter | No description provided |


SetRagdollOnHitEnabled
设置角色在被物体撞击或从高处坠落时是否会进入布娃娃模式
my_character:SetRagdollOnHitEnabled(is_enabled)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | is_enabled | Required parameter | No description provided |
See also SetHighFallingTime.


SetRagdollStandUpCooldown
设置此角色从布娃娃状态起立之前的冷却时间(以秒为单位)
my_character:SetRagdollStandUpCooldown(time)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | time | Required parameter | No description provided |


SetSimulatePhysics
设置角色胶囊体以模拟物理效果
my_character:SetSimulatePhysics(simulate_physics)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | simulate_physics | Required parameter | No description provided |


SetSpeedMultiplier
设置所有速度的系数
my_character:SetSpeedMultiplier(speed_multiplier)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | speed_multiplier | Required parameter | 1 为正常速度 |
See also GetSpeedMultiplier.


SetStanceMode
设置姿态模式
my_character:SetStanceMode(stance_mode)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| StanceMode | stance_mode | Required parameter | No description provided |
See also GetStanceMode.


SetTeam
设置团队,将禁用对同一团队成员的伤害
my_character:SetTeam(team)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | team | Required parameter | 0 为中立且为默认值 |
See also GetTeam.


SetViewMode
设置视角模式
my_character:SetViewMode(view_mode)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| ViewMode | view_mode | Required parameter | No description provided |
See also GetViewMode.


SetWeaponAimMode
设置武器的瞄准模式
my_character:SetWeaponAimMode(aim_mode)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| AimMode | aim_mode | Required parameter | No description provided |
See also GetWeaponAimMode.


UnGrabProp
取消抓取/丢弃角色当前持有的道具
my_character:UnGrabProp()
🚀 事件
Inherited Entity Events
Base Entityscripting-reference/classes/base-classes/entity
| Name | Description | |
|---|---|---|
ClassRegister | 当使用 继承系统 注册一个新类时触发 | |
Destroy | 当实体被销毁时触发 | |
Spawn | 当实体被生成/创建时触发 | |
ValueChange | 当实体通过 :SetValue() 改变了值时触发 |
Inherited Actor Events
Base Actorscripting-reference/classes/base-classes/actor
| Name | Description | |
|---|---|---|
DimensionChange | 当 Actor 改变其维度时触发 | |
NetworkAuthorityChange | Triggered when an Actor changes its network authority Player | |
NetworkAuthorityChange | Triggered when the local Player gets/loses network authority over this actor |
Inherited Damageable Events
Base Damageablescripting-reference/classes/base-classes/damageable
| Name | Description | |
|---|---|---|
Death | 当实体死亡时 | |
HealthChange | 当实体的生命值发生改变时,无论是由于受到伤害,还是通过脚本或重生进行手动设置 | |
Respawn | 当实体重生时 | |
TakeDamage | 当此实体受到伤害时触发 |
Inherited Pawn Events
Base Pawnscripting-reference/classes/base-classes/pawn
| Name | Description | |
|---|---|---|
AnimationBeginNotify | 当动画蒙太奇通知开始时 | |
AnimationEndNotify | 当动画蒙太奇通知结束时 | |
MoveComplete | 当 AI 到达目的地或失败时调用 | |
Possess | 当角色被玩家控制时 | |
UnPossess | 当角色被玩家取消控制时 |
| Name | Description | |
|---|---|---|
Attack | 当角色使用近战武器有效进行攻击时触发 | |
AttemptEnterVehicle | 当角色尝试进入载具时触发 | |
AttemptLeaveVehicle | 当角色尝试离开载具时触发 | |
AttemptReload | 当角色尝试换弹时触发 | |
Drop | 当角色丢弃当前拾取的可拾取物时 | |
EnterVehicle | 当角色进入载具时 | |
FallingModeChange | 当 FallingMode 发生改变时调用 | |
Fire | 当角色开火武器时 | |
GaitModeChange | 当 GaitMode(步态模式)发生改变时调用 | |
GrabProp | 当角色抓取起一个道具时 | |
Highlight | 当角色高亮/注视一个道具或可拾取物时触发 | |
Interact | 当角色与道具或可拾取物互动时触发 | |
LeaveVehicle | 当角色离开载具时 | |
PickUp | 当角色拾取任何物品时 | |
PullUse | 当角色按下可拾取物的使用键时触发(即装备该物品时单击鼠标左键) | |
Punch | 当角色出拳时 | |
RagdollModeChange | 当角色进入或离开布娃娃状态时 | |
ReleaseUse | 当角色松开可拾取物的使用键时触发(即装备该物品时松开鼠标左键) | |
Reload | 当角色为武器换弹时 | |
StanceModeChange | 当 StanceMode(姿态模式)发生改变时调用 | |
SwimmingModeChange | 当游泳模式发生改变时调用 | |
UnGrabProp | 当角色丢弃道具时 | |
ViewModeChange | 当角色改变其视角模式时 | |
WeaponAimModeChange | 当武器瞄准模式发生改变时调用 |

Attack
当角色使用近战武器有效进行攻击时触发
Character.Subscribe("Attack", function(self, melee)
-- Attack was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Melee | melee | No description provided |

AttemptEnterVehicle
当角色尝试进入载具时触发
返回false以阻止该行为
Character.Subscribe("AttemptEnterVehicle", function(self, vehicle, seat_index)
-- AttemptEnterVehicle was called
return true
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Vehicle | vehicle | No description provided |
| integer | seat_index | No description provided |
See also GetVehicle, EnterVehicle, EnterVehicle.

AttemptLeaveVehicle
当角色尝试离开载具时触发
返回false以阻止该行为
Character.Subscribe("AttemptLeaveVehicle", function(self, vehicle)
-- AttemptLeaveVehicle was called
return true
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Vehicle | vehicle | No description provided |
See also LeaveVehicle, LeaveVehicle.

AttemptReload
当角色尝试换弹时触发
返回false以阻止该行为
Character.Subscribe("AttemptReload", function(self, weapon)
-- AttemptReload was called
return true
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Weapon | weapon | No description provided |

Drop
当角色丢弃当前拾取的可拾取物时
Character.Subscribe("Drop", function(self, object, triggered_by_player)
-- Drop was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Pickable | object | No description provided |
| boolean | triggered_by_player | No description provided |

EnterVehicle
当角色进入载具时
Character.Subscribe("EnterVehicle", function(self, vehicle, seat_index)
-- EnterVehicle was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Vehicle | vehicle | No description provided |
| integer | seat_index | No description provided |
See also GetVehicle, EnterVehicle, AttemptEnterVehicle.

FallingModeChange
当 FallingMode 发生改变时调用
Character.Subscribe("FallingModeChange", function(self, old_state, new_state)
-- FallingModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| FallingMode | old_state | No description provided |
| FallingMode | new_state | No description provided |

Fire
当角色开火武器时
Character.Subscribe("Fire", function(self, weapon)
-- Fire was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Weapon | weapon | No description provided |

GaitModeChange
当 GaitMode(步态模式)发生改变时调用
Character.Subscribe("GaitModeChange", function(self, old_state, new_state)
-- GaitModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| GaitMode | old_state | No description provided |
| GaitMode | new_state | No description provided |

GrabProp
当角色抓取起一个道具时
Character.Subscribe("GrabProp", function(self, prop)
-- GrabProp was called
end)

Highlight
当角色高亮/注视一个道具或可拾取物时触发
Character.Subscribe("Highlight", function(self, is_highlighted, object)
-- Highlight was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| boolean | is_highlighted | 对象当前是否被高亮 |
| Prop or Base Pickable | object | No description provided |

Interact
当角色与道具或可拾取物互动时触发
返回false以阻止该行为
Character.Subscribe("Interact", function(self, object)
-- Interact was called
return true
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Prop or Base Pickable | object | No description provided |

LeaveVehicle
当角色离开载具时
Character.Subscribe("LeaveVehicle", function(self, vehicle)
-- LeaveVehicle was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Vehicle | vehicle | No description provided |
See also LeaveVehicle, AttemptLeaveVehicle.

PickUp
当角色拾取任何物品时
Character.Subscribe("PickUp", function(self, object)
-- PickUp was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Base Pickable | object | No description provided |
See also GetPicked.

PullUse
当角色按下可拾取物的使用键时触发(即装备该物品时单击鼠标左键)
Character.Subscribe("PullUse", function(self, pickable)
-- PullUse was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | 使用它的角色 |
| Base Pickable | pickable | 刚刚被使用的可拾取物 |

Punch
当角色出拳时
Character.Subscribe("Punch", function(self)
-- Punch was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |

RagdollModeChange
当角色进入或离开布娃娃状态时
Character.Subscribe("RagdollModeChange", function(self, old_state, new_state)
-- RagdollModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| boolean | old_state | No description provided |
| boolean | new_state | No description provided |

ReleaseUse
当角色松开可拾取物的使用键时触发(即装备该物品时松开鼠标左键)
Character.Subscribe("ReleaseUse", function(self, pickable)
-- ReleaseUse was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | 停止使用它的角色 |
| Base Pickable | pickable | 刚刚停止使用的可拾取物 |

Reload
当角色为武器换弹时
Character.Subscribe("Reload", function(self, weapon, ammo_to_reload)
-- Reload was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| Weapon | weapon | No description provided |
| integer | ammo_to_reload | No description provided |

StanceModeChange
当 StanceMode(姿态模式)发生改变时调用
Character.Subscribe("StanceModeChange", function(self, old_state, new_state)
-- StanceModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| StanceMode | old_state | No description provided |
| StanceMode | new_state | No description provided |

SwimmingModeChange
当游泳模式发生改变时调用
Character.Subscribe("SwimmingModeChange", function(self, old_state, new_state)
-- SwimmingModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| SwimmingMode | old_state | No description provided |
| SwimmingMode | new_state | No description provided |

UnGrabProp
当角色丢弃道具时
Character.Subscribe("UnGrabProp", function(self, prop)
-- UnGrabProp was called
end)

ViewModeChange
当角色改变其视角模式时
Character.Subscribe("ViewModeChange", function(self, old_state, new_state)
-- ViewModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| ViewMode | old_state | No description provided |
| ViewMode | new_state | No description provided |

WeaponAimModeChange
当武器瞄准模式发生改变时调用
Character.Subscribe("WeaponAimModeChange", function(self, old_state, new_state)
-- WeaponAimModeChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Character | self | No description provided |
| AimMode | old_state | No description provided |
| AimMode | new_state | No 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 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
Ugly list I know.
rootpelvisspine_01spine_02spine_03clavicle_lupperarm_llowerarm_lhand_lindex_01_lindex_02_lindex_03_l
middle_01_lmiddle_02_lmiddle_03_l
pinky_01_lpinky_02_lpinky_03_l
ring_01_lring_02_lring_03_l
thumb_01_lthumb_02_lthumb_03_l
weapon_l
clavicle_rupperarm_rlowerarm_rhand_rindex_01_rindex_02_rindex_03_r
middle_01_rmiddle_02_rmiddle_03_r
pinky_01_rpinky_02_rpinky_03_r
ring_01_rring_02_rring_03_r
thumb_01_rthumb_02_rthumb_03_r
weapon_r
neck_01headlefteyerighteyeleftlidupleftlidlowrightliduprightlitlow
thigh_lcalf_lfoot_lball_l
thigh_rcalf_rfoot_rball_r