#check stackcount before consume item

1 messages · Page 1 of 1 (latest)

azure panther
#

this consumable item is book_of_intelegence.
what filter need to use for this case before consumed?

azure breach
#

CastFilter

azure panther
azure breach
#

Yes.

But I would just make the item custom, it's as simple as it gets

azure panther
azure breach
#

Step 1 - add modifier
Step 2 - StartIntervalThink
Step 3 - OnIntervalThink check charges and do what you need

azure panther
#
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

azure breach
#

You should check the item, not the modifier that it applies when consumed

azure panther
#

oh wait