diff --git a/automated_updates_data.json b/automated_updates_data.json index eb14cff8ead..56125a041e2 100644 --- a/automated_updates_data.json +++ b/automated_updates_data.json @@ -92,6 +92,10 @@ { "date": "2026-04-22", "summary": "Improved resources-loading docs (named Preload scene action, documented SceneLoadingProgress expression and AreSceneAssetsLoaded condition, clarified custom loading screen approach) and added extension lifecycle functions table to events/functions docs" + }, + { + "date": "2026-06-18", + "summary": "Improved leaderboards docs (added LastSaveError expression, Closed by player condition, Close current leaderboard and Always attach scores to connected player actions) and screenshot docs (documented desktop-only file-save limitation)" } ] } diff --git a/docs/gdevelop5/all-features/leaderboards/index.md b/docs/gdevelop5/all-features/leaderboards/index.md index 60aa1797ac8..b32f42d7612 100644 --- a/docs/gdevelop5/all-features/leaderboards/index.md +++ b/docs/gdevelop5/all-features/leaderboards/index.md @@ -38,6 +38,12 @@ You have 3 conditions at your disposal to monitor how the saving is run through. For each of those conditions, you can specify the leaderboard but this is optional. This can prove useful if you try to save the player score in multiple leaderboards at once. +If a save fails, you can read the reason of the failure with the **"Error of last save attempt"** expression (`Leaderboards::LastSaveError`) — useful to display a meaningful message to the player or to log the problem. + +!!! tip + + By default, when a [player is logged in](/gdevelop5/all-features/player-authentication), scores are automatically attached to their account, even if you use the "Save player score" action. You can change this with the action **"Always attach scores to the connected player"** if you need to submit a score under a custom name while a player is connected. + ## Display a leaderboard Use the action "**Display leaderboard**" to load and display a leaderboard on the screen. It will be displayed on top of your game, and the view will have a button to close it in order to come back to your game. @@ -54,6 +60,8 @@ While it's **loading**, to let the player know that the leaderboard will display Either case, if there's an error during the display, *it will close automatically*. You can also use the 2 conditions "Leaderboard display has errored" and "Leaderboard display has loaded" if you want to add logic around a possible error. +The leaderboard view has a button allowing the player to close it. To react to this, use the condition **"Closed by player"** (triggered the moment the player closes the view) — for instance to resume the game or go back to a menu. You can also close the leaderboard from your events with the action **"Close current leaderboard"**. + ## Advanced: pause the scene when the leaderboard is displayed We recommend that you send back the player to a menu scene or a non gameplay scene after you open the leaderboard. diff --git a/docs/gdevelop5/all-features/screenshot/index.md b/docs/gdevelop5/all-features/screenshot/index.md index bb4518a4228..7f9feff84ef 100644 --- a/docs/gdevelop5/all-features/screenshot/index.md +++ b/docs/gdevelop5/all-features/screenshot/index.md @@ -13,6 +13,10 @@ Note: As of GDevelop 5.0.0-beta92 the screenshot action is no longer an extensio Use this action to save a screenshot of everything which is currently drawn on the game window into a *png* file. +!!! warning + + Saving a screenshot to a file is only supported when the game runs as a desktop application (Windows, Linux or macOS). On web and mobile (Android/iOS) exports, the game has no access to the file system, so this action has no effect. If the save path does not end with `.png`, the extension automatically appends it. + ##### Parameters: **Save path**: The file path where the screenshot should be saved.