Jump to content
Sign in to follow this  
thirteenth

OnGameExit event

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...