跳至正文
版本:latest - a1.147.x ⚖️

🧑 角色

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


💂Authority
This class can only be spawned on 🟦 Server side.
🔁Network Authority Distribution
This class have the Network Authority distribution enabled and automatically handled by the server. You can override the Network Authority or disable it from automatically distributing.
👪Inheritance
This class shares methods and events from Base Entity, Base Actor, Base Paintable, Base Damageable, Base Pawn.
🧑‍💻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.

🎒 示例

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

更多相关示例:

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

TypeNameDefaultDescription
Vectorlocation Required parameter No description provided
Rotatorrotation Required parameter No description provided
SkeletalMesh Referenceskeletal_mesh_asset Required parameter No description provided
CollisionTypecollision_typeCollisionType.AutoNo description provided
booleangravity_enabledtrueNo description provided
integermax_health100当前 / 最大生命值
Sound Referencedeath_soundnanos-world::A_Male_01_Death角色死亡时播放
Sound Referencepain_soundnanos-world::A_Male_01_Pain角色受到伤害时播放
booleandefer_spawnfalse传入 true 以避免立即将该实体发送给客户端,从而在你想要通过设置多个配置来调整它时提高性能。最后必须调用 FinishSpawn()

🗿 静态函数

Inherited Entity Static Functions
Character inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/entity
ReturnsNameDescription
table of Base EntityGetAll返回一个包含调用此方法的类中所有实体的表
Base EntityGetByIndex返回该类中指定索引处的特定实体
integerGetCount返回该类当前存在的实体数量
table of tableGetInheritedClasses获取使用 继承系统 创建的、直接继承自该类的所有子类列表
iteratorGetPairs返回一个包含该类所有实体的迭代器,用于 pairs() 循环
table or nilGetParentClass如果该类是使用 继承系统 创建的,则获取其父类
tableInherit使用 继承系统 继承此类
booleanIsChildOf如果该类是使用 继承系统 创建的,检查此类是否为另一个类的子类
functionSubscribe为该类的所有实体订阅一个 事件
functionSubscribeRemote订阅从服务器调用的自定义远程事件
Unsubscribe退订此包内该类中此 事件 的所有回调,或者仅取消传入的特定回调

This class doesn't have own static functions.

🦠 函数

Inherited Entity Functions
Character inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/entity
ReturnsNameDescription
BroadcastRemoteEvent直接在此实体上向所有玩家调用自定义远程事件
BroadcastRemoteInRadiusEvent直接针对此实体调用自定义远程事件,并将该事件传递给半径范围内的所有玩家
CallRemoteEvent直接在此实体上向特定玩家调用自定义远程事件
CallRemoteEvent直接在此实体上调用自定义远程事件
CallRemotePlayersEvent直接在此实体上调用自定义远程事件,并将事件传递给玩家列表
Destroy销毁该实体
FinishSpawn完成生成过程,如果实体是通过 defer_spawn 生成的,则将实体发送给客户端
table of stringGetAllValuesKeys获取所有值键的列表
tableGetClass获取该实体的类
integerGetID获取该实体的全网通用网络 ID(在客户端和服务器上相同)
anyGetValue获取此实体上存储在给定键处的
booleanHasAuthority获取本地上下文是否对此实体拥有主控(如果由客户端生成则为 true,由服务器生成则为 false)
booleanIsA递归检查此实体是否继承自某个类
booleanIsBeingDestroyed如果该实体正在被销毁,则返回 true
booleanIsValid如果该实体有效(即未被销毁且指向一个有效的实体),则返回 true
SetValue在此实体中设置一个
functionSubscribe在这个特定实体上订阅一个事件
functionSubscribeRemote在这个特定实体上订阅一个从服务器调用的自定义远程事件
Unsubscribe退订此包内该实体中此 事件 的所有回调,或者仅取消传入的特定回调
Inherited Actor Functions
Character inherits from Base Actor Class, sharing it's methods and functions:
Base Actorscripting-reference/classes/base-classes/actor
ReturnsNameDescription
AddActorTag向该 Actor 添加一个虚幻 Actor 标签
AddAngularImpulse向该 Actor 添加角冲量。适用于单次瞬间爆发
AddImpulse向该 Actor 添加冲量。适用于单次瞬间爆发
booleanAttachTo将该 Actor 附加到任何其他 Actor 上,可选择附加在特定骨骼处
Detach将该 Actor 从其附加的 Actor 上分离
table of stringGetActorTags获取该 Actor 上的所有虚幻 Actor 标签
VectorGetAngularForce获取该 Actor 的角外力(由 SetAngularForce() 设置)
table of Base ActorGetAttachedEntities获取附加到该 Actor 的所有 Actor
Base Actor or nilGetAttachedTo获取该 Actor 所附加到的父级 Actor
tableGetBounds获取该 Actor 的边界范围
CollisionTypeGetCollision获取该 Actor 的碰撞类型
integerGetDimension获取该 Actor 的维度
floatGetDistanceFromCamera获取该 Actor 距离相机的距离
VectorGetForce获取该 Actor 的持续外力(由 SetForce() 设置)
VectorGetLocation获取该 Actor 在游戏世界中的位置
Player or nilGetNetworkAuthority获取该 Actor 的网络主控玩家
VectorGetRelativeLocation如果该 Actor 已附加,获取其相对位置
RotatorGetRelativeRotation如果该 Actor 已附加,获取其相对旋转
RotatorGetRotation获取该 Actor 在游戏世界中的角度值
VectorGetScale获取该 Actor 的缩放比例
floatGetScreenPercentage获取该 Actor 在屏幕中所占尺寸的百分比
tableGetSocketTransform在给定骨骼或插槽名称的情况下,获取世界空间中的插槽变换
VectorGetVelocity获取该 Actor 当前的速度
booleanHasNetworkAuthority如果本地玩家当前是该 Actor 的网络主控(Network Authority),则返回 true
booleanIsGravityEnabled如果该 Actor 启用了重力,则返回 true
booleanIsInWater如果该 Actor 处于水中,则返回 true
booleanIsNetworkDistributed如果该 Actor 当前处于网络分配状态,则返回 true
booleanIsVisible如果该 Actor 可见,则返回 true
RemoveActorTag从该 Actor 中移除一个虚幻 Actor 标签
RotateTo在一定时间内平滑旋转该 Actor 到指定角度
SetAngularForce向该 Actor 添加一个永久的角外力,设为 Vector(0, 0, 0) 可以取消
SetCastShadow设置该 Actor 是否投射阴影
SetCollision设置该 Actor 的碰撞类型
SetDimension设置该 Actor 的维度
SetDistanceOptimizationMultiplier设置此 Actor 的距离优化系数
SetForceAdds a permanent force to this Actor, set to Vector(0, 0, 0) to cancel
SetGravityEnabledSets whether gravity is enabled on this Actor
SetHighlightEnabledSets whether the highlight is enabled on this Actor, and which highlight index to use
SetLifeSpanSets the time (in seconds) before this Actor is destroyed. After this time has passed, the actor will be automatically destroyed.
SetLocationSets this Actor's location in the game world
SetNetworkAuthoritySets the Player to have network authority over this Actor
SetNetworkAuthorityAutoDistributedSets if this Actor will auto distribute the network authority between players
SetOutlineEnabledSets whether the outline is enabled on this Actor, and which outline index to use
SetRelativeLocationSets this Actor's relative location in local space (only if this actor is attached)
SetRelativeRotationSets this Actor's relative rotation in local space (only if this actor is attached)
SetRenderCullDistanceSets this Actor's render cull distance
SetRotationSets this Actor's rotation in the game world
SetScaleSets this Actor's scale
SetVisibilitySets whether the actor is visible or not
TranslateToSmoothly moves this actor to a location over a certain time
booleanWasRecentlyRenderedGets 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
ColorGetMaterialColorParameter从该 Actor 的材质中获取 Color 参数
floatGetMaterialScalarParameter从该 Actor 的材质中获取 Scalar 参数
stringGetMaterialTextureParameter从该 Actor 的材质中获取 Texture 参数
VectorGetMaterialVectorParameter从该 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
Character inherits from Base Damageable Class, sharing it's methods and functions:
Base Damageablescripting-reference/classes/base-classes/damageable
ReturnsNameDescription
integerApplyDamage对该实体造成伤害
floatGetDamageMultiplier获取特定骨骼的伤害系数
integerGetHealth获取当前生命值
integerGetMaxHealth获取最大生命值
booleanIsDead返回该实体是否已死亡
Respawn重生该实体,恢复其生命值并将其移动到初始位置
SetDamageMultiplier更改该实体在特定骨骼上受到的伤害大小
SetHealth设置该实体的生命值
SetMaxHealth设置该实体的最大生命值
Inherited Pawn Functions
Character inherits from Base Pawn Class, sharing it's methods and functions:
Base Pawnscripting-reference/classes/base-classes/pawn
ReturnsNameDescription
AddSkeletalMeshAttached附加一个骨骼网格体作为该实体的骨骼主姿态
AddStaticMeshAttached附加一个静态网格体到此实体
FollowAI:让该角色跟随另一个 Actor
table of stringGetAllSkeletalMeshAttached获取附加到此实体的所有骨骼网格体
table of stringGetAllStaticMeshAttached获取附加到此实体的所有静态网格体
tableGetCapsuleSize获取胶囊体大小
RotatorGetControlRotation获取控制旋转
booleanGetFlyingMode获取是否处于飞行模式
floatGetGravityScale获取重力缩放值
SkeletalMesh ReferenceGetMesh获取基础网格体资产
VectorGetMovingTo获取正在移动去往的位置
Player or nilGetPlayer获取当前控制此实体的玩家
HideBone隐藏此角色的某根骨骼
booleanIsBoneHidden获取某根骨骼是否被隐藏
Jump触发此角色进行跳跃
MoveToAI:让该角色步行移动到指定位置
RemoveAllSkeletalMeshesAttached移除所有已附加的骨骼网格体
RemoveAllStaticMeshesAttached移除所有已附加的静态网格体
RemoveSkeletalMeshAttached根据自定义 ID 移除此实体上已存在的骨骼网格体
RemoveStaticMeshAttached根据自定义 ID 移除此实体上已存在的静态网格体
SetAIAvoidanceSettingsAI:配置 AI 移动时使用的 RVO(相互速度障碍物)避让系统
SetBrakingSettings设置此角色的移动制动设置
SetCanCrouch设置此角色是否被允许下蹲和俯卧
SetCanJump设置此角色是否被允许跳跃
SetCapsuleSize设置此角色的胶囊体大小
SetControlRotation设置控制旋转
SetFlyingMode设置飞行模式
SetGravityScale更改重力缩放值
SetHitReactionEnabled设置角色在受到伤害时是否触发受击反应,通过对受损的本地骨骼应用微小的动态布娃娃效果
SetJumpZVelocity设置跳跃的速度
SetMeshSettings配置网格体附加设置和可见性
SetRagdollOnDeathEnabledSets if the character will enter ragdoll mode when it dies. You can set it to false to apply custom Death animations
SetStaticMeshAttachedTransform设置已附加静态网格体的位置和旋转
StopAnimationStops an Animation Montage on this character
StopMovementAI: Stops the movement, optionally zeroing the velocity as well
UnHideBoneUnHide a bone of this Character
ReturnsNameDescription
ClearMorphTargets清除设置在此网格体上的所有变形目标
Drop丢弃角色当前持有的任何可拾取物
EnterVehicle进入载具的指定座位(0 - 驾驶人)
table of stringGetAllMorphTargetNames返回一个包含所有可用变形目标的表
CameraModeGetCameraMode获取相机模式
booleanGetCanAim获取是否可以瞄准
booleanGetCanCrouch获取是否可以下蹲
booleanGetCanDrop获取是否可以丢弃物品
booleanGetCanGrabProps获取是否可以抓取道具
booleanGetCanPickupPickables获取是否可以拾取可拾取物(武器、近战武器、手榴弹……)
booleanGetCanPunch获取是否可以出拳
booleanGetCanSprint获取是否可以疾跑
booleanGetCanUsePickables获取是否可以使用可拾取物(武器、近战武器、手榴弹……)
integerGetFallDamageTaken获取坠落伤害
FallingModeGetFallingMode获取 FallingMode(坠落模式)
GaitModeGetGaitMode获取 GaitMode(步态模式)
Prop or nilGetGrabbedProp获取被抓取的道具
integerGetImpactDamageTaken获取受到的撞击伤害
integerGetJumpZVelocity获取跳跃 Z 轴速度
floatGetMorphTarget返回指定变形目标的值
Base Pickable or nilGetPicked获取当前正在拾取的可拾取物
integerGetPunchDamage获取出拳伤害
floatGetSpeedMultiplier获取速度系数
StanceModeGetStanceMode获取姿态模式
SwimmingModeGetSwimmingMode获取游泳模式
integerGetTeam获取团队
Base Vehicle or nilGetVehicle获取已进入的载具
integerGetVehicleSeat获取已进入的载具座位
ViewModeGetViewMode获取视角模式
AimModeGetWeaponAimMode获取武器瞄准模式
GrabProp给予角色一个道具
booleanIsInputEnabled获取是否启用了输入
booleanIsInRagdollMode获取角色是否处于布娃娃模式
booleanIsInvulnerable获取是否无敌
LeaveVehicle离开当前载具
LookAtAI:尝试使该角色看向指定位置
PickUp给予角色一个近战武器/手榴弹/武器(可拾取物)
PlayAnimation在此角色上播放动画蒙太奇
ResetPhysicalAnimationSettings重置所有物理动画设置
SetAccelerationSettings设置此角色的移动最大加速度
SetAirControl设置角色处于空中时允许的移动控制量
SetAnimationIdleWalkRunCrouching设置下蹲状态的混合空间(2D)动画

水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
SetAnimationIdleWalkRunProning设置俯卧状态的混合空间(2D)动画

水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
SetAnimationIdleWalkRunStanding设置站立状态的混合空间(2D)动画
SetAnimationsTransitionCrouchingProning设置下蹲与俯卧之间的过渡动画
SetAnimationsTransitionStandingCrouching设置站立与下蹲之间的过渡动画
SetCameraMode设置相机模式
SetCanAim设置此角色是否允许瞄准
SetCanDeployParachute设置此角色是否允许部署降落伞
SetCanDive设置此角色是否允许下潜
SetCanDrop设置此角色是否允许丢弃当前拾取的物品
SetCanGrabProps设置此角色是否允许抓取任何道具
SetCanPickupPickables设置此角色是否允许拾取任何可拾取物(武器、手榴弹、近战武器……)
SetCanPunch设置此角色是否允许出拳
SetCanSprint设置此角色是否允许疾跑
SetCanUsePickables设置此角色是否允许使用可拾取物(武器、手榴弹、近战武器……)
SetDeathSound更改角色死亡时的死亡声音
SetFallDamageTaken设置从高处坠落时承受的坠落伤害系数
SetFootstepVolumeMultiplier设置脚步声音量系数
SetFOVMultiplier设置视场角系数
SetGaitMode设置步态模式
SetHighFallingTime设置过渡到 HighFalling 状态所需的时间
SetImpactDamageTaken设置被物体碾压时所承受的撞击伤害
SetInputEnabled启用/禁用角色的输入
SetInvulnerable设置角色是否可以接受任何伤害
SetMesh动态更改角色的网格体
SetMorphTarget通过名称和值设置变形目标
SetPainSound更改角色受到伤害时的痛苦声音
SetParachuteTexture更改降落伞的纹理
SetPhysicalAnimationSettings将物理动画设置应用给指定的骨骼体
SetPhysicsAsset设置角色的物理资产
SetPunchDamage设置该角色对他人施加的出拳伤害
SetRadialDamageToRagdoll设置触发角色进入布娃娃模式所需的最小径向伤害(例如爆炸)
SetRagdollMode设置角色的布娃娃模式
SetRagdollOnHitEnabled设置角色在被物体撞击或从高处坠落时是否会进入布娃娃模式
SetRagdollStandUpCooldown设置此角色从布娃娃状态起立之前的冷却时间(以秒为单位)
SetSimulatePhysics设置角色胶囊体以模拟物理效果
SetSpeedMultiplier设置所有速度的系数
SetStanceMode设置姿态模式
SetTeam设置团队,将禁用对同一团队成员的伤害
SetViewMode设置视角模式
SetWeaponAimMode设置武器的瞄准模式
UnGrabProp取消抓取/丢弃角色当前持有的道具

ClearMorphTargets

清除设置在此网格体上的所有变形目标
my_character:ClearMorphTargets()

See also SetMorphTarget, GetMorphTarget, GetAllMorphTargetNames.


Drop

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

See also GetPicked, PickUp.


EnterVehicle

进入载具的指定座位(0 - 驾驶人)
my_character:EnterVehicle(vehicle, seat?)

Parameters

TypeParameterDefaultDescription
Base Vehiclevehicle Required parameter No description provided
integerseat?0
No description provided

See also GetVehicle, GetVehicleSeat, EnterVehicle, AttemptEnterVehicle.


GetAllMorphTargetNames

返回一个包含所有可用变形目标的表
local ret = my_character:GetAllMorphTargetNames()

Returns

TypeDescription
table of string包含所有可用变形目标的表

See also SetMorphTarget, GetMorphTarget, ClearMorphTargets.


GetCameraMode

获取相机模式
local camera_mode = my_character:GetCameraMode()

Returns

TypeDescription
CameraModecamera_mode

See also SetCameraMode.


GetCanAim

获取是否可以瞄准
local can_aim = my_character:GetCanAim()

Returns

TypeDescription
booleancan_aim

See also SetCanAim.


GetCanCrouch

获取是否可以下蹲
local can_crouch = my_character:GetCanCrouch()

Returns

TypeDescription
booleancan_crouch

GetCanDrop

获取是否可以丢弃物品
local can_drop = my_character:GetCanDrop()

Returns

TypeDescription
booleancan_drop

See also SetCanDrop.


GetCanGrabProps

获取是否可以抓取道具
local can_grab_props = my_character:GetCanGrabProps()

Returns

TypeDescription
booleancan_grab_props

See also SetCanGrabProps.


GetCanPickupPickables

获取是否可以拾取可拾取物(武器、近战武器、手榴弹……)
local can_pickup = my_character:GetCanPickupPickables()

Returns

TypeDescription
booleancan_pickup

See also SetCanPickupPickables.


GetCanPunch

获取是否可以出拳
local can_punch = my_character:GetCanPunch()

Returns

TypeDescription
booleancan_punch

See also SetCanPunch.


GetCanSprint

获取是否可以疾跑
local can_sprint = my_character:GetCanSprint()

Returns

TypeDescription
booleancan_sprint

See also SetCanSprint.


GetCanUsePickables

获取是否可以使用可拾取物(武器、近战武器、手榴弹……)
local can_use = my_character:GetCanUsePickables()

Returns

TypeDescription
booleancan_use

See also SetCanUsePickables.


GetFallDamageTaken

获取坠落伤害
local damage = my_character:GetFallDamageTaken()

Returns

TypeDescription
integerdamage

See also SetFallDamageTaken.


GetFallingMode

获取 FallingMode(坠落模式)
local ret = my_character:GetFallingMode()

Returns

TypeDescription
FallingModeNo description provided

GetGaitMode

获取 GaitMode(步态模式)
local gait_mode = my_character:GetGaitMode()

Returns

TypeDescription
GaitModegait_mode

See also SetGaitMode.


GetGrabbedProp

获取被抓取的道具
local prop = my_character:GetGrabbedProp()

Returns

TypeDescription
Prop or nilprop

See also GrabProp, UnGrabProp.


GetImpactDamageTaken

获取受到的撞击伤害
local impact_damage = my_character:GetImpactDamageTaken()

Returns

TypeDescription
integerimpact_damage

See also SetImpactDamageTaken.


GetJumpZVelocity

获取跳跃 Z 轴速度
local jump_z_velocity = my_character:GetJumpZVelocity()

Returns

TypeDescription
integerjump_z_velocity

GetMorphTarget

返回指定变形目标的值
local value = my_character:GetMorphTarget(name)

Parameters

TypeParameterDefaultDescription
stringname Required parameter 变形目标名称

Returns

TypeDescription
float变形目标的值

See also SetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


GetPicked

获取当前正在拾取的可拾取物
local object = my_character:GetPicked()

Returns

TypeDescription
Base Pickable or nilobject

See also PickUp, Drop.


GetPunchDamage

获取出拳伤害
local punch_damage = my_character:GetPunchDamage()

Returns

TypeDescription
integerpunch_damage

See also SetPunchDamage.


GetSpeedMultiplier

获取速度系数
local speed_multiplier = my_character:GetSpeedMultiplier()

Returns

TypeDescription
floatspeed_multiplier

See also SetSpeedMultiplier.


GetStanceMode

获取姿态模式
local stance_mode = my_character:GetStanceMode()

Returns

TypeDescription
StanceModestance_mode

See also SetStanceMode.


GetSwimmingMode

获取游泳模式
local swimming_mode = my_character:GetSwimmingMode()

Returns

TypeDescription
SwimmingModeswimming_mode

GetTeam

获取团队
local team = my_character:GetTeam()

Returns

TypeDescription
integerteam

See also SetTeam.


GetVehicle

获取已进入的载具
local vehicle = my_character:GetVehicle()

Returns

TypeDescription
Base Vehicle or nilvehicle

See also EnterVehicle, LeaveVehicle.


GetVehicleSeat

获取已进入的载具座位
local ret = my_character:GetVehicleSeat()

Returns

TypeDescription
integerNo description provided

GetViewMode

获取视角模式
local view_mode = my_character:GetViewMode()

Returns

TypeDescription
ViewModeview_mode

See also SetViewMode.


GetWeaponAimMode

获取武器瞄准模式
local aim_mode = my_character:GetWeaponAimMode()

Returns

TypeDescription
AimModeaim_mode

See also SetWeaponAimMode.


GrabProp

给予角色一个道具
my_character:GrabProp(prop)

Parameters

TypeParameterDefaultDescription
Propprop Required parameter No description provided

See also GetGrabbedProp.


IsInputEnabled

获取是否启用了输入
local is_enabled = my_character:IsInputEnabled()

Returns

TypeDescription
booleanis_enabled

See also SetInputEnabled.


IsInRagdollMode

获取角色是否处于布娃娃模式
local ragdoll_enabled = my_character:IsInRagdollMode()

Returns

TypeDescription
booleanragdoll_enabled

IsInvulnerable

获取是否无敌
local is_invulnerable = my_character:IsInvulnerable()

Returns

TypeDescription
booleanis_invulnerable

See also SetInvulnerable.


LeaveVehicle

离开当前载具
my_character:LeaveVehicle()

See also EnterVehicle, GetVehicle, LeaveVehicle, AttemptLeaveVehicle.


LookAt

AI:尝试使该角色看向指定位置
my_character:LookAt(location)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter 要注视的世界坐标位置

PickUp

给予角色一个近战武器/手榴弹/武器(可拾取物)
my_character:PickUp(pickable)

Parameters

TypeParameterDefaultDescription
Base Pickablepickable Required parameter No description provided

See also Drop, GetPicked.


PlayAnimation

在此角色上播放动画蒙太奇
my_character:PlayAnimation(animation_path, slot_type?, loop_indefinitely?, blend_in_time?, blend_out_time?, play_rate?, stop_all_montages?)

Parameters

TypeParameterDefaultDescription
Animation Referenceanimation_path Required parameter No description provided
AnimationSlotTypeslot_type?AnimationSlotType.FullBody
No description provided
booleanloop_indefinitely?false
No description provided
floatblend_in_time?0.25
No description provided
floatblend_out_time?0.25
传入 -1 以禁用自动混出,并使动画永远保持在最后一帧姿态
floatplay_rate?1.0
No description provided
booleanstop_all_montages?false
停止来自同一组的所有正在播放的蒙太奇

See also StopAnimation.


ResetPhysicalAnimationSettings

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

SetAccelerationSettings

设置此角色的移动最大加速度
my_character:SetAccelerationSettings(walking?, parachuting?, skydiving?, falling?, swimming?, swimming_surface?, flying?)

Parameters

TypeParameterDefaultDescription
integerwalking?768
No description provided
integerparachuting?512
No description provided
integerskydiving?768
No description provided
integerfalling?128
No description provided
integerswimming?256
No description provided
integerswimming_surface?256
No description provided
integerflying?1024
No description provided

SetAirControl

设置角色处于空中时允许的移动控制量
my_character:SetAirControl(air_control?, boost_multiplier?, boost_velocity_threshold?)

Parameters

TypeParameterDefaultDescription
floatair_control?0.2
下落时,角色可用的横向移动控制量。0 = 无法控制,1 = 在 MaxWalkSpeed 最大速度下完全控制
floatboost_multiplier?512
下落时,当横向速度小于 boost_velocity_threshold 时应用于 air_control 的系数。将其设为 0 将禁用空中控制增强。最终结果会被限制在 1 以内
floatboost_velocity_threshold?25
下落时,如果横向速度大小小于该值,则 air_control 会乘以 boost_multiplier。将其设为 0 将禁用空中控制增强

SetAnimationIdleWalkRunCrouching

设置下蹲状态的混合空间(2D)动画

水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunCrouching(blend_space_path, enable_turn_in_place?)

Parameters

TypeParameterDefaultDescription
Animation Referenceblend_space_path Required parameter No description provided
booleanenable_turn_in_place?false
No description provided

SetAnimationIdleWalkRunProning

设置俯卧状态的混合空间(2D)动画

水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunProning(blend_space_path)

Parameters

TypeParameterDefaultDescription
Animation Referenceblend_space_path Required parameter No description provided

SetAnimationIdleWalkRunStanding

设置站立状态的混合空间(2D)动画

水平轴代表 X 轴速度,垂直轴代表 Y 轴速度
my_character:SetAnimationIdleWalkRunStanding(blend_space_path, enable_turn_in_place?)

Parameters

TypeParameterDefaultDescription
Animation Referenceblend_space_path Required parameter No description provided
booleanenable_turn_in_place?false
No description provided

SetAnimationsTransitionCrouchingProning

设置下蹲与俯卧之间的过渡动画
my_character:SetAnimationsTransitionCrouchingProning(crouching_to_proning, proning_to_crouching)

Parameters

TypeParameterDefaultDescription
Animation Referencecrouching_to_proning Required parameter No description provided
Animation Referenceproning_to_crouching Required parameter No description provided

SetAnimationsTransitionStandingCrouching

设置站立与下蹲之间的过渡动画
my_character:SetAnimationsTransitionStandingCrouching(standing_to_crouching, crouching_to_standing)

Parameters

TypeParameterDefaultDescription
Animation Referencestanding_to_crouching Required parameter No description provided
Animation Referencecrouching_to_standing Required parameter No description provided

SetCameraMode

设置相机模式(例如:仅第三人称 (TPS)、仅第一人称 (FPS) 或允许两者)

对 AI 使用 FPSOnly 相机模式将锁定其身体旋转(当使用 LookAt 时)
my_character:SetCameraMode(camera_mode)

Parameters

TypeParameterDefaultDescription
CameraModecamera_mode Required parameter No description provided

See also GetCameraMode.


SetCanAim

设置此角色是否允许瞄准
my_character:SetCanAim(can_aim)

Parameters

TypeParameterDefaultDescription
booleancan_aim Required parameter No description provided

See also GetCanAim.


SetCanDeployParachute

设置此角色是否允许部署降落伞
my_character:SetCanDeployParachute(can_deploy_parachute)

Parameters

TypeParameterDefaultDescription
booleancan_deploy_parachute Required parameter No description provided

SetCanDive

设置此角色是否允许下潜
my_character:SetCanDive(can_dive)

Parameters

TypeParameterDefaultDescription
booleancan_dive Required parameter No description provided

SetCanDrop

设置此角色是否允许丢弃当前拾取的物品
my_character:SetCanDrop(can_drop)

Parameters

TypeParameterDefaultDescription
booleancan_drop Required parameter No description provided

See also GetCanDrop.


SetCanGrabProps

设置此角色是否允许抓取任何道具
my_character:SetCanGrabProps(can_grab_props)

Parameters

TypeParameterDefaultDescription
booleancan_grab_props Required parameter No description provided

See also GetCanGrabProps.


SetCanPickupPickables

设置此角色是否允许拾取任何可拾取物(武器、手榴弹、近战武器……)
my_character:SetCanPickupPickables(can_pickup)

Parameters

TypeParameterDefaultDescription
booleancan_pickup Required parameter No description provided

See also GetCanPickupPickables.


SetCanPunch

设置此角色是否允许出拳
my_character:SetCanPunch(can_punch)

Parameters

TypeParameterDefaultDescription
booleancan_punch Required parameter No description provided

See also GetCanPunch.


SetCanSprint

设置此角色是否允许疾跑
my_character:SetCanSprint(can_sprint)

Parameters

TypeParameterDefaultDescription
booleancan_sprint Required parameter No description provided

See also GetCanSprint.


SetCanUsePickables

设置此角色是否允许使用可拾取物(武器、手榴弹、近战武器……)
my_character:SetCanUsePickables(can_use)

Parameters

TypeParameterDefaultDescription
booleancan_use Required parameter No description provided

See also GetCanUsePickables.


SetDeathSound

更改角色死亡时的死亡声音
my_character:SetDeathSound(sound_asset)

Parameters

TypeParameterDefaultDescription
Sound Referencesound_asset Required parameter No description provided

SetFallDamageTaken

设置从高处坠落时承受的坠落伤害系数。

设为 0 将使角色不受到任何坠落伤害
my_character:SetFallDamageTaken(damage)

Parameters

TypeParameterDefaultDescription
integerdamage Required parameter 默认值为 10

See also GetFallDamageTaken.


SetFootstepVolumeMultiplier

设置脚步声音量系数
my_character:SetFootstepVolumeMultiplier(volume_multiplier)

Parameters

TypeParameterDefaultDescription
floatvolume_multiplier Required parameter No description provided

SetFOVMultiplier

设置视场角系数
my_character:SetFOVMultiplier(multiplier)

Parameters

TypeParameterDefaultDescription
floatmultiplier Required parameter No description provided

SetGaitMode

设置步态模式
my_character:SetGaitMode(gait_mode)

Parameters

TypeParameterDefaultDescription
GaitModegait_mode Required parameter No description provided

See also GetGaitMode.


SetHighFallingTime

设置自动从 SmallFalling 过渡到 HighFalling 状态所经过的时间(秒)

将其设为 -1 将永远不会进入 HighFalling 状态,因此下落时不会成为布娃娃
my_character:SetHighFallingTime(time)

Parameters

TypeParameterDefaultDescription
floattime Required parameter 默认值为 1 秒

See also SetRagdollOnHitEnabled.


SetImpactDamageTaken

设置被物体碾压时承受的撞击伤害。

设为 0 将使角色不承受伤害,也不会进入布娃娃模式
my_character:SetImpactDamageTaken(impact_damage)

Parameters

TypeParameterDefaultDescription
integerimpact_damage Required parameter 默认值为 10

See also SetRagdollOnHitEnabled, GetImpactDamageTaken.


SetInputEnabled

启用/禁用角色的输入
my_character:SetInputEnabled(is_enabled)

Parameters

TypeParameterDefaultDescription
booleanis_enabled Required parameter No description provided

See also IsInputEnabled.


SetInvulnerable

设置角色是否可以接受任何伤害
my_character:SetInvulnerable(is_invulnerable)

Parameters

TypeParameterDefaultDescription
booleanis_invulnerable Required parameter No description provided

See also IsInvulnerable.


SetMesh

动态更改角色的网格体
my_character:SetMesh(skeletal_mesh_asset)

Parameters

TypeParameterDefaultDescription
SkeletalMesh Referenceskeletal_mesh_asset Required parameter No description provided

SetMorphTarget

通过名称和值设置变形目标
my_character:SetMorphTarget(name, value)

Parameters

TypeParameterDefaultDescription
stringname Required parameter 变形目标名称
floatvalue Required parameter No description provided

See also GetMorphTarget, ClearMorphTargets, GetAllMorphTargetNames.


SetPainSound

更改角色受到伤害时的痛苦声音
my_character:SetPainSound(sound_asset)

Parameters

TypeParameterDefaultDescription
Sound Referencesound_asset Required parameter No description provided

SetParachuteTexture

更改降落伞的纹理
my_character:SetParachuteTexture(texture)

Parameters

TypeParameterDefaultDescription
Image Pathtexture 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

TypeParameterDefaultDescription
stringbone Required parameter 我们将驱动的骨骼体
booleaninclude_self Required parameter 是否修改给定的骨骼体
booleanis_local_simulation Required parameter 驱动目标是在世界空间还是本地空间
floatorientation_strength?0
用于修正朝向误差的强度
floatangular_velocity_strength?0
用于修正角速度误差的强度
floatposition_strength?0
用于修正线性位置误差的强度。仅用于非本地模拟
floatvelocity_strength?0
用于修正线性速度误差的强度。仅用于非本地模拟
floatmax_linear_force?0
用于修正线性误差的最大力
floatmax_angular_force?0
用于修正角度误差的最大力

SetPhysicsAsset

设置角色的物理资产
my_character:SetPhysicsAsset(physics_asset)

Parameters

TypeParameterDefaultDescription
Otherphysics_asset Required parameter No description provided

SetPunchDamage

设置该角色对他人施加的出拳伤害
my_character:SetPunchDamage(punch_damage)

Parameters

TypeParameterDefaultDescription
integerpunch_damage Required parameter 默认值为 15

See also GetPunchDamage.


SetRadialDamageToRagdoll

设置触发角色进入布娃娃模式所需的最小径向伤害(例如爆炸)。

设为 -1 将使角色在受到径向伤害时不会进入布娃娃模式
my_character:SetRadialDamageToRagdoll(damage)

Parameters

TypeParameterDefaultDescription
integerdamage Required parameter 默认值为 50

SetRagdollMode

设置角色的布娃娃模式
my_character:SetRagdollMode(ragdoll_enabled)

Parameters

TypeParameterDefaultDescription
booleanragdoll_enabled Required parameter No description provided

SetRagdollOnHitEnabled

设置角色在被物体撞击或从高处坠落时是否会进入布娃娃模式
my_character:SetRagdollOnHitEnabled(is_enabled)

Parameters

TypeParameterDefaultDescription
booleanis_enabled Required parameter No description provided

See also SetHighFallingTime.


SetRagdollStandUpCooldown

设置此角色从布娃娃状态起立之前的冷却时间(以秒为单位)
my_character:SetRagdollStandUpCooldown(time)

Parameters

TypeParameterDefaultDescription
floattime Required parameter No description provided

SetSimulatePhysics

设置角色胶囊体以模拟物理效果
my_character:SetSimulatePhysics(simulate_physics)

Parameters

TypeParameterDefaultDescription
booleansimulate_physics Required parameter No description provided

SetSpeedMultiplier

设置所有速度的系数
my_character:SetSpeedMultiplier(speed_multiplier)

Parameters

TypeParameterDefaultDescription
floatspeed_multiplier Required parameter 1 为正常速度

See also GetSpeedMultiplier.


SetStanceMode

设置姿态模式
my_character:SetStanceMode(stance_mode)

Parameters

TypeParameterDefaultDescription
StanceModestance_mode Required parameter No description provided

See also GetStanceMode.


SetTeam

设置团队,将禁用对同一团队成员的伤害
my_character:SetTeam(team)

Parameters

TypeParameterDefaultDescription
integerteam Required parameter 0 为中立且为默认值

See also GetTeam.


SetViewMode

设置视角模式
my_character:SetViewMode(view_mode)

Parameters

TypeParameterDefaultDescription
ViewModeview_mode Required parameter No description provided

See also GetViewMode.


SetWeaponAimMode

设置武器的瞄准模式
my_character:SetWeaponAimMode(aim_mode)

Parameters

TypeParameterDefaultDescription
AimModeaim_mode Required parameter No description provided

See also GetWeaponAimMode.


UnGrabProp

取消抓取/丢弃角色当前持有的道具
my_character:UnGrabProp()

🚀 事件

Inherited Entity Events
Character inherits from Base Entity Class, sharing it's events:
Base Entityscripting-reference/classes/base-classes/entity
NameDescription
ClassRegister当使用 继承系统 注册一个新类时触发
Destroy当实体被销毁时触发
Spawn当实体被生成/创建时触发
ValueChange当实体通过 :SetValue() 改变了值时触发
Inherited Actor Events
Character inherits from Base Actor Class, sharing it's events:
Base Actorscripting-reference/classes/base-classes/actor
NameDescription
DimensionChange当 Actor 改变其维度时触发
Inherited Damageable Events
Character inherits from Base Damageable Class, sharing it's events:
Base Damageablescripting-reference/classes/base-classes/damageable
NameDescription
Death当实体死亡时
HealthChange当实体的生命值发生改变时,无论是由于受到伤害,还是通过脚本或重生进行手动设置
Respawn当实体重生时
TakeDamage当此实体受到伤害时触发
Inherited Pawn Events
Character inherits from Base Pawn Class, sharing it's events:
Base Pawnscripting-reference/classes/base-classes/pawn
NameDescription
AnimationBeginNotify当动画蒙太奇通知开始时
AnimationEndNotify当动画蒙太奇通知结束时
MoveComplete当 AI 到达目的地或失败时调用
Possess当角色被玩家控制时
UnPossess当角色被玩家取消控制时
NameDescription
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

TypeArgumentDescription
CharacterselfNo description provided
MeleemeleeNo description provided

AttemptEnterVehicle

当角色尝试进入载具时触发

返回 false 以阻止该行为
Character.Subscribe("AttemptEnterVehicle", function(self, vehicle, seat_index)
-- AttemptEnterVehicle was called
return true
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base VehiclevehicleNo description provided
integerseat_indexNo description provided

See also GetVehicle, EnterVehicle, EnterVehicle.


AttemptLeaveVehicle

当角色尝试离开载具时触发

返回 false 以阻止该行为
Character.Subscribe("AttemptLeaveVehicle", function(self, vehicle)
-- AttemptLeaveVehicle was called
return true
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base VehiclevehicleNo description provided

See also LeaveVehicle, LeaveVehicle.


AttemptReload

当角色尝试换弹时触发

返回 false 以阻止该行为
Character.Subscribe("AttemptReload", function(self, weapon)
-- AttemptReload was called
return true
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided

Drop

当角色丢弃当前拾取的可拾取物时
Character.Subscribe("Drop", function(self, object, triggered_by_player)
-- Drop was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base PickableobjectNo description provided
booleantriggered_by_playerNo description provided

EnterVehicle

当角色进入载具时
Character.Subscribe("EnterVehicle", function(self, vehicle, seat_index)
-- EnterVehicle was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base VehiclevehicleNo description provided
integerseat_indexNo description provided

See also GetVehicle, EnterVehicle, AttemptEnterVehicle.


FallingModeChange

当 FallingMode 发生改变时调用
Character.Subscribe("FallingModeChange", function(self, old_state, new_state)
-- FallingModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
FallingModeold_stateNo description provided
FallingModenew_stateNo description provided

Fire

当角色开火武器时
Character.Subscribe("Fire", function(self, weapon)
-- Fire was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided

GaitModeChange

当 GaitMode(步态模式)发生改变时调用
Character.Subscribe("GaitModeChange", function(self, old_state, new_state)
-- GaitModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
GaitModeold_stateNo description provided
GaitModenew_stateNo description provided

GrabProp

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

Arguments

TypeArgumentDescription
CharacterselfNo description provided
ProppropNo description provided

Highlight

当角色高亮/注视一个道具或可拾取物时触发
Character.Subscribe("Highlight", function(self, is_highlighted, object)
-- Highlight was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
booleanis_highlighted对象当前是否被高亮
Prop or Base PickableobjectNo description provided

Interact

当角色与道具或可拾取物互动时触发

返回 false 以阻止该行为
Character.Subscribe("Interact", function(self, object)
-- Interact was called
return true
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Prop or Base PickableobjectNo description provided

LeaveVehicle

当角色离开载具时
Character.Subscribe("LeaveVehicle", function(self, vehicle)
-- LeaveVehicle was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base VehiclevehicleNo description provided

See also LeaveVehicle, AttemptLeaveVehicle.


PickUp

当角色拾取任何物品时
Character.Subscribe("PickUp", function(self, object)
-- PickUp was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
Base PickableobjectNo description provided

See also GetPicked.


PullUse

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

Arguments

TypeArgumentDescription
Characterself使用它的角色
Base Pickablepickable刚刚被使用的可拾取物

Punch

当角色出拳时
Character.Subscribe("Punch", function(self)
-- Punch was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided

RagdollModeChange

当角色进入或离开布娃娃状态时
Character.Subscribe("RagdollModeChange", function(self, old_state, new_state)
-- RagdollModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
booleanold_stateNo description provided
booleannew_stateNo description provided

ReleaseUse

当角色松开可拾取物的使用键时触发(即装备该物品时松开鼠标左键)
Character.Subscribe("ReleaseUse", function(self, pickable)
-- ReleaseUse was called
end)

Arguments

TypeArgumentDescription
Characterself停止使用它的角色
Base Pickablepickable刚刚停止使用的可拾取物

Reload

当角色为武器换弹时
Character.Subscribe("Reload", function(self, weapon, ammo_to_reload)
-- Reload was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
WeaponweaponNo description provided
integerammo_to_reloadNo description provided

StanceModeChange

当 StanceMode(姿态模式)发生改变时调用
Character.Subscribe("StanceModeChange", function(self, old_state, new_state)
-- StanceModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
StanceModeold_stateNo description provided
StanceModenew_stateNo description provided

SwimmingModeChange

当游泳模式发生改变时调用
Character.Subscribe("SwimmingModeChange", function(self, old_state, new_state)
-- SwimmingModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
SwimmingModeold_stateNo description provided
SwimmingModenew_stateNo description provided

UnGrabProp

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

Arguments

TypeArgumentDescription
CharacterselfNo description provided
ProppropNo description provided

ViewModeChange

当角色改变其视角模式时
Character.Subscribe("ViewModeChange", function(self, old_state, new_state)
-- ViewModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
ViewModeold_stateNo description provided
ViewModenew_stateNo description provided

WeaponAimModeChange

当武器瞄准模式发生改变时调用
Character.Subscribe("WeaponAimModeChange", function(self, old_state, new_state)
-- WeaponAimModeChange was called
end)

Arguments

TypeArgumentDescription
CharacterselfNo description provided
AimModeold_stateNo description provided
AimModenew_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

信息

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