PhasmaFelis Posted January 18, 2016 Share Posted January 18, 2016 I would like to make a mod that, every time you eat, briefly displays the food's hunger/health/sanity values. (I want to be able to figure out exact values more easily, but the Display Food Values mod seems a bit too easy for me.) Any suggestions on where to begin? Is there an existing mod that performs some action upon eating that I could examine for ideas? Link to comment https://forums.kleientertainment.com/forums/topic/62806-how-do-i-do-something-each-time-the-character-eats/ Share on other sites More sharing options...
Blueberrys Posted January 19, 2016 Share Posted January 19, 2016 (edited) -- inst is the player instance -- use GetPlayer() if you don't already have a reference to it inst:ListenForEvent("oneat", function(inst, data) -- data.food contains the food's instance -- Example on how to get stats local hunger = data.food.components.edible:GetHunger(inst) -- Check the the edible component for more functions end) Edited January 19, 2016 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/62806-how-do-i-do-something-each-time-the-character-eats/#findComment-711269 Share on other sites More sharing options...
MidrealmDM Posted January 19, 2016 Share Posted January 19, 2016 Just use the 'always on' status mod - it shows the numerical value of your current hunger, sanity, etc. When you eat, you can see the numerical increase. (eg change from 50 to 83 for example) Link to comment https://forums.kleientertainment.com/forums/topic/62806-how-do-i-do-something-each-time-the-character-eats/#findComment-711345 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