Remove attack skills||doc135575

September 20, 2022

Format

 AIControl:removeSkill(skillKey)
 AIControl:removeSkillWithFullName(fullName)
 AIControl:removeAllSkill()
  • The class to which the function belongs:AIControl

Description

Removed AI's attack skills.


Parameters

Function name Parameters type Description
removeSkill skillKey (the key value of the skill, the key set when adding an attack skill) string Delete the skill whose key value is skillKey
removeSkillWithFullName fullName (pathname of the skill) string Delete the skill with pathname fullName
removeAllSkill null null Clear skill list

Code Samples

local player
local petEntity
local control = petEntity:getAIControl()
control:removeSkill("myTestSkill")
control:removeSkillWithFullName("myplugin/myTestSkill")
control:removeAllSkill()