Skip to content

YaCharacterAPI

Beta
CharacterAPI. Character represents player-controlled avatar or NPCs in the scene.

Functions

CharacterEntity YaCharacterAPI.Character(YaEntity entity)Beta
boolean YaCharacterAPI.IsCharacter(YaEntity entity)Beta
is character or not
boolean YaCharacterAPI.IsPlayerCharacter(YaEntity entity)Beta
is character controlled by input
YaEntity YaCharacterAPI.GetPlayerEntity(YaEntity avatarEntity)Beta
get avatar player entity
void YaCharacterAPI.OnPush(function callback<YaEntity, YaEntity, float3, number>)Beta
Push event
  • callback callback func
    1. target The character target been pushed
    2. trigger The push entity
    3. direction push direction
    4. distance push distance
void YaCharacterAPI.OnFall(function callback<YaEntity, number>)Beta
Fall event
void YaCharacterAPI.OnGround(function callback<YaEntity, number>)Beta
OnGround event
void YaCharacterAPI.OnEnterTrigger(function callback<YaEntity, YaEntity>)Beta
Enter trigger event
void YaCharacterAPI.OnExitTrigger(function callback<YaEntity, YaEntity>)Beta
Exit Trigger event
void YaCharacterAPI.OnDied(function callback<YaEntity>)Beta
Die event
void YaCharacterAPI.OnStartSwim(function callback<YaEntity>)Beta
Start swim event
void YaCharacterAPI.OnEndSwim(function callback<YaEntity>)Beta
End swim event
YaEntity YaCharacterAPI.GetToolByHand(YaEntity character)Beta
Get the Tool in hand
YaEntity YaCharacterAPI.GetToolByBonePoint(YaEntity character, number point)Beta
Get a tool on a binding
YaEntity[] YaCharacterAPI.GetToolsByBonePoint(YaEntity character, number point)Beta
Get all the Tools on a bind point
YaEntity[] YaCharacterAPI.GetAllTools(YaEntity character)Beta
Get all the tools on the character