W1nged Posted October 18, 2019 Share Posted October 18, 2019 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: Spoiler 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) self.sg:GoToState("stunned") end) 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 --self.components.locomotor:Stop() self.sg:GoToState("land") if self.components.inventoryitem then self.components.inventoryitem.canbepickedup = true end end) end end Link to comment Share on other sites More sharing options...
Ultroman Posted October 25, 2019 Share Posted October 25, 2019 Does that code not work? Link to comment Share on other sites More sharing options...
W1nged Posted October 28, 2019 Author Share Posted October 28, 2019 On 26.10.2019 at 2:59 AM, Ultroman said: Does that code not work? In single player there is no Link to comment Share on other sites More sharing options...
Ultroman Posted October 28, 2019 Share Posted October 28, 2019 Please post your entire mod so I can test it. Link to comment Share on other sites More sharing options...
W1nged Posted November 4, 2019 Author Share Posted November 4, 2019 On 29.10.2019 at 12:20 AM, Ultroman said: Please post your entire mod so I can test it. Sorry for the long answer, I have already fixed everything, thanks for your activity! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
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.