#check stackcount before consume item
1 messages · Page 1 of 1 (latest)
CastFilter
but this item is not custom, can i check from custom modifier onintervalthink?
Yes.
But I would just make the item custom, it's as simple as it gets
yes true, but if custom item,when alt click cant show the buff information.
so any steps to check via custom modifier?
Step 1 - add modifier
Step 2 - StartIntervalThink
Step 3 - OnIntervalThink check charges and do what you need
if self:GetParent():HasModifier("modifier_book_of_intelligence") then
local intelBookModifier = self:GetParent():FindModifierByName("modifier_book_of_intelligence")
local intelStack = self:GetParent():GetModifierStackCount("modifier_book_of_intelligence", self)
if intelStack > 10000 then
Say(self:GetParent(), "intel book maks 10000", true)
intelBookModifier:SetStackCount(10000)
end
end
with this code, the stats always consumed first
You should check the item, not the modifier that it applies when consumed
oh wait