Search the Community
Showing results for tags 'iamsobad'.
Found 1 result
Yakuzashi posted a topic in [Don't Starve Together] Mods and ToolsHi, I have this troublemaker in my master_postinit, but no matter how hard I try I just can't succeed. I want it to be dependent on % chance, but as I said this is far above my reach. I know that first part... handle.deststate = function(inst) return "doshortaction" end ... proceeds without executing the rest of code, but when I want to manipulate all those lines to be harmonized it just ends with clusterdisaster. local master_postinit = function(inst) local function custperc(inst) local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK] if math.random() < 0.5 then handle.deststate = function(inst) return "doshortaction" end return if math.random() < 0.5 then "doshortaction" end end else inst.components.talker:Say("I have to rest...", 2.5,true) end end Thank you kind stranger, just in advance.