remove_buff
Removes the given buff from the entity.
Arguments
A table defining a copy of the buff to be removed, the buff's UserData representation or a string with the buff ID of the buff to be removed from the entity.
Errors
- If the buff ID is
nilor it is invalid somehow. - If the buff is not present in the entity.
- If the buff is active (as you can't remove an active buff from an entity)
Signature
---@param value Buff|table|string @UserData table or string representing a valid buff to be removed
function Entity:remove_buff(value)
Example of Usage
-- let's assume e is a valid entity defined elsewhere
local ok, err = pcall(function()
e:remove_buff("d28452fb-2a31-42a0-8286-2901c64fd318")
end)
if not ok then
-- treat err here
end
--