Skip to content

YaToolAPI

Beta
Tool API

Functions

void YaToolAPI.OnAbilityActivate(YaEntity tool, function callback<YaAbility>)Beta
Listen for the Tool's ability activation event. Any Ability activation on this tool will generate a callback. You can determine which specific Ability is in the callback parameter
  • callback callback func
    1. YaAbility Current Activated Ability
void YaToolAPI.OnAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Listen for the Tool's ability activation event. Only Ability with the name configured generates this event
void YaToolAPI.RemoveAbilityActivate(YaEntity tool, function callback<YaAbility>)Beta
Remove Ability Activate Event
void YaToolAPI.RemoveAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Activate Event
void YaToolAPI.OnAbilityFinish(YaEntity tool, function callback<YaAbility>)Beta
Ability to execute the end event
void YaToolAPI.OnAbilityFinish(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Listen for Ability by name to end events
void YaToolAPI.RemoveAbilityFinish(YaEntity tool, function callback<YaAbility>)Beta
Remove Ability Finish event
void YaToolAPI.RemoveAbilityFinish(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Finish event
void YaToolAPI.OnAbilityInterrupted(YaEntity tool, function callback<YaAbility>)Beta
Ability Interruption incident.
void YaToolAPI.OnAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Ability Interruption incident.
void YaToolAPI.RemoveAbilityInterrupted(YaEntity tool, function callback<YaAbility>)Beta
Remove Ability Interrupted
void YaToolAPI.RemoveAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Interrupted
void YaToolAPI.Interrupt(YaEntity tool, number abilityId)Beta
Actively interrupt the executing Ability in the Tool。
void YaToolAPI.Activate(YaEntity tool, number abilityId)Beta
Activate an ability on the Tool
void YaToolAPI.Activate(YaEntity tool, YaEntity executor, number abilityId)Beta
Activate an ability on the Tool。Use executor as the owner
YaEntity YaToolAPI.GetToolOwner(YaEntity tool)Beta
Get the owner of the tool。