Wingetto 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 https://forums.kleientertainment.com/forums/topic/112809-help-with-modding-a-custom-item/ 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 https://forums.kleientertainment.com/forums/topic/112809-help-with-modding-a-custom-item/#findComment-1276595 Share on other sites More sharing options...
Wingetto 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 https://forums.kleientertainment.com/forums/topic/112809-help-with-modding-a-custom-item/#findComment-1277809 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 https://forums.kleientertainment.com/forums/topic/112809-help-with-modding-a-custom-item/#findComment-1278028 Share on other sites More sharing options...
Wingetto 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 https://forums.kleientertainment.com/forums/topic/112809-help-with-modding-a-custom-item/#findComment-1280576 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now