Set a GDevelop global variable
set_global_variableSet a project-wide variable in GDevelop to store primitives, structures, or arrays.
Instructions
Create or update an editable project-wide variable with a primitive, structure, or array value.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"name": "<name>",
"value": "<value>"
},
"name": "set_global_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes | ||
| projectId | Yes |