### Install PeerJS Server Globally Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/p2p/index.md Install the PeerJS server globally on your system. This command is typically run once before starting the server. ```bash npm install peer -g ``` -------------------------------- ### Log Tutorial Start Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Logs the start of a tutorial. ```APIDOC ## POST /api/log/tutorialstart ### Description Logs the start of a tutorial. ### Method POST ### Endpoint /api/log/tutorialstart ### Parameters #### Query Parameters - **name** (String) - Required - The name of the tutorial. ### Request Example ```json { "name": "Tutorial 1" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Show Start Text at Beginning of Scene Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/endless-runner/index.md Ensure the 'Press Up to Start' text is visible at the beginning of the scene. This action should be placed in the initial event setup. ```GDevelop Events Show Press Up to Start ``` -------------------------------- ### Start Game Async Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Starts the game. ```APIDOC ## POST /game/start ### Description Starts the game. ### Method POST ### Endpoint /game/start ### Parameters There are no parameters for this action. ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. ``` -------------------------------- ### Gameplay started Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/poki-games-sdkhtml/index.md Inform Poki that the gameplay has started. This action has no parameters. ```APIDOC ## Gameplay started ### Description Inform Poki gameplay started. ### Method Call ### Endpoint PokiGamesSDKHtml::CallGameplayStart ### Parameters There are no parameters to set for this action. ``` -------------------------------- ### Start a Local PeerJS Server Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/p2p/index.md Start a local PeerJS server. Replace `` with any available port number on your machine. This command should be run every time you want to start the server. ```bash peerjs -p ``` -------------------------------- ### Install Dependencies and Serve Documentation Locally Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/README.md Use uv to synchronize dependencies and serve the documentation locally for development. Ensure uv is installed first. ```bash uv sync ``` ```bash uv run mkdocs serve # To run the documentation locally and see changes. ``` -------------------------------- ### Start Gameplay Session Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Tracks the start of a gameplay session. ```APIDOC ## Start the gameplay session ### Description Tracks the start of a gameplay session. ### Method POST ### Endpoint /gdevelopapp/gdevelop-documentation ### Parameters There are no parameters to set for this action. ### Request Example { "example": "{}" } ### Response #### Success Response (200) - **status** (string) - Indicates the status of the session start. #### Response Example { "example": "{\"status\": \"started\"}" ``` -------------------------------- ### Hide Start Text When Game Begins Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/endless-runner/index.md Add this action to hide the 'Press Up to Start' text once the game has started. This prevents it from being visible after the initial start condition is met. ```GDevelop Events Hide Press Up to Start ``` -------------------------------- ### Get Entry Point Asynchronously Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Get entry point that the game was launched from asynchronously. ```APIDOC ## GET /entry-point ### Description Get entry point that the game was launched from asynchronously. ### Method GET ### Endpoint /entry-point ### Parameters #### Query Parameters - **callback** (Any variable) - Required - String variable callback ### Request Example ```json { "callback": "entryPointCallback" } ``` ### Response #### Success Response (200) - **entryPoint** (String) - The entry point the game was launched from. #### Response Example ```json { "entryPoint": "Wortal.com" } ``` ``` -------------------------------- ### Example Submission Checklist Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/community/guide-for-submitting-an-example/index.md This checklist is part of the GitHub issue template for submitting a new example. Ensure all items are addressed before submitting. ```markdown - [ ] My Game has a proper name in the game properties. - [ ] My Game package name begins with 'com.examples'. - [ ] My Game has all events unfolded. - [ ] I've added myself as the author in the game properties. - [ ] I've included a file called 'README.md' with a description in proper English, explaining what this example is doing. - [ ] I confirm that this game and all its resources can be integrated to this Github repository, distributed and MIT licensed. - [ ] I've cleaned unused resources in the project. ``` -------------------------------- ### Log Level Start Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Logs the start of a level. ```APIDOC ## POST /api/log/levelstart ### Description Logs the start of a level. ### Method POST ### Endpoint /api/log/levelstart ### Parameters #### Query Parameters - **level** (String) - Required - The name of the level. ### Request Example ```json { "level": "Level 1" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Example Asset Pack Directory Structure Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/community/contribute-to-the-assets-store/technical-specifications.md This is an example of how to structure your files and folders for an asset pack. It includes metadata, public resources, and categorized assets. ```text French food │ ├── pack.json << Asset pack metadata │ ├── previewImages << Sub folder with public resources │ ├── IGNORED.md │ ├── thumbnail.png << png only │ ├── preview1.png << png only │ └── preview2.png << png only │ ├── previewSounds << Sub folder with public resources │ ├── IGNORED.md │ ├── preview1.aac << aac, wav, ogg or mp3 │ └── preview2.wav << aac, wav, ogg or mp3 │ │ ├── Character │ ├── Enemy 1_Attack Bottom_METADATA.png │ ├── Enemy 1_Attack Bottom_1.png │ ├── Enemy 1_Attack Bottom_2.png │ ├── Enemy 1_Attack Bottom_3.png │ ├── Enemy 1_Attack Bottom_4.png │ ├── Enemy 1_Attack Top_METADATA.png │ ├── Enemy 1_Attack Top_1.png │ ├── Enemy 1_Attack Top_2.png │ ├── Enemy 1_Attack Top_3.png │ ├── Enemy 1_Attack Top_4.png │ ├── Enemy 2_Attack Bottom_METADATA.png │ ├── Enemy 2_Attack Bottom_1.png │ ├── Enemy 2_Attack Bottom_2.png │ ├── Enemy 2_Attack Bottom_3.png │ ├── Enemy 2_Attack Bottom_4.png │ ├── Enemy 2_Attack Top_METADATA.png │ ├── Enemy 2_Attack Top_1.png │ ├── Enemy 2_Attack Top_2.png │ ├── Enemy 2_Attack Top_3.png │ └── Enemy 2_Attack Top_4.png │ ├── Props │ ├── 9patch_French Table_all_128.png │ ├── 9patch_French Table_center.png │ ├── 9patch_French Table_east.png │ ├── 9patch_French Table_north.png │ ├── 9patch_French Table_northeast.png │ ├── 9patch_French Table_northwest.png │ ├── 9patch_French Table_south.png │ ├── 9patch_French Table_southeast.png │ ├── 9patch_French Table_southwest.png │ ├── 9patch_French Table_west.png │ ├── quiche_resting_1.png │ └── quiche_resting_2.png │ ├── Audio │ └── cooking.aac │ ├── Font │ └── bonne maman.ttf │ └── Splash << Sub folder with a partial asset ├── IGNORED_FOR_IMAGE_ASSETS.md ├── SauceSplashing.asset.json ├── SauceSplashing.png └── SauceSplashing.preview.png ``` -------------------------------- ### Create object after scene timer Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/timers-and-time/index.md Example of creating an object once a scene timer reaches a certain value. Remember to start the timer. ```gdevelop Create object "Fireworks" at (0,0) Start (or reset) a scene timer named "MyTimer" ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/CONTRIBUTE.md Installs project dependencies using Poetry, excluding the root project. This is a prerequisite for running the documentation locally. ```sh poetry install --no-root ``` -------------------------------- ### Get Catalog Async Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Gets the catalog of available products the player can purchase. ```APIDOC ## GET /catalog ### Description Gets the catalog of available products the player can purchase. ### Method GET ### Endpoint /catalog ### Parameters #### Query Parameters - **callback** (Any variable) - Required - Array of product structure variable callback ### Request Example ```json { "callback": "catalogCallback" } ``` ### Response #### Success Response (200) - **products** (Array) - An array of product objects. #### Response Example ```json { "products": [ { "id": "product_1", "title": "Premium Currency Pack", "description": "Get 1000 premium currency.", "price": "$9.99" } ] } ``` ``` -------------------------------- ### Start Game on Key Press Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/endless-runner/index.md Triggers the game to start by changing the state variable to 1 when the 'Up' key is pressed and the current state is 0. This prevents the game from starting automatically. ```GDevelop Events Add a condition Variables Value of a scene variable Name: state Comparison: = (equals) Value: 0 Add a condition Keyboard Key pressed Key: Up Add an action Variables Value of a scene variable Name: state Value: 1 ``` -------------------------------- ### Install Cordova CLI Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/publishing/android_and_ios_with_cordova.md Install the Cordova command-line interface globally using npm. This is required for managing Cordova projects. ```bash npm install -g cordova ``` -------------------------------- ### Start a scene timer Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/timers-and-time/index.md Initiates a scene timer with a given name. Timers must be started before their elapsed time can be checked. Timer names are string expressions and must be enclosed in quotes. ```gdevelop Start (or reset) a scene timer named "MyTimer" ``` -------------------------------- ### Get touch identifier at start Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/mouse-touch/index.md Retrieve the identifier for a touch event when it begins. Use StartedTouchOrMouseId(index) to get the ID of the Nth touch that started this frame. StartedTouchOrMouseCount() returns the total number of touches that started. ```gdevelop StartedTouchOrMouseId(0) StartedTouchOrMouseCount() ``` -------------------------------- ### Build Documentation for Deployment Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/README.md Use uv to build the documentation for deployment on a static hosting platform. Ensure uv is installed first. ```bash uv sync ``` ```bash uv run mkdocs build # To build for deployment on a static hosting. ``` -------------------------------- ### Get a portion of a text Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/string-instructions/index.md Extracts a substring from a given text, starting at a specified position and with a defined length. Indexing starts from 0. ```gdevelop expressions Mid("Hello World", 6, 5) ``` -------------------------------- ### Initialize a shop Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/shopify/reference.md Initialize a shop with your credentials. Call this action first, and then use the shop name in the other actions to interact with products. ```APIDOC ## Initialize a shop ### Description Initialize a shop with your credentials. Call this action first, and then use the shop name in the other actions to interact with products. ### Method (Not specified, likely an internal GDevelop action) ### Endpoint (Not applicable for GDevelop actions) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable for GDevelop actions) ### Response #### Success Response (200) (Not specified) #### Response Example (Not specified) ### Technical Details - **Parameter 1** (String): Shop name - **Parameter 2** (String): Domain (xxx.myshopify.com) - **Parameter 3** (String): App Id - **Parameter 4** (String): Access Token - **Internal Parameter 0**: Handled by GDevelop. - **Internal Type**: `Shopify::BuildClient` ``` -------------------------------- ### Get a character from a text Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/string-instructions/index.md Retrieves the character at a specific position within a text. Indexing starts from 0 for the first character. ```gdevelop expressions Mid("Hello", 1, 1) ``` -------------------------------- ### Get Argument Parameter in JavaScript Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/events/js-code/index.md Use `eventsFunctionContext.getArgument` to read the value of parameters that are numbers, strings, or booleans. This example retrieves a parameter named 'Angle'. ```javascript const angle = eventsFunctionContext.getArgument("Angle"); ``` -------------------------------- ### Electron Builder Platform Options Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md These commands demonstrate how to use electron-builder with various platform and packaging format flags. Use `-w` for Windows, `-l` for Linux, and `-m` for macOS. Options like `portable` and `AppImage` specify packaging formats. Combine flags for multiple platforms. ```bash # Build for windows only: yarn build -w ``` ```bash # Build a windows portable executable: yarn build -w portable ``` ```bash # Build for windows and linux: yarn build -wl ``` ```bash # Build portable builds for windows and linux yarn build -w portable -l AppImage ``` ```bash # Build for all platforms: yarn build -wlm ``` -------------------------------- ### Hide Object at Scene Start Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/platformer/part-6.md Hide an object when the scene begins. This is often used for setup or to create invisible elements that affect gameplay. ```GDevelop Conditions At the beginning of the scene ``` ```GDevelop Actions Hide ``` -------------------------------- ### Get character from code point Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/string-instructions/index.md Returns the character corresponding to a given Unicode code point. For example, code point 9731 returns '☃'. ```gdevelop expressions Chr(9731) ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/CONTRIBUTE.md Serves the GDevelop documentation locally using MkDocs. Use the --dirtyreload flag for faster updates after making changes. ```sh poetry run mkdocs serve ``` ```sh poetry run mkdocs serve --dirtyreload ``` -------------------------------- ### Reproduce Bug Example Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/community/guide-to-reporting-a-bug/index.md Use this format to provide clear, step-by-step instructions for reproducing a bug. Ensure all necessary actions are listed. ```text * Go to Scene events * Right click on an event * Click edit * The window should now be going crazy ``` -------------------------------- ### Open Product URL Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/shopify/index.md Open the retrieved product URL in the player's web browser. This action is typically performed after successfully obtaining the product URL. ```gdevelop Browser.OpenURL("productURL") ``` -------------------------------- ### Initialize Shopify Shop Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/shopify/index.md Initialize your Shopify shop in memory by providing the shop URL, app ID, and Storefront access token. Ensure all values are enclosed in quotes. ```gdevelop Shopify.InitializeShop("your-shop-name", "https://your-shop-name.myshopify.com", "1234567890", "shpat_abcdef1234567890abcdef1234567890") ``` -------------------------------- ### Start Camera Shaking Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/camera-shake3d/index.md Starts an indefinite camera shaking effect with a specified easing duration. ```APIDOC ## Start camera shaking ### Description Start shaking the camera indefinitely. ### Method (Implicitly an action, no specific HTTP method) ### Endpoint (Not applicable for GDevelop actions) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Request Example (Not applicable for GDevelop actions) ### Response #### Success Response (200) (Not applicable for GDevelop actions) #### Response Example (Not applicable for GDevelop actions) ### Parameters Details - Parameter 1 (🔢 Number): Ease duration (in seconds) > Technical note: parameters 0, 2 are internal parameters handled by GDevelop. > Technical note: this action internal type (in GDevelop JSON) is `CameraShake3D::StartShaking`. ``` -------------------------------- ### Make Purchase Async Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Make purchase for specified product. ```APIDOC ## POST /api/purchase/make ### Description Initiates a purchase for a specified product. ### Method POST ### Endpoint /api/purchase/make ### Parameters #### Query Parameters - **productId** (String) - Required - The ID of the product to purchase. - **callback** (Any variable) - Required - A variable to store the purchase result. ### Request Example ```json { "productId": "premium_item_1", "callback": "purchaseResultVar" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Get Entry Point Data Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Get any data object associated with the entry point that the game was launched from. ```APIDOC ## GET /entry-point-data ### Description Get any data object associated with the entry point that the game was launched from. ### Method GET ### Endpoint /entry-point-data ### Parameters #### Query Parameters - **callback** (Any variable) - Required - Structure variable callback to set the result ### Request Example ```json { "callback": "entryPointDataCallback" } ``` ### Response #### Success Response (200) - **data** (Object) - The data object associated with the entry point. #### Response Example ```json { "data": { "customData": "someValue" } } ``` ``` -------------------------------- ### Show Auth Prompt Async Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Shows the authentication prompt to the player, allowing login or registration. ```APIDOC ## Show Auth Prompt Async ### Description Shows the authentication prompt to the player. This allows the player to log in or register for an account. If the player successfully logs in or registers, the player API will be updated with the new player information. ### Method POST ### Endpoint /gdevelopapp/gdevelop-documentation ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body There are no parameters to set for this action. ### Request Example ```json { "message": "Please log in or register." } ``` ### Response #### Success Response (200) - **authResult** (object) - The result of the authentication prompt. #### Response Example ```json { "authResult": {} } ``` ### Technical Notes Internal type: `WortalSDK::ShowAuthPromptAsync` ``` -------------------------------- ### Play Soundtrack Music at Scene Start Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/space-shooter/10-sound-effects-music.md Use the 'At the beginning of the scene' condition to play background music. Configure the 'Play sound' action to loop the soundtrack indefinitely. ```GDevelop Events Condition: At the beginning of the scene Action: Play sound "soundtrack.ogg", Volume: 40, Pitch: 1, Repeat: yes ``` -------------------------------- ### Get Connected Players Async Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Gets ConnectedPlayers containing information about active players that are connected to the current player. ```APIDOC ## GET /connected-players ### Description Gets ConnectedPlayers containing information about active players that are connected to the current player. ### Method GET ### Endpoint /connected-players ### Parameters #### Query Parameters - **callback** (Any variable) - Required - Array of connected player ### Request Example ```json { "callback": "connectedPlayersCallback" } ``` ### Response #### Success Response (200) - **connectedPlayers** (Array) - An array of connected player objects. #### Response Example ```json { "connectedPlayers": [ { "id": "player_123", "username": "Gamer1", "isOnline": true }, { "id": "player_456", "username": "Gamer2", "isOnline": false } ] } ``` ``` -------------------------------- ### Touch and Mouse Start Expressions Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/mouse-touch/reference.md Determine the number of touches or mouse clicks that started in the current frame and retrieve their identifiers. ```APIDOC ## StartedTouchOrMouseCount ### Description The number of touches (including the mouse) that have just started on this frame. The touch identifiers can be accessed using StartedTouchOrMouseId(). ### Parameters None ## StartedTouchOrMouseId ### Description The identifier of the touch or mouse that has just started on this frame. The number of touches can be accessed using StartedTouchOrMouseCount(). ### Parameters #### Path Parameters - **number** (Number) - Touch index ``` -------------------------------- ### Log Tutorial End Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/wortal-sdk/index.md Logs the end of a tutorial. To ensure the level timer is recorded the tutorial name must match the name passed into the previous logTutorialStart call. If it does not match then the timer will be logged at 0. ```APIDOC ## POST /api/log/tutorialend ### Description Logs the end of a tutorial. ### Method POST ### Endpoint /api/log/tutorialend ### Parameters #### Query Parameters - **name** (String) - Required - The name of the tutorial. - **completed** (String) - Required - Flag indicating if the tutorial was completed ('completed' or 'not completed'). ### Request Example ```json { "name": "Tutorial 1", "completed": "completed" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Append Parameter to Storage Data Get Request Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/playgama-bridge/index.md Appends a key to a storage data get request. Requires a key. ```APIDOC ## Append Parameter to Storage Data Get Request ### Description Appends a key to a storage data get request. Requires a key. ### Method Not applicable (Action in GDevelop) ### Endpoint Not applicable (Action in GDevelop) ### Parameters #### Path Parameters - **Key** (string) - Required - The key to append to the get request. ### Request Example N/A ### Response N/A ``` -------------------------------- ### Start countdown timer Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/countdown-timer/index.md Starts the countdown timer from the previously set value. Allows specifying whether negative numbers are permitted. ```APIDOC ## Start countdown timer ### Description Starts the countdown from the value set previously. You can choose to allow negative numbers. ### Method Action ### Parameters #### Path Parameters - **Clock name** (string) - Required - The name of the clock to start. - **Allow negative numbers** (yes/no) - Required - Whether to allow the timer to go into negative values. ### Technical Notes Internal GDevelop type: `CountdownTimer::StartCountdown` ``` -------------------------------- ### Build Project with Yarn Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md Run this command in the exported game's directory to install dependencies and build the project. If using an older GDevelop version, you might need to add electron-builder as a dependency first. ```bash yarn && yarn build ``` ```bash yarn add -D electron-builder && yarn electron-builder ``` -------------------------------- ### Emulate and Run Cordova Project on iOS Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/publishing/android_and_ios_with_cordova.md List available iOS simulators, run the app on a specific simulator, or deploy to an iOS device via Xcode. Device testing requires setting up a 'Development Team' in Xcode. ```bash cordova emulate ios --list ``` ```bash cordova run ios --target="iPhone-8" ``` -------------------------------- ### Start (or reset) Scene Timer Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/all-features/time/reference.md Starts a new scene timer or resets an existing one to zero, beginning its elapsed time count. ```APIDOC ## Start (or reset) Scene Timer ### Description Resets the specified scene timer. If the timer doesn't exist, it's created and started. ### Method Action ### Parameters #### Name (String) - **Timer's name** (String): The name of the scene timer to start or reset. > Technical note: parameter 0 is an internal parameter handled by GDevelop. > Technical note: this action internal type (in GDevelop JSON) is `ResetTimer`. ### Hints and advice Scene timers must be started (e.g. with the "Start (or reset) a scene timer" action) before being used. They are scene-wide and should not be (re)started at each frame, otherwise they keep restarting. ``` -------------------------------- ### Initialize Grid Variables Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md Sets up scene variables 'x' and 'y' to 1 at the beginning of the scene. These variables are used to track the position for tile generation. ```GDevelop Events Variable 'x' = 1 Variable 'y' = 1 ``` -------------------------------- ### Connect to server Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/web-socket-client/index.md Establishes a connection to a specified WebSocket server. ```APIDOC ## Connect to server ### Description Connects to a WebSocket server. ### Method Action ### Parameters #### Parameters - **Server address** (String) - The address of the WebSocket server to connect to. ### Technical Notes - Internal GDevelop type: `WebSocketClient::Connect` - Parameters 0 and 2 are handled internally by GDevelop. ``` -------------------------------- ### Example: Adding damage to an object Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/behaviors/events-based-behaviors/index.md This example defines a custom action for a behavior that adds damage to an object. This action can be called from scene events. ```GDevelop Events action: Add damage to the object parameters: damage: number doStepPreEvents: // Apply damage to the object's health. health = health - damage ``` -------------------------------- ### Login Source: https://github.com/gdevelopapp/gdevelop-documentation/blob/main/docs/gdevelop5/extensions/poki-games-sdkhtml/index.md Prompt the player to log in with Poki. This action has no parameters. ```APIDOC ## Login ### Description Prompt the player to log in with Poki. ### Method Call ### Endpoint PokiGamesSDKHtml::Login ### Parameters There are no parameters to set for this action. ```