Arithmechick Posted February 21, 2023 Share Posted February 21, 2023 (edited) I want to call a function anytime the player eats any food item. Is there any way to do this? The modding wiki lists a now-obsolete UseItem event. Is there some other event I should be using instead? Edit: Solved. I realized I could accomplish this by overriding the vanilla ISEatFoodAction.perform method, i.e. --Override vanilla function local base_perform = ISEatFoodAction.perform function ISEatFoodAction:perform() base_perform(self) doSomething(self.item, self.character) end Edited February 22, 2023 by Arithmechick Hugo Qwerty 1 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