remove buff||doc135590

September 20, 2022

Format

Entity:removeBuff(buff)
  • The class of the function:Entity

Description

Removes the specified buff from the target entity.


Parameters

Variable name type Description
buff Buff Buff instance


Code Samples

Add a buff with a duration of 1000 frames (50 seconds) to itself in the server-side script mounted on the entity object, and remove the buff in advance at 100 frames (5 seconds).

local buff=this:addBuff("myplugin/buff001",1000)
World.Timer(100,function()
    this:removeBuff(buff)
end)