Management - nkrapivin/GMEXT-Steamworks GitHub Wiki
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
This function updates the steam APIs.
â ī¸ IMPORTANTThis 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.
This function shuts down the Steamworks API, releases pointers and frees memory.
â ī¸ IMPORTANTThis 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.