Add attack skills||doc135574

September 20, 2022

Format

 AIControl:addSkill(params)
  • The class to which the function belongs:AIControl

Description

Add skills to AI's skillList.


Parameters

Parameters type Description
params table{“skillKey”:”skill key”, …other reference AI skill configuration} configuration of skills

Code Samples

local player
local petEntity
local control = petEntity:getAIControl()
local params = {
    skillKey = "myTestSkill",
    attackDis = 5,
    fullName = "myplugin/myTestSkill",
    priority = 1
}
control:addSkill(params)