Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 72 additions & 27 deletions extensions/reviewed/ExtendedVariables.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,29 @@
{
"author": "@Bouh, D8H",
"category": "General",
"dimension": "",
"extensionNamespace": "",
"fullName": "Variables copier",
"gdevelopVersion": ">=5.5.222",
"fullName": "Extended variables support",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZhcmlhYmxlLWJveCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSAzSDVDMy45IDMgMyAzLjkgMyA1VjE5QzMgMjAuMSAzLjkgMjEgNSAyMUgxOUMyMC4xIDIxIDIxIDIwLjEgMjEgMTlWNUMyMSAzLjkgMjAuMSAzIDE5IDNNNy40IDE4QzUuOSAxNi41IDUgMTQuMyA1IDEyUzUuOSA3LjUgNy40IDZMOSA2LjdDNy43IDcuOSA3IDkuOSA3IDEyUzcuNyAxNi4xIDkgMTcuM0w3LjQgMThNMTIuNyAxNUwxMS45IDEzTDEwLjUgMTVIOUwxMS4zIDExLjlMMTAgOUgxMS4zTDEyLjEgMTFMMTMuNSA5SDE1TDEyLjggMTJMMTQuMSAxNUgxMi43TTE2LjYgMThMMTUgMTcuM0MxNi4zIDE2IDE3IDE0LjEgMTcgMTJTMTYuMyA3LjkgMTUgNi43TDE2LjYgNkMxOC4xIDcuNSAxOSA5LjcgMTkgMTJTMTguMSAxNi41IDE2LjYgMThaIiAvPjwvc3ZnPg==",
"name": "ExtendedVariables",
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/variable-box.svg",
"shortDescription": "Check variable existence, copy, delete, and create dynamic variables at runtime.",
"version": "1.0.4",
"description": [
"This extension provides: ",
"- Conditions to check if a global/scene/object variable exists.",
"- Actions to copy object variables, global and scene variables.",
"- Actions to delete an existing global/scene variable from memory.",
"- Actions to create a global/scene variable using a text expression, rather than a variable name input.",
"- Expressions to get the value or text from a global/scene variable using a text expression, rather than a variable name.",
"",
"Text expressions allows to enter the name of the variable with an expression like `\"MyVar\"+ ToString(Variable(Health))`"
],
"shortDescription": "Copy structure and array variables.",
"version": "1.1.0",
"description": "Copy all the children of a structure or an array into another variable.",
"origin": {
"identifier": "ExtendedVariables",
"name": "gdevelop-extension-store"
},
"tags": [
"variable",
"scene",
"global",
"object",
"remove",
"expression",
"copy",
"structure",
"array",
"boolean",
"duplication"
],
"tags": [],
"authorIds": [
"2OwwM8ToR9dx9RJ2sAKTcrLmCB92",
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [],
"eventsFunctions": [
{
"description": "Check if a global variable exists.",
Expand Down Expand Up @@ -107,6 +89,7 @@
"functionType": "Condition",
"group": "Global variables",
"name": "GlobalVariableExist",
"private": true,
"sentence": "If the global variable _PARAM1_ exist",
"events": [
{
Expand Down Expand Up @@ -193,6 +176,7 @@
"functionType": "Condition",
"group": "Scene variables",
"name": "SceneVariableExist",
"private": true,
"sentence": "If the scene variable _PARAM1_ exist",
"events": [
{
Expand Down Expand Up @@ -285,6 +269,7 @@
"functionType": "Condition",
"group": "Variables",
"name": "ObjectVariableExist",
"private": true,
"sentence": "Object _PARAM1_ has object variable _PARAM2_",
"events": [
{
Expand Down Expand Up @@ -366,6 +351,7 @@
"functionType": "Action",
"group": "Global variables",
"name": "DeleteGlobalVariable",
"private": true,
"sentence": "Delete the global variable _PARAM1_ from memory",
"events": [
{
Expand Down Expand Up @@ -432,6 +418,7 @@
"functionType": "Action",
"group": "Scene variables",
"name": "ModifySceneVariableString",
"private": true,
"sentence": "Change the text of scene variable _PARAM1_ to _PARAM2_",
"events": [
{
Expand Down Expand Up @@ -465,6 +452,7 @@
"functionType": "Action",
"group": "Global variables",
"name": "ModifyGlobalVariableString",
"private": true,
"sentence": "Change the text of global variable _PARAM1_ to _PARAM2_",
"events": [
{
Expand Down Expand Up @@ -580,6 +568,7 @@
"functionType": "Action",
"group": "Global variables",
"name": "ModifyGlobalVariable",
"private": true,
"sentence": "Change the global variable _PARAM1_ with value: _PARAM2_",
"events": [
{
Expand Down Expand Up @@ -654,6 +643,7 @@
"functionType": "Action",
"group": "Scene variables",
"name": "ModifySceneVariable",
"private": true,
"sentence": "Change the scene variable _PARAM1_ with value: _PARAM2_",
"events": [
{
Expand Down Expand Up @@ -722,6 +712,7 @@
"functionType": "Action",
"group": "Scene variables",
"name": "DeleteSceneVariable",
"private": true,
"sentence": "Delete the scene variable _PARAM1_ from memory",
"events": [
{
Expand Down Expand Up @@ -964,6 +955,7 @@
"functionType": "Action",
"group": "Variables",
"name": "DeleteObjectVariable",
"private": true,
"sentence": "Delete for the object _PARAM1_ the object variable _PARAM2_ from the memory",
"events": [
{
Expand Down Expand Up @@ -999,6 +991,7 @@
"functionType": "StringExpression",
"group": "Global variables",
"name": "GlobalVariableString",
"private": true,
"sentence": "",
"events": [
{
Expand Down Expand Up @@ -1034,6 +1027,7 @@
"functionType": "StringExpression",
"group": "Scene variables",
"name": "VariableString",
"private": true,
"sentence": "",
"events": [
{
Expand Down Expand Up @@ -1069,6 +1063,7 @@
"functionType": "Expression",
"group": "Global variables",
"name": "GlobalVariable",
"private": true,
"sentence": "",
"events": [
{
Expand Down Expand Up @@ -1104,6 +1099,7 @@
"functionType": "Expression",
"group": "Scene variables",
"name": "Variable",
"private": true,
"sentence": "",
"events": [
{
Expand Down Expand Up @@ -1137,8 +1133,9 @@
"description": "Copy the global variable to scene. This copy everything from the types to the values.",
"fullName": "Copy a global variable to scene",
"functionType": "Action",
"group": "Convert",
"group": "Copy variables",
"name": "CopyGlobalVariableToScene",
"private": true,
"sentence": "Copy the global variable:_PARAM1_ to a scene variable:_PARAM2_ (clear destination first: _PARAM3_)",
"events": [
{
Expand Down Expand Up @@ -1183,6 +1180,7 @@
"functionType": "Action",
"group": "Copy variables",
"name": "CopySceneVariableToGlobal",
"private": true,
"sentence": "Copy the scene variable:_PARAM1_ to a global variable:_PARAM2_ (clear destination first: _PARAM3_)",
"events": [
{
Expand Down Expand Up @@ -1219,6 +1217,53 @@
}
],
"objectGroups": []
},
{
"description": "Copy all the chidren of a variable into another variable.",
"fullName": "Copy a variable",
"functionType": "Action",
"name": "CopyVariable",
"sentence": "Copy _PARAM1_ to _PARAM2_ (clear destination first: _PARAM3_)",
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": [
"/** @type {gdjs.Variable} */",
"const sourceVariable = eventsFunctionContext.getArgument(\"SourceVariable\");",
"/** @type {gdjs.Variable} */",
"const destinationVariable = eventsFunctionContext.getArgument(\"DestinationVariable\");",
"const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");",
"",
"if (sourceVariable.isPrimitive() === destinationVariable.isPrimitive()) {",
" gdjs.Variable.copy(sourceVariable, destinationVariable, isExactCopy);",
"}",
""
],
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": true
}
],
"parameters": [
{
"description": "Variable to copy",
"name": "SourceVariable",
"type": "variable"
},
{
"description": "Destination variable",
"name": "DestinationVariable",
"type": "variable"
},
{
"defaultValue": "yes",
"description": "Clear the destination variable before copying",
"name": "isExactCopy",
"optional": true,
"type": "yesorno"
}
],
"objectGroups": []
}
],
"eventsBasedBehaviors": [],
Expand Down
Loading