clear hatred||doc135580

September 20, 2022

Format

 AIControl:clearHatred(objID) 
  • The class to which the function belongs:AIControl

Description

Clears AI's aggro targets.


Parameters

Parameters type Description
objID int Clear the hatred for the entity when there is objID, and clear the hatred for all entities when there is no objID

Code Samples

local control = entity:getAIControl()
control:clearHatred(1) -- Clears hatred of entities with objID of 1
control:clearHatred( ) -- Clear hatred of all entities