Management - nkrapivin/GMEXT-Steamworks GitHub Wiki

Back To Top

steam_init

This function initialises the steam APIs.

â„šī¸ NOTE

This function is already configured to be called at Game Start by the extension, and should not be called from your game code.


Syntax:

steam_init();

Returns:

N/A




Back To Top

steam_update

This function updates the steam APIs.

âš ī¸ IMPORTANT

This function is required to be called in order for the Steamworks extension to work. We recommend you place this function in a persistent controller object that calls it inside its Step Event.


Syntax:

steam_update();

Returns:

N/A

Example:

steam_update();

The above code will update the steam APIs.




Back To Top

steam_shutdown

This function shuts down the Steamworks API, releases pointers and frees memory.

âš ī¸ IMPORTANT

This function is required to be called in order for the Steamworks extension to work. We recommend you place this function in the GameEnd Event of a controller object. You need to check if this is not a game_restart().


Syntax:

steam_shutdown();

Returns:

N/A

Example:

global.is_game_restarting = true;
game_restart();

The code above should be used when you want to restart your game. We set the is_game_restarting global variable to true announcing the game being restarted to true (this global variable should already be declared at the begining of your game and be set to false by default). Now inside our Game End Event we can use the following code.

if (global.is_game_restarting == false) {
    steam_shutdown();
}
global.is_game_restarting = false;

First we check if the game is not restarting and in that case we know we are actually ending so we call the steam_shutdown method.




âš ī¸ **GitHub.com Fallback** âš ī¸