Elijah Zobeenko Posted February 23, 2022 Share Posted February 23, 2022 Hi there! I'm a bit stuck with attempts to handle quitting the game in my mod. I need it to restore the states of some components, like season and so on. I've tried listening for "player deactivated" and "deactivate world", but it seems that mod has been removed before these events are invoked. Are there any ways to catch the fact, that mod is going to be unloaded? Link to comment https://forums.kleientertainment.com/forums/topic/137706-onexit-onquit-events/ Share on other sites More sharing options...
Bumber64 Posted February 24, 2022 Share Posted February 24, 2022 (edited) "function ComponentNameHere:OnSave()"? See components/inventory.lua for example. If it's for an existing component, I'm not quite sure how you handle the loading part, since OnLoad is called before a mod's AddComponentPostInit. Edited February 24, 2022 by Bumber64 1 Link to comment https://forums.kleientertainment.com/forums/topic/137706-onexit-onquit-events/#findComment-1541684 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