Kyno Posted April 5, 2018 Share Posted April 5, 2018 Hello everyone, i'm doing mod when you eat something, that plays wolfgang "powerup" animation, i've tried this code, the game don't crash, but when i eat meat for example nothing happens. My current code: local function oneat(inst) inst.sg:PushEvent("powerup") inst.SoundEmitter:PlaySound("dontstarve/characters/wolfgang/grow_smtomed") end Link to comment Share on other sites More sharing options...
IronHunter Posted April 5, 2018 Share Posted April 5, 2018 3 hours ago, Kynoox_ said: Hello everyone, i'm doing mod when you eat something, that plays wolfgang "powerup" animation, i've tried this code, the game don't crash, but when i eat meat for example nothing happens. My current code: local function oneat(inst) inst.sg:PushEvent("powerup") inst.SoundEmitter:PlaySound("dontstarve/characters/wolfgang/grow_smtomed") end Did you call your function? --master postinit inst.components.eater:SetOnEatFn(oneat) Link to comment 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