skill release event||doc136871

September 20, 2022

Format

 SKILL_CAST
  • Function belongs to:Skill

Description

This event is called when the skill is released.


context

The context content of the event

Name Type Description
obj1 Entity The object instance that releases the skill
obj2 Entity target object instance (may be empty)


Code example

Get the skill configuration with the ID of fireball in the editor, and register the function to be executed when the skill is released

Trigger.RegisterHandler(Skill.Cfg("myplugin/fireball"),"SKILL_CAST",function(context)
  local entity = context.obj1
  print(entity.name, ':cast fireball skill!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
end)