Jump to content

Need help making something happen when a moleworm is fed


xovoxx

Recommended Posts

Hello! I'm working on a mod where you have to take care of a moleworm. I want to make various things happen when that moleworm is fed.

I succeeded in overwriting the moleworm's prefab script.

I added the line


    inst.components.eater:SetOnEatFn(OnEat)

local function OnEat(inst)
    inst.components.inspectable:SetDescription("updated mole inpsection 1")
end

But unfortunately, nothing happens when the mole eats : inspecting it afterwards still displays the normal description. It really seems as if my function "OnEat" was not called.

I suspect I might be using the wrong parameters, but I don't know how to fix it.

Any help is welcome!

Link to comment
Share on other sites

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.

×
  • Create New...