Jump to content

Help with modding a custom item


Recommended Posts

Hi everyone,
I have a weapon like a boomerang and I have this idea to implement it this way: it does not cause damage, but stuns. I had a similar implementation for the DST, now I port to the DS, I do not know how to properly issue. Thanks in advance!

my code for this item in dst:


local function onattack_wand(inst, attacker, target)
            if target.sg and target.sg:HasState("stunned") and target.prefab ~= "buzzard" then
                target:DoTaskInTime(0, function(self)
            elseif target.prefab == "butterfly" or target.prefab == "bee" or target.prefab == "killerbee" or target.prefab == "mosquito" then
                target:DoTaskInTime(0, function(self)
                    --self.sg:SetTimeout(2) -- 0.15
                    if self.components.inventoryitem then
                        self.components.inventoryitem.canbepickedup = true



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...