thirteenth Posted November 19, 2019 Share Posted November 19, 2019 Hi. An Events.OnGameStart event is exist to enter the game, but I can not find the event responsible for exiting the game. There is an Events.OnDisconnect event, but for me it does not work - the function added to it is never called. I searched the Internet and found a 2016 post on the forum https://theindiestone.com/forums/index.php?/topic/17846-testing-for-when-the-game-is-running-lua/&tab=comments#comment-220050 which mentions the Event.OnGameExit event, but, as far as I understand, this event does not exist. Now I’m thinking about redefining clicking on the Quit menu item, but this will not give me the full necessary result, since it’s still not clear how to handle closing the game console, ALT + F4 or losing the connection. I probably need to look towards the server side of the mod, but I have run out of ideas where and what to look for. I will be grateful if someone shares their knowledge in this area. Link to comment Share on other sites More sharing options...
ZombiesLoveBrainiacs Posted November 20, 2019 Share Posted November 20, 2019 I haven't used it yet, but maybe "OnSave" will be useful? Is Events.OnDisconnect never dispatched, not even in multiplayer? Link to comment Share on other sites More sharing options...
thirteenth Posted November 21, 2019 Author Share Posted November 21, 2019 I apologize for the pause in the reply. I know the OnSave event, but I did not consider it. I'll see if it suits me. Events.OnDisconnect is called when connecting to the server. If a break occurs at the time of the connection, then it is called. After a successful connection, it is no longer called, as far as I understand. Link to comment Share on other sites More sharing options...
sharpzera1 Posted December 31, 2021 Share Posted December 31, 2021 Hey @thirteenth, did you figure out how to do it? Link to comment Share on other sites More sharing options...
thirteenth Posted January 7, 2022 Author Share Posted January 7, 2022 On 12/31/2021 at 7:22 AM, sharpzera1 said: Hey @thirteenth, did you figure out how to do it? Hi! I have not found how to do this 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