YaToolAPI¶
BETA
Tool API
Functions¶
void YaToolAPI.OnAbilityActivate(YaEntity tool, function callback<YaAbility>)¶
SERVER ONLY 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 funcYaAbility
Current Activated Ability
void YaToolAPI.OnAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY 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>)¶
SERVER ONLY BETA
Remove Ability Activate Event
void YaToolAPI.RemoveAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY BETA
Remove Ability Activate Event
void YaToolAPI.OnAbilityFinish(YaEntity tool, function callback<YaAbility>)¶
SERVER ONLY BETA
Ability to execute the end event
void YaToolAPI.OnAbilityFinish(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY BETA
Listen for Ability by name to end events
void YaToolAPI.RemoveAbilityFinish(YaEntity tool, function callback<YaAbility>)¶
SERVER ONLY BETA
Remove Ability Finish event
void YaToolAPI.RemoveAbilityFinish(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY BETA
Remove Ability Finish event
void YaToolAPI.OnAbilityInterrupted(YaEntity tool, function callback<YaAbility>)¶
SERVER ONLY BETA
Ability Interruption incident.
void YaToolAPI.OnAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY BETA
Ability Interruption incident.
void YaToolAPI.RemoveAbilityInterrupted(YaEntity tool, function callback<YaAbility>)¶
SERVER ONLY BETA
Remove Ability Interrupted
void YaToolAPI.RemoveAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)¶
SERVER ONLY BETA
Remove Ability Interrupted
void YaToolAPI.Interrupt(YaEntity tool, number abilityId)¶
SERVER ONLY BETA
Actively interrupt the executing Ability in the Tool。
void YaToolAPI.Activate(YaEntity tool, number abilityId)¶
SERVER ONLY BETA
Activate an ability on the Tool
void YaToolAPI.Activate(YaEntity tool, YaEntity executor, number abilityId)¶
SERVER ONLY BETA
Activate an ability on the Tool。Use executor as the owner
YaEntity YaToolAPI.GetToolOwner(YaEntity tool)¶
SERVER ONLY BETA
Get the owner of the tool。