diff --git a/src/assets/weapons/icons/ammo_machinegun.png b/src/assets/weapons/icons/ammo_machinegun.png new file mode 100644 index 00000000..3b0969e7 Binary files /dev/null and b/src/assets/weapons/icons/ammo_machinegun.png differ diff --git a/src/assets/weapons/icons/ammo_machinegunLauncher.png b/src/assets/weapons/icons/ammo_machinegunLauncher.png new file mode 100644 index 00000000..37cf0657 Binary files /dev/null and b/src/assets/weapons/icons/ammo_machinegunLauncher.png differ diff --git a/src/assets/weapons/icons/ammo_pistol.png b/src/assets/weapons/icons/ammo_pistol.png new file mode 100644 index 00000000..906e2cc6 Binary files /dev/null and b/src/assets/weapons/icons/ammo_pistol.png differ diff --git a/src/assets/weapons/icons/ammo_rocket.png b/src/assets/weapons/icons/ammo_rocket.png new file mode 100644 index 00000000..9344d1d4 Binary files /dev/null and b/src/assets/weapons/icons/ammo_rocket.png differ diff --git a/src/assets/weapons/icons/ammo_rocketModern.png b/src/assets/weapons/icons/ammo_rocketModern.png new file mode 100644 index 00000000..848db616 Binary files /dev/null and b/src/assets/weapons/icons/ammo_rocketModern.png differ diff --git a/src/assets/weapons/icons/ammo_shotgun.png b/src/assets/weapons/icons/ammo_shotgun.png new file mode 100644 index 00000000..62564532 Binary files /dev/null and b/src/assets/weapons/icons/ammo_shotgun.png differ diff --git a/src/assets/weapons/icons/ammo_sniper.png b/src/assets/weapons/icons/ammo_sniper.png new file mode 100644 index 00000000..03d3afa2 Binary files /dev/null and b/src/assets/weapons/icons/ammo_sniper.png differ diff --git a/src/assets/weapons/icons/ammo_uzi.png b/src/assets/weapons/icons/ammo_uzi.png new file mode 100644 index 00000000..752d784b Binary files /dev/null and b/src/assets/weapons/icons/ammo_uzi.png differ diff --git a/src/assets/weapons/icons/bar.png b/src/assets/weapons/icons/bar.png new file mode 100644 index 00000000..7298f83b Binary files /dev/null and b/src/assets/weapons/icons/bar.png differ diff --git a/src/assets/weapons/icons/flamethrower_long.png b/src/assets/weapons/icons/flamethrower_long.png new file mode 100644 index 00000000..833edf6d Binary files /dev/null and b/src/assets/weapons/icons/flamethrower_long.png differ diff --git a/src/assets/weapons/icons/flamethrower_short.png b/src/assets/weapons/icons/flamethrower_short.png new file mode 100644 index 00000000..1769115e Binary files /dev/null and b/src/assets/weapons/icons/flamethrower_short.png differ diff --git a/src/assets/weapons/icons/grenade.png b/src/assets/weapons/icons/grenade.png new file mode 100644 index 00000000..ae9b2bf4 Binary files /dev/null and b/src/assets/weapons/icons/grenade.png differ diff --git a/src/assets/weapons/icons/grenadeFlash.png b/src/assets/weapons/icons/grenadeFlash.png new file mode 100644 index 00000000..fcfcea9e Binary files /dev/null and b/src/assets/weapons/icons/grenadeFlash.png differ diff --git a/src/assets/weapons/icons/grenadeSmoke.png b/src/assets/weapons/icons/grenadeSmoke.png new file mode 100644 index 00000000..cb63dd36 Binary files /dev/null and b/src/assets/weapons/icons/grenadeSmoke.png differ diff --git a/src/assets/weapons/icons/grenadeVintage.png b/src/assets/weapons/icons/grenadeVintage.png new file mode 100644 index 00000000..dd129eac Binary files /dev/null and b/src/assets/weapons/icons/grenadeVintage.png differ diff --git a/src/assets/weapons/icons/knifeRound_sharp.png b/src/assets/weapons/icons/knifeRound_sharp.png new file mode 100644 index 00000000..ff01891c Binary files /dev/null and b/src/assets/weapons/icons/knifeRound_sharp.png differ diff --git a/src/assets/weapons/icons/knifeRound_smooth.png b/src/assets/weapons/icons/knifeRound_smooth.png new file mode 100644 index 00000000..fed60988 Binary files /dev/null and b/src/assets/weapons/icons/knifeRound_smooth.png differ diff --git a/src/assets/weapons/icons/knife_sharp.png b/src/assets/weapons/icons/knife_sharp.png new file mode 100644 index 00000000..13518f8b Binary files /dev/null and b/src/assets/weapons/icons/knife_sharp.png differ diff --git a/src/assets/weapons/icons/knife_smooth.png b/src/assets/weapons/icons/knife_smooth.png new file mode 100644 index 00000000..3cc2aa5b Binary files /dev/null and b/src/assets/weapons/icons/knife_smooth.png differ diff --git a/src/assets/weapons/icons/machinegun.png b/src/assets/weapons/icons/machinegun.png new file mode 100644 index 00000000..bde6e3d2 Binary files /dev/null and b/src/assets/weapons/icons/machinegun.png differ diff --git a/src/assets/weapons/icons/machinegunLauncher.png b/src/assets/weapons/icons/machinegunLauncher.png new file mode 100644 index 00000000..2303e278 Binary files /dev/null and b/src/assets/weapons/icons/machinegunLauncher.png differ diff --git a/src/assets/weapons/icons/pistol.png b/src/assets/weapons/icons/pistol.png new file mode 100644 index 00000000..06c740c6 Binary files /dev/null and b/src/assets/weapons/icons/pistol.png differ diff --git a/src/assets/weapons/icons/pistolSilencer.png b/src/assets/weapons/icons/pistolSilencer.png new file mode 100644 index 00000000..6f8ee5c7 Binary files /dev/null and b/src/assets/weapons/icons/pistolSilencer.png differ diff --git a/src/assets/weapons/icons/rocketlauncher.png b/src/assets/weapons/icons/rocketlauncher.png new file mode 100644 index 00000000..18a53954 Binary files /dev/null and b/src/assets/weapons/icons/rocketlauncher.png differ diff --git a/src/assets/weapons/icons/rocketlauncherModern.png b/src/assets/weapons/icons/rocketlauncherModern.png new file mode 100644 index 00000000..a6768856 Binary files /dev/null and b/src/assets/weapons/icons/rocketlauncherModern.png differ diff --git a/src/assets/weapons/icons/shotgun.png b/src/assets/weapons/icons/shotgun.png new file mode 100644 index 00000000..13031d16 Binary files /dev/null and b/src/assets/weapons/icons/shotgun.png differ diff --git a/src/assets/weapons/icons/shotgunShort.png b/src/assets/weapons/icons/shotgunShort.png new file mode 100644 index 00000000..ccf71d26 Binary files /dev/null and b/src/assets/weapons/icons/shotgunShort.png differ diff --git a/src/assets/weapons/icons/sniper.png b/src/assets/weapons/icons/sniper.png new file mode 100644 index 00000000..44596085 Binary files /dev/null and b/src/assets/weapons/icons/sniper.png differ diff --git a/src/assets/weapons/icons/uzi.png b/src/assets/weapons/icons/uzi.png new file mode 100644 index 00000000..8e648ed6 Binary files /dev/null and b/src/assets/weapons/icons/uzi.png differ diff --git a/src/assets/weapons/icons/uziLong.png b/src/assets/weapons/icons/uziLong.png new file mode 100644 index 00000000..75dd5716 Binary files /dev/null and b/src/assets/weapons/icons/uziLong.png differ diff --git a/src/assets/weapons/icons/uziLongSilencer.png b/src/assets/weapons/icons/uziLongSilencer.png new file mode 100644 index 00000000..4a9121f8 Binary files /dev/null and b/src/assets/weapons/icons/uziLongSilencer.png differ diff --git a/src/assets/weapons/icons/uziSilencer.png b/src/assets/weapons/icons/uziSilencer.png new file mode 100644 index 00000000..2ca6fa7a Binary files /dev/null and b/src/assets/weapons/icons/uziSilencer.png differ diff --git a/src/eventsFunctionsExtensions/extendedvariables.json b/src/eventsFunctionsExtensions/extendedvariables.json new file mode 100644 index 00000000..2595123c --- /dev/null +++ b/src/eventsFunctionsExtensions/extendedvariables.json @@ -0,0 +1,1225 @@ +{ + "author": "@Bouh, D8H", + "category": "General", + "extensionNamespace": "", + "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": "Add conditions, actions and expressions to check for the existence of a variable, copy variables, delete existing ones from memory, and create dynamic variables.", + "version": "1.0.3", + "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))`" + ], + "origin": { + "identifier": "ExtendedVariables", + "name": "gdevelop-extension-store" + }, + "tags": [ + "variable", + "scene", + "global", + "object", + "remove", + "expression", + "copy", + "structure", + "array", + "boolean", + "duplication" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if a global variable exists.", + "fullName": "Global variable exists", + "functionType": "Condition", + "group": "Deprecated", + "name": "C_global_variable_exist", + "private": true, + "sentence": "If the global variable _PARAM1_ exist", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ExtendedVariables::GlobalVariableExist" + }, + "parameters": [ + "", + "GetArgumentAsString(\"GlobalVariableName\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the global variable exists.", + "fullName": "Global variable exists", + "functionType": "Condition", + "group": "Global variables", + "name": "GlobalVariableExist", + "sentence": "If the global variable _PARAM1_ exist", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const globalVariables = runtimeScene.getGame().getVariables();\r", + "eventsFunctionContext.returnValue = globalVariables.has(eventsFunctionContext.getArgument(\"GlobalVariableName\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a scene variable exists.", + "fullName": "Scene variable exists", + "functionType": "Condition", + "group": "Deprecated", + "name": "C_scene_variable_exist", + "private": true, + "sentence": "If the scene variable _PARAM1_ exist", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ExtendedVariables::SceneVariableExist" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the scene variable exists.", + "fullName": "Scene variable exists", + "functionType": "Condition", + "group": "Scene variables", + "name": "SceneVariableExist", + "sentence": "If the scene variable _PARAM1_ exist", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sceneVariables = runtimeScene.getVariables();\r", + "eventsFunctionContext.returnValue = sceneVariables.has(eventsFunctionContext.getArgument(\"SceneVariableName\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object variable exists.", + "fullName": "Object variable exists", + "functionType": "Condition", + "group": "Deprecated", + "name": "C_object_variable_exist", + "private": true, + "sentence": "Object _PARAM1_ has object variable _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ExtendedVariables::ObjectVariableExist" + }, + "parameters": [ + "", + "ObjectToCheck", + "GetArgumentAsString(\"ObjectVariableName\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "ObjectToCheck", + "type": "objectList" + }, + { + "description": "Name of object variable", + "name": "ObjectVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object variable exists.", + "fullName": "Object variable exists", + "functionType": "Condition", + "group": "Variables", + "name": "ObjectVariableExist", + "sentence": "Object _PARAM1_ has object variable _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "let returnValue = true;\r", + "if (!objects.length) {\r", + " returnValue = false;\r", + "} else {\r", + " const objectVariableName = eventsFunctionContext.getArgument(\"ObjectVariableName\");\r", + " for (let i = 0; i < objects.length; i++) {\r", + " if (!objects[i].hasVariable(objectVariableName)) {\r", + " // If any object does NOT have the variable, return false.\r", + " returnValue = false;\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = returnValue;" + ], + "parameterObjects": "ObjectToCheck", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "ObjectToCheck", + "type": "objectList" + }, + { + "description": "Name of object variable", + "name": "ObjectVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete a global variable, removing it from memory.", + "fullName": "Delete global variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Delete_global_variable", + "private": true, + "sentence": "Delete global variable _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::DeleteGlobalVariable" + }, + "parameters": [ + "", + "GetArgumentAsString(\"GlobalVariableName\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the global variable to delete", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete the global variable, removing it from memory.", + "fullName": "Delete global variable", + "functionType": "Action", + "group": "Global variables", + "name": "DeleteGlobalVariable", + "sentence": "Delete the global variable _PARAM1_ from memory", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "runtimeScene.getGame().getVariables().remove(eventsFunctionContext.getArgument(\"GlobalVariableName\"));", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the global variable to delete", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the text of a scene variable.", + "fullName": "String of a scene variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Modify_scene_variable_string", + "private": true, + "sentence": "Change the text of scene variable _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::ModifySceneVariableString" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "GetArgumentAsNumber(\"SceneVariableValue\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the text of a scene variable.", + "fullName": "String of a scene variable", + "functionType": "Action", + "group": "Scene variables", + "name": "ModifySceneVariableString", + "sentence": "Change the text of scene variable _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const variable = runtimeScene.getVariables().get(eventsFunctionContext.getArgument(\"SceneVariableName\"));\r", + "variable.setString(eventsFunctionContext.getArgument(\"SceneVariableValue\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the text of a global variable.", + "fullName": "String of a global variable", + "functionType": "Action", + "group": "Global variables", + "name": "ModifyGlobalVariableString", + "sentence": "Change the text of global variable _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const variable = runtimeScene.getGame().getVariables().get(eventsFunctionContext.getArgument(\"GlobalVariableName\"));\r", + "variable.setString(eventsFunctionContext.getArgument(\"GlobalVariableValue\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "GlobalVariableValue", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the value of a global variable.", + "fullName": "Value of a global variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Modify_global_variable", + "private": true, + "sentence": "Change the global variable _PARAM1_ with value: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::ModifyGlobalVariable" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "GetArgumentAsNumber(\"SceneVariableValue\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the text of a global variable.", + "fullName": "String of a global variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Modify_global_variable_string", + "private": true, + "sentence": "Change the text of global variable _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::ModifyGlobalVariableString" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "GetArgumentAsNumber(\"SceneVariableValue\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the value of a global variable.", + "fullName": "Value of a global variable", + "functionType": "Action", + "group": "Global variables", + "name": "ModifyGlobalVariable", + "sentence": "Change the global variable _PARAM1_ with value: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const variable = runtimeScene.getGame().getVariables().get(eventsFunctionContext.getArgument(\"GlobalVariableName\"));\r", + "variable.setNumber(eventsFunctionContext.getArgument(\"GlobalVariableValue\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "GlobalVariableValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the value of a scene variable.", + "fullName": "Value of a scene variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Modify_scene_variable", + "private": true, + "sentence": "Change the scene variable _PARAM1_ with value: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::ModifySceneVariable" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "GetArgumentAsNumber(\"SceneVariableValue\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Modify the value of a scene variable.", + "fullName": "Value of a scene variable", + "functionType": "Action", + "group": "Scene variables", + "name": "ModifySceneVariable", + "sentence": "Change the scene variable _PARAM1_ with value: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const variable = runtimeScene.getVariables().get(eventsFunctionContext.getArgument(\"SceneVariableName\"));\r", + "variable.setNumber(eventsFunctionContext.getArgument(\"SceneVariableValue\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + }, + { + "description": "Value", + "name": "SceneVariableValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Delete scene variable, the variable will be deleted from the memory.", + "fullName": "Delete scene variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_Delete_scene_variable", + "private": true, + "sentence": "Delete the scene variable _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::DeleteSceneVariable" + }, + "parameters": [ + "", + "GetArgumentAsString(\"SceneVariableName\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name of the scene variable to delete", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete the scene variable, the variable will be deleted from the memory.", + "fullName": "Delete scene variable", + "functionType": "Action", + "group": "Scene variables", + "name": "DeleteSceneVariable", + "sentence": "Delete the scene variable _PARAM1_ from memory", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "runtimeScene.getVariables().remove(eventsFunctionContext.getArgument(\"SceneVariableName\"));", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the scene variable to delete", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Copy an object variable from one object to another.", + "fullName": "Copy an object variable", + "functionType": "Action", + "group": "Deprecated", + "name": "A_CopyObjectVariable", + "private": true, + "sentence": "Copy the variable _PARAM1_ of _PARAM2_ to the variable _PARAM3_ of _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::CopyObjectVariable" + }, + "parameters": [ + "", + "SourceObject", + "GetArgumentAsString(\"SourceVariableName\")", + "TargetObject", + "GetArgumentAsString(\"TargetVariableName\")", + "no", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Source object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Variable to copy", + "name": "SourceVariableName", + "type": "string" + }, + { + "description": "Destination object", + "longDescription": "To copy the variable between 2 instances of the same object, the variable has to be copied to another object first.", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Destination variable", + "name": "TargetVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Copy the object variable from one object to another.", + "fullName": "Copy an object variable", + "functionType": "Action", + "group": "Variables", + "name": "CopyObjectVariable", + "sentence": "Copy the variable _PARAM2_ of _PARAM1_ to the variable _PARAM4_ of _PARAM3_ (clear destination first: _PARAM5_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sourceObject = eventsFunctionContext.getObjects(\"SourceObject\")[0];", + "const targetObject = eventsFunctionContext.getObjects(\"TargetObject\")[0];", + "const sourceVariableName = eventsFunctionContext.getArgument(\"SourceVariableName\");", + "const targetVariableName = eventsFunctionContext.getArgument(\"TargetVariableName\");", + "const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");", + "", + "const sourceVariables = sourceObject.getVariables();", + "const targetVariables = targetObject.getVariables();", + "", + "if (sourceVariables.has(sourceVariableName))", + "{", + " gdjs.Variable.copy", + " (", + " sourceVariables.get(sourceVariableName),", + " targetVariables.get(targetVariableName),", + " isExactCopy", + " );", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Source object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Variable to copy", + "name": "SourceVariableName", + "type": "string" + }, + { + "description": "Destination object", + "longDescription": "To copy the variable between 2 instances of the same object, the variable has to be copied to another object first.", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Destination variable", + "name": "TargetVariableName", + "type": "string" + }, + { + "defaultValue": "yes", + "description": "Clear the destination variable before copying", + "name": "isExactCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Copy all object variables from one object to another.", + "fullName": "Copy all object variables", + "functionType": "Action", + "group": "Deprecated", + "name": "A_CopyAllObjectVariables", + "private": true, + "sentence": "Copy all variables from _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ExtendedVariables::CopyAllObjectVariables" + }, + "parameters": [ + "", + "SourceObject", + "TargetObject", + "no", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Source object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Destination object", + "name": "TargetObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Copy all object variables from one object to another.", + "fullName": "Copy all object variables", + "functionType": "Action", + "group": "Variables", + "name": "CopyAllObjectVariables", + "sentence": "Copy all variables from object _PARAM1_ to object _PARAM2_ (clear destination first: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// This JS event use private scope from the API, this can be borken at anytime.", + "", + "const sourceObject = eventsFunctionContext.getObjects(\"SourceObject\")[0];", + "const targetObject = eventsFunctionContext.getObjects(\"TargetObject\")[0];", + "const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");", + "", + "const targetVariables = targetObject.getVariables();", + "const sourceVariables = sourceObject.getVariables()._variables.items;", + "for (const variableName in sourceVariables)", + "{", + " if (sourceVariables.hasOwnProperty(variableName))", + " {", + " gdjs.Variable.copy(sourceVariables[variableName], targetVariables.get(variableName), isExactCopy);", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Source object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Destination object", + "name": "TargetObject", + "type": "objectList" + }, + { + "defaultValue": "yes", + "description": "Clear the destination variable before copying", + "name": "isExactCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Delete an object variable, removing it from memory.", + "fullName": "Delete object variable", + "functionType": "Action", + "group": "Variables", + "name": "DeleteObjectVariable", + "sentence": "Delete for the object _PARAM1_ the object variable _PARAM2_ from the memory", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const objectVariables = object.getVariables();\r", + "\r", + "objectVariables.remove(eventsFunctionContext.getArgument(\"VariableName\"));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Name of object variable", + "name": "VariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text of a global variable.", + "fullName": "Text of a global variable", + "functionType": "StringExpression", + "group": "Global variables", + "name": "GlobalVariableString", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const globalVariables = runtimeScene.getGame().getVariables();\r", + "const variableExist = globalVariables.has(eventsFunctionContext.getArgument(\"GlobalVariableName\"));\r", + "\r", + "if (variableExist) {\r", + " eventsFunctionContext.returnValue = globalVariables.get(eventsFunctionContext.getArgument(\"GlobalVariableName\")).getAsString();\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text of a scene variable.", + "fullName": "Text of a scene variable", + "functionType": "StringExpression", + "group": "Scene variables", + "name": "VariableString", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sceneVariables = runtimeScene.getVariables();\r", + "const variableExist = sceneVariables.has(eventsFunctionContext.getArgument(\"SceneVariableName\"));\r", + "\r", + "if (variableExist) {\r", + " eventsFunctionContext.returnValue = sceneVariables.get(eventsFunctionContext.getArgument(\"SceneVariableName\")).getAsString();\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the value of a global variable.", + "fullName": "Value of a global variable", + "functionType": "Expression", + "group": "Global variables", + "name": "GlobalVariable", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const globalVariables = runtimeScene.getGame().getVariables();\r", + "const variableExist = globalVariables.has(eventsFunctionContext.getArgument(\"GlobalVariableName\"));\r", + "\r", + "if (variableExist) {\r", + " eventsFunctionContext.returnValue = globalVariables.get(eventsFunctionContext.getArgument(\"GlobalVariableName\")).getAsNumber();\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Name of the global variable", + "name": "GlobalVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the value of a scene variable.", + "fullName": "Value of a scene variable", + "functionType": "Expression", + "group": "Scene variables", + "name": "Variable", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sceneVariables = runtimeScene.getVariables();\r", + "const variableExist = sceneVariables.has(eventsFunctionContext.getArgument(\"SceneVariableName\"));\r", + "\r", + "if (variableExist) {\r", + " eventsFunctionContext.returnValue = sceneVariables.get(eventsFunctionContext.getArgument(\"SceneVariableName\")).getAsNumber();\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Name of the scene variable", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "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", + "name": "CopyGlobalVariableToScene", + "sentence": "Copy the global variable:_PARAM1_ to a scene variable:_PARAM2_ (clear destination first: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const globalVariable = runtimeScene.getGame().getVariables().get(eventsFunctionContext.getArgument(\"globalVariableName\"));", + "const sceneVariable = runtimeScene.getVariables().get(eventsFunctionContext.getArgument(\"sceneVariableName\"));", + "const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");", + "", + "gdjs.Variable.copy(globalVariable, sceneVariable, isExactCopy);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Global variable to copy", + "name": "globalVariableName", + "type": "string" + }, + { + "description": "Scene variable destination", + "name": "sceneVariableName", + "type": "string" + }, + { + "defaultValue": "yes", + "description": "Clear the destination variable before copying", + "name": "isExactCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Copy the scene variable to global. This copy everything from the types to the values.", + "fullName": "Copy a scene variable to global ", + "functionType": "Action", + "group": "Copy variables", + "name": "CopySceneVariableToGlobal", + "sentence": "Copy the scene variable:_PARAM1_ to a global variable:_PARAM2_ (clear destination first: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sceneVariable = runtimeScene.getVariables().get(eventsFunctionContext.getArgument(\"sceneVariableName\"));", + "const globalVariable = runtimeScene.getGame().getVariables().get(eventsFunctionContext.getArgument(\"globalVariableName\"));", + "const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");", + "", + "gdjs.Variable.copy(sceneVariable, globalVariable, isExactCopy);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Scene variable to copy", + "name": "sceneVariableName", + "type": "string" + }, + { + "description": "Global variable destination", + "name": "globalVariableName", + "type": "string" + }, + { + "defaultValue": "yes", + "description": "Clear the destination variable before copying", + "name": "isExactCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file diff --git a/src/eventsFunctionsExtensions/gamepads.json b/src/eventsFunctionsExtensions/gamepads.json new file mode 100644 index 00000000..3fb5268b --- /dev/null +++ b/src/eventsFunctionsExtensions/gamepads.json @@ -0,0 +1,3551 @@ +{ + "author": "Bouh", + "category": "Input", + "extensionNamespace": "", + "fullName": "Gamepads (controllers)", + "helpPath": "/all-features/gamepad", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", + "name": "Gamepads", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", + "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", + "version": "0.6.1", + "description": [ + "Add support for gamepads (or other controllers).", + "", + "It gives access to:", + "- button presses", + "- axis positions and force", + "- trigger pressure", + "- configurable deadzone", + "- vibration", + "- automatic mappers for platformer characters and top-down movement", + "", + "The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))." + ], + "origin": { + "identifier": "Gamepads", + "name": "gdevelop-extension-store" + }, + "tags": [ + "controllers", + "gamepads", + "joysticks", + "axis", + "xbox", + "ps4", + "platformer", + "platform", + "top-down" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "taRwmWxwAFYFL9yyBwB3cwBw0BO2", + "mnImQKdn8nQxwzkS5D6a1JB27V23" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Get the value of the pressure on a gamepad trigger.", + "fullName": "Pressure on a gamepad trigger", + "functionType": "Expression", + "name": "TriggerPressure", + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", + " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "switch (trigger) {\r", + " case 'LT':\r", + " case 'L2':\r", + " eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r", + " break;\r", + "\r", + " case 'RT':\r", + " case 'R2':\r", + " eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Trigger button", + "name": "trigger", + "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the force of gamepad stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the gamepad _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", + " return;\r", + "}\r", + "\r", + "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.", + "fullName": "Value of a stick rotation (deprecated)", + "functionType": "Expression", + "name": "StickRotationValue", + "private": true, + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Gamepads::StickAngle(GetArgumentAsNumber(\"player_ID\"), GetArgumentAsString(\"stick\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", + " return;\r", + "}\r", + "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Get the value of axis of a gamepad stick.", + "fullName": "Value of a gamepad axis (deprecated)", + "functionType": "Expression", + "name": "AxisValue", + "private": true, + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r", + " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let parameterError = false;\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " }\r", + " break;\r", + "\r", + " case \"HORIZONTAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " break;\r", + "\r", + " case \"VERTICAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " }\r", + " break;\r", + "\r", + " case \"HORIZONTAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " break;\r", + "\r", + " case \"VERTICAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"left\" && stick != \"right\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "const axisIndex = stick === 'right' ? 2 : 0;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Gamepad", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "Stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"left\" && stick != \"right\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "const axisIndex = stick === 'right' ? 3 : 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Gamepad", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "Stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button released", + "functionType": "Condition", + "name": "C_Button_released", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (button === \"\") {\r", + " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "\r", + "switch (button) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " buttonId = 0;\r", + " break;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " buttonId = 1;\r", + " break;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " buttonId = 2;\r", + " break;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " buttonId = 3;\r", + " break;\r", + " case 'LB':\r", + " case 'L1':\r", + " buttonId = 4;\r", + " break;\r", + " case 'RB':\r", + " case 'R1':\r", + " buttonId = 5;\r", + " break;\r", + " case 'LT':\r", + " case 'L2':\r", + " buttonId = 6;\r", + " break;\r", + " case 'RT':\r", + " case 'R2':\r", + " buttonId = 7;\r", + " break;\r", + "\r", + " case 'UP':\r", + " buttonId = 12;\r", + " break;\r", + " case 'DOWN':\r", + " buttonId = 13;\r", + " break;\r", + " case 'LEFT':\r", + " buttonId = 14;\r", + " break;\r", + " case 'RIGHT':\r", + " buttonId = 15;\r", + " break;\r", + "\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " buttonId = 8;\r", + " break;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " buttonId = 9;\r", + " break;\r", + "\r", + " case 'CLICK_STICK_LEFT':\r", + " buttonId = 10;\r", + " break;\r", + " case 'CLICK_STICK_RIGHT':\r", + " buttonId = 11;\r", + " break;\r", + "\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " buttonId = 16;\r", + " break;\r", + " case 'CLICK_TOUCHPAD':\r", + " buttonId = 17;\r", + " break;\r", + "\r", + " default:\r", + " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", + " break;\r", + "}\r", + "\r", + "if (buttonId === undefined) {\r", + " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//Define default value on pressed button or use previous value\r", + "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", + "\r", + "//Get state of button at previous frame\r", + "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", + "\r", + "//When previousStateButton is true and actual button state is not pressed\r", + "//Player have release the button\r", + "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", + " // Save the last button used for the player \r", + " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", + " eventsFunctionContext.returnValue = true;\r", + "\r", + "} else {\r", + " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", + " eventsFunctionContext.returnValue = false;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the index of the last pressed button of a gamepad.", + "fullName": "Last pressed button (id)", + "functionType": "Expression", + "name": "LastButtonID", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "//Player id is not valid\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "\r", + "//Return the last button used by the player\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if any button is pressed on a gamepad.", + "fullName": "Any gamepad button pressed", + "functionType": "Condition", + "name": "C_Any_Button_pressed", + "sentence": "Any button of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", + " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", + " buttonId = i; //Save the button pressed\r", + " break;\r", + " }\r", + "}\r", + "\r", + "if (buttonId === undefined) {\r", + " // No buttons are pressed.\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//When a button is pressed, save the button in lastButtonUsed for each players\r", + "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Last pressed button (string)", + "functionType": "StringExpression", + "name": "LastButtonString", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (controllerType === \"\") {\r", + " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "if (gamepad !== null) { //Gamepad exist\r", + " //Get last btn id\r", + " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", + "\r", + " //Return last button as string \r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "\r", + "} else { //Gamepad dosen't exist\r", + " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", + " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Controller type", + "name": "controller_type", + "supplementaryInformation": "[\"Xbox\",\"PS4\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of gamepads.", + "fullName": "Gamepad count", + "functionType": "Expression", + "name": "GamepadCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get the last activated controller\r", + "const controllerId = gdjs._extensionController.lastActiveController;\r", + "\r", + "// Check if controller is active\r", + "const gamepad = gamepads[controllerId];\r", + "if (gamepad == null) {\r", + " eventsFunctionContext.returnValue = 0;\r", + "} else {\r", + " // Return active controller id\r", + " eventsFunctionContext.returnValue = controllerId + 1;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button pressed", + "functionType": "Condition", + "name": "C_Button_pressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (button === \"\") {\r", + " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "\r", + "switch (button) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " buttonId = 0;\r", + " break;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " buttonId = 1;\r", + " break;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " buttonId = 2;\r", + " break;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " buttonId = 3;\r", + " break;\r", + " case 'LB':\r", + " case 'L1':\r", + " buttonId = 4;\r", + " break;\r", + " case 'RB':\r", + " case 'R1':\r", + " buttonId = 5;\r", + " break;\r", + " case 'LT':\r", + " case 'L2':\r", + " buttonId = 6;\r", + " break;\r", + " case 'RT':\r", + " case 'R2':\r", + " buttonId = 7;\r", + " break;\r", + "\r", + " case 'UP':\r", + " buttonId = 12;\r", + " break;\r", + " case 'DOWN':\r", + " buttonId = 13;\r", + " break;\r", + " case 'LEFT':\r", + " buttonId = 14;\r", + " break;\r", + " case 'RIGHT':\r", + " buttonId = 15;\r", + " break;\r", + "\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " buttonId = 8;\r", + " break;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " buttonId = 9;\r", + " break;\r", + "\r", + " case 'CLICK_STICK_LEFT':\r", + " buttonId = 10;\r", + " break;\r", + " case 'CLICK_STICK_RIGHT':\r", + " buttonId = 11;\r", + " break;\r", + "\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " buttonId = 16;\r", + " break;\r", + " case 'CLICK_TOUCHPAD':\r", + " buttonId = 17;\r", + " break;\r", + "\r", + " default:\r", + " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + "}\r", + "\r", + "\r", + "\r", + "if (buttonId === undefined) {\r", + " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//When a button is pressed, save the button in lastButtonUsed for each players\r", + "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\r", + "\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.", + "fullName": "Gamepad deadzone for sticks", + "functionType": "Expression", + "name": "Deadzone", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "///Return the deadzone value for a given player\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.", + "fullName": "Set gamepad deadzone for sticks", + "functionType": "Action", + "name": "A_Set_deadzone", + "sentence": "Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "\r", + "// clamp the newDeadzone in range [0, 1].\r", + "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", + "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Deadzone for sticks, 0.2 by default (0 to 1)", + "name": "deadzone", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a stick of a gamepad is pushed in a given direction.", + "fullName": "Gamepad stick pushed (axis)", + "functionType": "Condition", + "name": "C_Axis_pushed", + "sentence": "_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", + " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", + " return;\r", + "}\r", + "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", + " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) {\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "\r", + "//Define in onFirstSceneLoaded function\r", + "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'ANY':\r", + " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", + " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", + " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", + " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'ANY':\r", + " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", + " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", + " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", + " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = false;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of connected gamepads.", + "fullName": "Connected gamepads number", + "functionType": "Expression", + "name": "ConnectedGamepadsCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "// Gamepads can be disconnected and become null, so we have to filter them.\r", + "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a string containing informations about the specified gamepad.", + "fullName": "Gamepad type", + "functionType": "StringExpression", + "name": "GamepadType", + "sentence": "Player _PARAM1_ use _PARAM2_ controller", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.", + "fullName": "Gamepad type", + "functionType": "Condition", + "name": "C_Controller_type", + "sentence": "Gamepad _PARAM1_ is a _PARAM2_ controller", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (controllerType === \"\") {", + " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "", + "if (controllerType == \"XBOX\") {", + " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", + "} else {", + " eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)", + "name": "controller_type", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a gamepad is connected.", + "fullName": "Gamepad connected", + "functionType": "Condition", + "name": "C_Controller_X_is_connected", + "sentence": "Gamepad _PARAM1_ is plugged and connected", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "", + "// If gamepad was disconnected it will be null (so this will return false)", + "// If gamepad was never connected it will be undefined (so this will return false)", + "eventsFunctionContext.returnValue = !!gamepads[playerId];" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.", + "fullName": "Gamepad vibration", + "functionType": "Action", + "name": "A_Vibrate_controller", + "sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: duration * 1000,", + " weakMagnitude: 1.0,", + " strongMagnitude: 1.0", + " });", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Time of the vibration, in seconds (optional, default value is 1)", + "name": "Duration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate an advanced vibration on the specified controller. Incompatible with Firefox.", + "fullName": "Advanced gamepad vibration", + "functionType": "Action", + "name": "A_Advanced_Vibration_Controller", + "sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", + "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", + "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", + " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", + " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: duration * 1000,", + " weakMagnitude: weakRumbleMagnitude,", + " strongMagnitude: strongRumbleMagnitude", + " });", + "}", + "", + "gdjs._extensionController.players[playerId].rumble.duration = duration;", + "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", + "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", + "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Time of the vibration, in seconds (optional, default value is 1)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Strong rumble magnitude (from 0 to 1)", + "name": "StrongMagnitude", + "type": "expression" + }, + { + "description": "Weak rumble magnitude (from 0 to 1)", + "name": "WeakMagnitude", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change a vibration on the specified controller. Incompatible with Firefox.", + "fullName": "Change gamepad active vibration", + "functionType": "Action", + "name": "A_Change_Vibration_Magnitude", + "sentence": "Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", + "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", + "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", + "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", + "", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", + " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", + " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (originalDuration - elapsedTime <= 0) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: 1000 * (originalDuration - elapsedTime),", + " weakMagnitude: weakRumbleMagnitude,", + " strongMagnitude: strongRumbleMagnitude", + " });", + "}", + "", + "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", + "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Strong rumble magnitude (from 0 to 1)", + "name": "StrongMagnitude", + "type": "expression" + }, + { + "description": "Weak rumble magnitude (from 0 to 1)", + "name": "WeakMagnitude", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Define an new private object javascript for the gamepad extension\r", + "gdjs._extensionController = {\r", + " players: {\r", + " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " },\r", + " lastActiveController: -1, // Last active controller\r", + " controllerButtonNames: { //Map associating controller button ids to button names\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", + " },\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", + " }\r", + " }\r", + "};\r", + "\r", + "gdjs._extensionController.getInputString = function (type, buttonId) {\r", + " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", + " if (controllerButtonNames[type] !== undefined) {\r", + " return controllerButtonNames[type][buttonId];\r", + " }\r", + "\r", + " return \"UNKNOWN_BUTTON\";\r", + "}\r", + "\r", + "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + " const rad = Math.atan2(deltaY, deltaX);\r", + " const deg = rad * (180 / Math.PI);\r", + " return deg;\r", + "}\r", + "\r", + "gdjs._extensionController.isXbox = function (gamepad) {\r", + " return (gamepad ? (\r", + " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", + " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", + " // name reported in Firefox corresponding to the driver being used by the controller\r", + " // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r", + " ) : false);\r", + "}\r", + "\r", + "//Returns the new value taking into account the dead zone for the player_ID given\r", + "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", + "\r", + " // Anything smaller than this is assumed to be 0,0\r", + " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", + "\r", + " if (Math.abs(v) < DEADZONE) {\r", + " // In the dead zone, set to 0\r", + " v = 0;\r", + "\r", + " if (v == null) {\r", + " return 0;\r", + " } else {\r", + " return v;\r", + " }\r", + "\r", + " } else {\r", + " // We're outside the dead zone, but we'd like to smooth\r", + " // this value out so it still runs nicely between 0..1.\r", + " // That is, we don't want it to jump suddenly from 0 to\r", + " // DEADZONE.\r", + "\r", + " // Remap v from\r", + " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // or from\r", + " // -1..-DEADZONE to -(1-DEADZONE)..0\r", + "\r", + " v = v - Math.sign(v) * DEADZONE;\r", + "\r", + " // Remap v from\r", + " // 0..(1-DEADZONE) to 0..1\r", + " // or from\r", + " // -(1-DEADZONE)..0 to -1..0\r", + "\r", + " return v / (1 - DEADZONE);\r", + " }\r", + "};" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Each time a player press a button i save the last button pressed for the next frame", + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "let countPlayers = Object.keys(gdjs._extensionController.players).length;", + "", + "//Repeat for each players", + "for (let i = 0; i < countPlayers; i++) {", + " let gamepad = gamepads[i]; // Get the gamepad of the player", + "", + " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", + " if (gamepad == null) {", + " continue;", + " }", + "", + " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", + " if (gamepad.buttons[b].pressed) { //One of them is pressed", + " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", + "", + " //Save the state of the button for the next frame.", + " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", + "", + " // Update Last Active Controller", + " gdjs._extensionController.lastActiveController = i;", + " } else {", + " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", + " }", + " }", + "", + "", + " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", + " if (", + " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", + " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", + " ) {", + " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", + " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", + " }", + "", + "", + "}", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if any button is released on a gamepad.", + "fullName": "Any gamepad button released", + "functionType": "Condition", + "name": "C_any_button_released", + "sentence": "Any button of gamepad _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", + "\treturn;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", + "\r", + "\tif (buttonId === undefined) {\r", + "\t\teventsFunctionContext.returnValue = false;\r", + "\t\treturn;\r", + "\t}\r", + "\r", + "\t//Get previous value or define value by default for the current button\r", + "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", + "\r", + "\t//Get state of the button at previous frame\r", + "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", + "\r", + "\t//Get the state of the button on the current frame.\r", + "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", + "\t//Player have release the button\r", + "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", + "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", + "\t\teventsFunctionContext.returnValue = true;\r", + "\t\t//break;\r", + "\t\treturn;\r", + "\t} else {\r", + "\t\t//The player didn't released the button yet, the previous frame state is still true\r", + "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", + "\t\teventsFunctionContext.returnValue = false;\r", + "\t}\r", + "\r", + "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the strength of the weak vibration motor on the gamepad of a player.", + "fullName": "Weak rumble magnitude", + "functionType": "Expression", + "name": "WeakVibrationMagnitude", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the strength of the strong vibration motor on the gamepad of a player.", + "fullName": "Strong rumble magnitude", + "functionType": "Expression", + "name": "StrongVibrationMagnitude", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Control a platformer character with a gamepad.", + "fullName": "Platformer gamepad mapper", + "name": "PlatformerGamepadMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Up\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Down\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"A or Cross\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"A\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"B or Circle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"B\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"X or Square\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"X\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Y or Triangle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Y\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"LB or L1\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"LB\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RB or R1\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"RB\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"LT or L2\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"LT\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RT or R2\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"RT\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::PlatformerGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "name": "PlatformerCharacter" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "description": "", + "group": "", + "extraInformation": [], + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseRightStick" + }, + { + "value": "A or Cross", + "type": "Choice", + "label": "Jump button", + "description": "", + "group": "Controls", + "extraInformation": [ + "A or Cross", + "B or Circle", + "X or Square", + "Y or Triangle", + "LB or L1", + "RB or R1", + "LT or L2", + "RT or R2" + ], + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a gamepad.", + "fullName": "Top-down gamepad mapper", + "name": "TopDownGamepadMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Up\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Down\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\"))", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::TopDownGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Top-down movement behavior", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "name": "TopDownMovement" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "description": "", + "group": "", + "extraInformation": [], + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseRightStick" + }, + { + "value": "Analog", + "type": "Choice", + "label": "Stick mode", + "description": "", + "group": "Controls", + "extraInformation": [ + "Analog", + "360°", + "8 Directions" + ], + "name": "StickMode" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] +} \ No newline at end of file diff --git a/src/eventsFunctionsExtensions/references.json b/src/eventsFunctionsExtensions/references.json new file mode 100644 index 00000000..e4feb313 --- /dev/null +++ b/src/eventsFunctionsExtensions/references.json @@ -0,0 +1,152 @@ +{ + "author": "Arthur Pacaud (arthuro555)", + "category": "", + "extensionNamespace": "", + "fullName": "Variables/References", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZhcmlhYmxlLWJveCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSAzSDVDMy45IDMgMyAzLjkgMyA1VjE5QzMgMjAuMSAzLjkgMjEgNSAyMUgxOUMyMC4xIDIxIDIxIDIwLjEgMjEgMTlWNUMyMSAzLjkgMjAuMSAzIDE5IDNNNy40IDE4QzUuOSAxNi41IDUgMTQuMyA1IDEyUzUuOSA3LjUgNy40IDZMOSA2LjdDNy43IDcuOSA3IDkuOSA3IDEyUzcuNyAxNi4xIDkgMTcuM0w3LjQgMThNMTIuNyAxNUwxMS45IDEzTDEwLjUgMTVIOUwxMS4zIDExLjlMMTAgOUgxMS4zTDEyLjEgMTFMMTMuNSA5SDE1TDEyLjggMTJMMTQuMSAxNUgxMi43TTE2LjYgMThMMTUgMTcuM0MxNi4zIDE2IDE3IDE0LjEgMTcgMTJTMTYuMyA3LjkgMTUgNi43TDE2LjYgNkMxOC4xIDcuNSAxOSA5LjcgMTkgMTJTMTguMSAxNi41IDE2LjYgMThaIiAvPjwvc3ZnPg==", + "name": "References", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/variable-box.svg", + "shortDescription": "Adds references and pointers for variables.", + "version": "1.0.0", + "description": "Adds actions to use references (variable that redirect any read/write to another variable) and pointers (unique numbers identifying a variable that can be resolved to a reference). Some usages are for callback variables in events based functions (getting a variable with a fixed name referring to a variable with a name passed as parameter), pointers to make advanced data structures like linked lists, and getting a top level variable dynamically.", + "origin": { + "identifier": "References", + "name": "gdevelop-extension-store" + }, + "tags": [ + "advanced", + "variables", + "reference", + "pointer", + "ref", + "memory", + "callback" + ], + "authorIds": [ + "ZgrsWuRTAkXgeuPV9bo0zuEcA2w1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Transforms a scene variable into a reference to another scene variable.", + "fullName": "Create reference to scene variable", + "functionType": "Action", + "name": "CreateReference", + "sentence": "Make variable _PARAM1_ a reference to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const reference = eventsFunctionContext.getArgument(\"reference\");", + "const source = eventsFunctionContext.getArgument(\"source\");", + "", + "// Override each method ", + "for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))", + " reference[func] = gdjs.Variable.prototype[func].bind(source);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "The scene variable to turn into a reference", + "name": "reference", + "type": "scenevar" + }, + { + "description": "The scene variable the reference will refer to", + "name": "source", + "type": "scenevar" + } + ], + "objectGroups": [] + }, + { + "description": "Transforms a scene variable into a reference to a global variable.", + "fullName": "Create reference to global variable", + "functionType": "Action", + "name": "CreateGlobalReference", + "sentence": "Make variable _PARAM1_ a reference to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const reference = eventsFunctionContext.getArgument(\"reference\");", + "const source = eventsFunctionContext.getArgument(\"source\");", + "", + "// Override each method ", + "for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))", + " reference[func] = gdjs.Variable.prototype[func].bind(source);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "The scene variable to turn into a reference", + "name": "reference", + "type": "scenevar" + }, + { + "description": "The global variable the reference will refer to", + "name": "source", + "type": "globalvar" + } + ], + "objectGroups": [] + }, + { + "description": "Transforms a scene variable into a reference to an object's variable.", + "fullName": "Create reference to object variable", + "functionType": "Action", + "name": "CreateObjectReference", + "sentence": "Make variable _PARAM2_ a reference to variable _PARAM3_ of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const reference = eventsFunctionContext.getArgument(\"reference\");", + "const source = eventsFunctionContext.getArgument(\"source\");", + "", + "console.log(reference, source)", + "", + "// Override each method ", + "for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))", + " reference[func] = gdjs.Variable.prototype[func].bind(source);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "The object that possesses the variable to refer to", + "name": "Object", + "type": "objectList" + }, + { + "description": "The scene variable to turn into a reference", + "name": "reference", + "type": "scenevar" + }, + { + "description": "The object variable the reference will refer to", + "name": "source", + "type": "objectvar" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file diff --git a/src/externalEvents/game.json b/src/externalEvents/game.json index 8f33fd7e..bcd0a186 100644 --- a/src/externalEvents/game.json +++ b/src/externalEvents/game.json @@ -13,6 +13,13 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "WeaponWheel" + }, { "type": "BuiltinCommonInstructions::Link", "include": { diff --git a/src/externalEvents/player.json b/src/externalEvents/player.json index 7b828e28..b3bcc699 100644 --- a/src/externalEvents/player.json +++ b/src/externalEvents/player.json @@ -1,5 +1,5 @@ { - "associatedLayout": "City", + "associatedLayout": "Game_World_old", "lastChangeTimeStamp": 0, "name": "Player", "events": [ @@ -99,7 +99,7 @@ "value": "AnimatableCapability::AnimatableBehavior::SetIndex" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "GlobalVariable(Player.Customisation.body)" @@ -110,7 +110,7 @@ "value": "AnimatableCapability::AnimatableBehavior::SetIndex" }, "parameters": [ - "Leg", + "player_leg", "Animation", "=", "GlobalVariable(Player.Customisation.leg)" @@ -121,7 +121,7 @@ "value": "AnimatableCapability::AnimatableBehavior::SetIndex" }, "parameters": [ - "Hand", + "player_hand", "Animation", "=", "GlobalVariable(Player.Customisation.hand)" @@ -143,7 +143,6 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "folded": true, "name": "Animation", "source": "", "type": "BuiltinCommonInstructions::Group", @@ -171,11 +170,11 @@ "value": "MettreXY" }, "parameters": [ - "Hand", + "player_hand", "=", - "Body.PointX(\"point\" + Hand.type)", + "player_body.PointX(\"point\" + player_hand.type)", "=", - "Body.PointY(\"point\" + Hand.type)" + "player_body.PointY(\"point\" + player_hand.type)" ] }, { @@ -183,11 +182,11 @@ "value": "MettreXY" }, "parameters": [ - "Leg", + "player_leg", "=", - "Body.PointX(\"point\" + Leg.type)", + "player_body.PointX(\"point\" + player_leg.type)", "=", - "Body.PointY(\"point\" + Leg.type)" + "player_body.PointY(\"point\" + player_leg.type)" ] } ] @@ -215,9 +214,9 @@ "value": "SetAngle" }, "parameters": [ - "Hand", + "player_hand", "=", - "Hand.angle + Body.Angle()" + "player_hand.angle + player_body.Angle()" ] }, { @@ -225,14 +224,15 @@ "value": "SetAngle" }, "parameters": [ - "Leg", + "player_leg", "=", - "Leg.angle + Body.Angle()" + "player_leg.angle + player_body.Angle()" ] } ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -241,7 +241,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "Body.Animation", + "player_body.Animation", "\"info\"", "" ] @@ -269,7 +269,7 @@ "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "Body", + "player_body", "TopDownMovement" ] } @@ -284,11 +284,22 @@ "value": "VarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "!=", "\"phoneHold\"" ] + }, + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "player_body", + "Animation", + "!=", + "\"weaponHold\"" + ] } ], "actions": [], @@ -305,6 +316,30 @@ "", "LShift" ] + }, + { + "type": { + "inverted": true, + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"A\"", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Cross\"", + "" + ] } ], "actions": [ @@ -313,7 +348,7 @@ "value": "ModVarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"walk\"" @@ -326,11 +361,41 @@ "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "", - "LShift" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "LShift" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"A\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Cross\"", + "" + ] + } ] } ], @@ -340,7 +405,7 @@ "value": "ModVarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"run\"" @@ -362,7 +427,7 @@ "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "Body", + "player_body", "TopDownMovement" ] }, @@ -379,7 +444,7 @@ "value": "ModVarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"idle\"" @@ -395,10 +460,20 @@ "value": "ObjectVariableAsBoolean" }, "parameters": [ - "Body", + "player_body", "Phone.active", "True" ] + }, + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "player_body", + "Weapon.active", + "False" + ] } ], "actions": [ @@ -407,7 +482,7 @@ "value": "ModVarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"phoneHold\"" @@ -423,11 +498,21 @@ "value": "ObjectVariableAsBoolean" }, "parameters": [ - "Body", + "player_body", "Phone.active", "False" ] }, + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "player_body", + "Weapon.active", + "False" + ] + }, { "type": { "value": "BuiltinCommonInstructions::Once" @@ -441,7 +526,7 @@ "value": "ModVarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"idle\"" @@ -449,6 +534,44 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "player_body", + "Weapon.active", + "True" + ] + }, + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "player_body", + "Phone.active", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "player_body", + "Animation", + "=", + "\"weaponHold\"" + ] + } + ] + }, { "folded": true, "type": "BuiltinCommonInstructions::Comment", @@ -481,7 +604,7 @@ "value": "ResetObjectTimer" }, "parameters": [ - "Body", + "player_body", "\"switchWalkAngle\"" ] } @@ -501,7 +624,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"run\"" @@ -512,7 +635,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"walk\"" @@ -545,10 +668,10 @@ "value": "CompareObjectTimer" }, "parameters": [ - "Body", + "player_body", "\"switchWalkAngle\"", ">=", - "Body.TopDownMovement::Speed() / 1000" + "player_body.TopDownMovement::Speed() / 1000" ] }, { @@ -564,12 +687,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Hand", + "player_hand", "Tween", "\"hand\"", "0", "\"easeInQuad\"", - "Body.Movement.TopDownMovement[Body.Animation].shuffleTweenDuration", + "player_body.Movement.TopDownMovement[player_body.Animation].shuffleTweenDuration", "" ] }, @@ -578,12 +701,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", "\"leg\"", "0", "\"easeInQuad\"", - "Body.Movement.TopDownMovement[Body.Animation].shuffleTweenDuration", + "player_body.Movement.TopDownMovement[player_body.Animation].shuffleTweenDuration", "" ] }, @@ -592,7 +715,7 @@ "value": "Wait" }, "parameters": [ - "Body.Movement.TopDownMovement[Body.Animation].shuffleTweenDelay" + "player_body.Movement.TopDownMovement[player_body.Animation].shuffleTweenDelay" ] }, { @@ -600,7 +723,7 @@ "value": "ModVarObjet" }, "parameters": [ - "Hand", + "player_hand", "angle", "+", "180" @@ -611,7 +734,7 @@ "value": "ModVarObjet" }, "parameters": [ - "Leg", + "player_leg", "angle", "+", "180" @@ -622,12 +745,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Hand", + "player_hand", "Tween", "\"hand\"", "35", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement[Body.Animation].shuffleTweenDuration", + "player_body.Movement.TopDownMovement[player_body.Animation].shuffleTweenDuration", "" ] }, @@ -636,12 +759,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", "\"leg\"", "20", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement[Body.Animation].shuffleTweenDuration", + "player_body.Movement.TopDownMovement[player_body.Animation].shuffleTweenDuration", "" ] }, @@ -650,7 +773,7 @@ "value": "ResetObjectTimer" }, "parameters": [ - "Body", + "player_body", "\"switchWalkAngle\"" ] } @@ -680,7 +803,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"idle\"" @@ -693,12 +816,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", - "\"leg\" + Body.Animation", + "\"leg\" + player_body.Animation", "0", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] }, @@ -707,12 +830,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Hand", + "player_hand", "Tween", - "\"hand\" + Body.Animation", + "\"hand\" + player_body.Animation", "0", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] } @@ -745,7 +868,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Body", + "player_body", "Animation", "=", "\"phoneHold\"" @@ -758,10 +881,10 @@ "value": "TopDownMovementBehavior::MaxSpeed" }, "parameters": [ - "Body", + "player_body", "TopDownMovement", "=", - "Body.Movement.TopDownMovement.walk.maxSpeed - 200" + "player_body.Movement.TopDownMovement.walk.maxSpeed - 200" ] } ], @@ -774,7 +897,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Hand", + "player_hand", "type", "=", "\"R\"" @@ -787,12 +910,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Hand", + "player_hand", "Tween", - "\"hand\" + Body.Animation", + "\"hand\" + player_body.Animation", "35", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] }, @@ -801,9 +924,9 @@ "value": "SetAngle" }, "parameters": [ - "Hand", + "player_hand", "=", - "Body.Angle()" + "player_body.Angle()" ] } ] @@ -816,7 +939,7 @@ "value": "VarObjetTxt" }, "parameters": [ - "Hand", + "player_hand", "type", "=", "\"L\"" @@ -829,12 +952,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Hand", + "player_hand", "Tween", - "\"hand\" + Body.Animation", + "\"hand\" + player_body.Animation", "0", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] } @@ -860,7 +983,7 @@ "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "Body", + "player_body", "TopDownMovement" ] } @@ -876,10 +999,10 @@ "value": "CompareObjectTimer" }, "parameters": [ - "Body", + "player_body", "\"switchWalkAngle\"", ">=", - "Body.TopDownMovement::Speed() / Body.Movement.TopDownMovement.walk.shuffleSwitchTime" + "player_body.TopDownMovement::Speed() / player_body.Movement.TopDownMovement.walk.shuffleSwitchTime" ] }, { @@ -895,12 +1018,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", "\"leg\"", "0", "\"easeInQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] }, @@ -909,7 +1032,7 @@ "value": "Wait" }, "parameters": [ - "Body.Movement.TopDownMovement.walk.shuffleTweenDelay" + "player_body.Movement.TopDownMovement.walk.shuffleTweenDelay" ] }, { @@ -917,7 +1040,7 @@ "value": "ModVarObjet" }, "parameters": [ - "Leg", + "player_leg", "angle", "+", "180" @@ -928,12 +1051,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", "\"leg\"", "20", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] }, @@ -942,7 +1065,7 @@ "value": "ResetObjectTimer" }, "parameters": [ - "Body", + "player_body", "\"switchWalkAngle\"" ] } @@ -976,7 +1099,7 @@ "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "Body", + "player_body", "TopDownMovement" ] } @@ -987,12 +1110,12 @@ "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Leg", + "player_leg", "Tween", - "\"leg\" + Body.Animation", + "\"leg\" + player_body.Animation", "0", "\"easeOutQuad\"", - "Body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] } @@ -1001,173 +1124,81 @@ ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "folded": true, - "name": "ZOrder", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "hand should appear below body and legs below hand" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hand", - "=", - "Body.ZOrder() - 1" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Leg", - "=", - "Hand.ZOrder() - 1" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Camera", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "center camera on player" - }, - { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "VarObjetTxt" }, "parameters": [ - "Body", - "Camera.active", - "True" + "player_body", + "Animation", + "=", + "\"weaponHold\"" ] } ], "actions": [ { "type": { - "value": "CentreCamera" + "value": "TopDownMovementBehavior::MaxSpeed" }, "parameters": [ - "", - "Body", - "", - "\"\"", - "" + "player_body", + "TopDownMovement", + "=", + "player_body.Movement.TopDownMovement.walk.maxSpeed" ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "set the variable \"Game.Camera.Zoom\" to 1, the camera uses this to set it's zoom level" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "GlobalVariableAsBoolean" + "value": "SetGlobalVariableAsBoolean" }, "parameters": [ - "Game.intro", - "" + "debug.cameraControlType", + "True" ] } ], - "actions": [], "events": [ { - "disabled": true, - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "DepartScene" + "value": "VarObjetTxt" }, "parameters": [ - "" + "player_hand", + "type", + "=", + "\"R\"" ] } ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "Game.Camera.Zoom", + "player_hand", + "Tween", + "\"hand\" + player_body.Animation", + "35", + "\"easeOutQuad\"", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "player_hand", "=", - "1" + "player_body.Angle()" ] } ] @@ -1177,31 +1208,45 @@ "conditions": [ { "type": { - "inverted": true, - "value": "TopDownMovementBehavior::IsMoving" + "value": "VarObjetTxt" }, "parameters": [ - "Body", - "TopDownMovement" - ] - } + "player_hand", + "type", + "=", + "\"L\"" + ] + } ], "actions": [ { "type": { - "value": "Tween::TweenSceneVariableNumber3" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "", - "\"zoomOut\"", - "Game.Camera.Zoom", - "1", - "\"linear\"", - "1" + "player_hand", + "Tween", + "\"hand\" + player_body.Animation", + "0", + "\"easeOutQuad\"", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Player is moving while holding his phone, shuffle legs to simulate walk" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -1210,29 +1255,102 @@ "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "Body", + "player_body", "TopDownMovement" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Tween::TweenSceneVariableNumber3" - }, - "parameters": [ - "", - "\"zoomOut\"", - "Game.Camera.Zoom", - "0.9", - "\"linear\"", - "1" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "player_body", + "\"switchWalkAngle\"", + ">=", + "player_body.TopDownMovement::Speed() / player_body.Movement.TopDownMovement.walk.shuffleSwitchTime" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectWidthTween2" + }, + "parameters": [ + "player_leg", + "Tween", + "\"leg\"", + "0", + "\"easeInQuad\"", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "player_body.Movement.TopDownMovement.walk.shuffleTweenDelay" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "player_leg", + "angle", + "+", + "180" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectWidthTween2" + }, + "parameters": [ + "player_leg", + "Tween", + "\"leg\"", + "20", + "\"easeOutQuad\"", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "player_body", + "\"switchWalkAngle\"" + ] + } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ] }, { - "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -1242,31 +1360,34 @@ "textG": 0, "textR": 0 }, - "comment": "Revert to the \"Game.Camera.Zoom\" variable if GodMode is not active" + "comment": "Player is not moving while holding his phone hide the legs" }, { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "inverted": true, + "value": "TopDownMovementBehavior::IsMoving" }, "parameters": [ - "GodMode.active", - "False" + "player_body", + "TopDownMovement" ] } ], "actions": [ { "type": { - "value": "ZoomCamera" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ - "", - "Game.Camera.Zoom", - "", + "player_leg", + "Tween", + "\"leg\" + player_body.Animation", + "0", + "\"easeOutQuad\"", + "player_body.Movement.TopDownMovement.walk.shuffleTweenDuration", "" ] } @@ -1275,15 +1396,66 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, - { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "name": "ZOrder", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "hand should appear below body and legs below hand" + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "player_hand", + "=", + "player_body.ZOrder() - 1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "player_leg", + "=", + "player_hand.ZOrder() - 1" + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] @@ -1293,112 +1465,89 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "folded": true, - "name": "Separate", + "name": "Weapon", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move \"body\" away from all these objects" - }, - { - "folded": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SeparateFromObjects" - }, - "parameters": [ - "Body", - "Static", - "" - ] - }, + "conditions": [ { "type": { - "value": "SeparateFromObjects" + "value": "VarObjetTxt" }, "parameters": [ - "trash_movable", - "Body", - "" + "player_body", + "Weapon.equipped", + "=", + "\"0\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "SeparateFromObjects" + "value": "SetObjectVariableAsBoolean" }, "parameters": [ - "trash_movable", - "Static", + "player_body", + "Weapon.active", "" ] } ] }, { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "In rooms" - }, - { - "folded": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "SeparateFromObjects" + "value": "VarObjetTxt" }, "parameters": [ - "Body", - "kitchen", - "" + "player_body", + "Weapon.equipped", + "!=", + "\"0\"" ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": true, - "folded": true, - "name": "Swimming", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "player_body", + "Weapon.active", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionNP" + }, + "parameters": [ + "player_body", + "Weapon_Pick", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } @@ -1406,20 +1555,60 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "ModVarObjetTxt" }, "parameters": [ - "swimming", + "player_body", + "Weapon.equipped", "=", - "0" + "SubStr(Weapon_Pick.ObjectName(), 0, StrLength(Weapon_Pick.ObjectName()) - 5)" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Weapon_Pick", + "" ] } ], "events": [ { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "player_hand" + ] + }, + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "player_hand", + "type", + "=", + "\"R\"" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Weapon_Hold", + "<", + "1" + ] + }, { "type": { "value": "BuiltinCommonInstructions::Once" @@ -1430,54 +1619,45 @@ "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "CreateByName" }, "parameters": [ - "Weapon_holding", - "=", - "GlobalVariable(Old_weapon_holding)" + "", + "Weapon_Hold", + "player_body.Weapon.equipped + \"_hold\"", + "player_hand.PointX(\"finger\")", + "player_hand.PointY(\"finger\")", + "" ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "SetAngle" }, "parameters": [ - "swimming", + "Weapon_Hold", "=", - "1" + "player_hand.Angle() + Weapon_Hold.properties.angle" ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "Sticker::Sticker::Stick" }, "parameters": [ - "swimming", - "=", - "2" + "uziLong_hold", + "Sticker", + "player_hand", + "" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "Player.Weapons.Active[player_body.Weapon.equipped].active", + "True" ] } ] @@ -1485,177 +1665,253 @@ ] }, { - "folded": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "swimming", - "=", - "1" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ChangeAnimation" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Player", - "=", - "10" + "Weapon_Hold", + "Resizable", + "Weapon_Hold.properties.width", + "Weapon_Hold.properties.height" ] } ] }, { + "disabled": true, "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarScene" + "value": "VarObjetTxt" }, "parameters": [ - "swimming", + "player_body", + "Weapon.equipped", "=", - "2" + "\"uziLong\"" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "9" - ] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ] }, { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ammo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "VarScene" + "inverted": true, + "value": "Distance" }, "parameters": [ - "swimming", - "=", - "1" + "player_body", + "player_crosshair", + "100", + "" ] }, { "type": { - "value": "VarScene" + "value": "ObjectVariableAsBoolean" }, "parameters": [ - "swimming", - "=", - "2" + "player_body", + "Weapon.active", + "True" ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Old_weapon_holding", - "=", - "GlobalVariable(Weapon_holding)" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "swimming", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ + }, { "type": { - "value": "Animation" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Player", - "!=", - "10" - ] + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "1", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"R2\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "1", + "" + ] + }, + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::FireTowardPosition" + }, + "parameters": [ + "player_body", + "FireBullet", + "Weapon_Hold.PointX(\"spawn\")", + "Weapon_Hold.PointY(\"spawn\")", + "uzi_ammo", + "player_crosshair.CenterX()", + "player_crosshair.CenterY()", + "1500", + "" + ] }, { "type": { - "value": "Animation" + "value": "AddForceAL" }, "parameters": [ - "Player", - "!=", - "9" + "player_body", + "player_body.Angle() + 180", + "Weapon_Hold.properties.pushBackStrength", + "" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::SetAngleVarianceOp" + }, + "parameters": [ + "player_body", + "FireBullet", + "=", + "Weapon_Hold.properties.variance", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "uzi_ammo", + "=", + "Weapon_Hold.ZOrder() -2" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "player_hand", + "ShakeObject_PositionAngle", + "0.1", + "-1", + "-2", + "0", + "0.08", + "", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "player_body", + "ShakeObject_PositionAngle", + "0.1", + "-1", + "-2", + "0", + "0.08", + "", + "" ] } ] }, { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake::ShakeCamera" + }, + "parameters": [ + "", + "0.05", + "0", + "0", + "" + ] + } ] } ], - "actions": [] + "parameters": [] } ], "parameters": [] @@ -1665,7 +1921,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Controls", + "name": "Camera", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -1680,9 +1936,10 @@ "textG": 0, "textR": 0 }, - "comment": "Handle movement with \"wasd\" and only move when the object variable \"Movement.canMove\" of player is possible" + "comment": "center camera on player" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -1690,289 +1947,213 @@ "value": "ObjectVariableAsBoolean" }, "parameters": [ - "Body", - "Movement.canMove", + "player_body", + "Camera.active", "True" ] } ], + "actions": [ + { + "type": { + "value": "CentreCamera" + }, + "parameters": [ + "", + "player_body", + "", + "\"\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "set the variable \"Game.Camera.Zoom\" to 1, the camera uses this to set it's zoom level" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GlobalVariableAsBoolean" + }, + "parameters": [ + "Game.intro", + "" + ] + } + ], "actions": [], "events": [ { + "disabled": true, + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GlobalVariableAsBoolean" + "value": "DepartScene" }, "parameters": [ - "debug.cameraControlType", - "True" + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "a" - ] - } - ], - "actions": [ - { - "type": { - "value": "AddForceAL" - }, - "parameters": [ - "Body", - "Body.Angle() - 90", - "200", - "" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Game.Camera.Zoom", + "=", + "1" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "d" - ] - } - ], - "actions": [ - { - "type": { - "value": "AddForceAL" - }, - "parameters": [ - "Body", - "Body.Angle() + 90", - "200", - "" - ] - } + "type": { + "inverted": true, + "value": "TopDownMovementBehavior::IsMoving" + }, + "parameters": [ + "player_body", + "TopDownMovement" ] - }, + } + ], + "actions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "w" - ] - } - ], - "actions": [ - { - "type": { - "value": "AddForceAL" - }, - "parameters": [ - "Body", - "Body.Angle()", - "200", - "" - ] - } + "type": { + "value": "Tween::TweenSceneVariableNumber3" + }, + "parameters": [ + "", + "\"zoomOut\"", + "Game.Camera.Zoom", + "1", + "\"linear\"", + "1" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "s" - ] - } - ], - "actions": [ - { - "type": { - "value": "AddForceAL" - }, - "parameters": [ - "Body", - "Body.Angle() + 180", - "200", - "" - ] - } + "type": { + "value": "TopDownMovementBehavior::IsMoving" + }, + "parameters": [ + "player_body", + "TopDownMovement" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "RotateTowardPosition" - }, - "parameters": [ - "Body", - "CursorX()", - "CursorY()", - "0", - "" - ] - } + "type": { + "value": "Tween::TweenSceneVariableNumber3" + }, + "parameters": [ + "", + "\"zoomOut\"", + "Game.Camera.Zoom", + "0.9", + "\"linear\"", + "1" ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] } ] }, { + "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Revert to the \"Game.Camera.Zoom\" variable if GodMode is not active" + }, + { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GlobalVariableAsBoolean" + "value": "SceneVariableAsBoolean" }, "parameters": [ - "debug.cameraControlType", + "GodMode.active", "False" ] } ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "a" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateLeftKey" - }, - "parameters": [ - "Body", - "TopDownMovement" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "d" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateRightKey" - }, - "parameters": [ - "Body", - "TopDownMovement" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "w" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateUpKey" - }, - "parameters": [ - "Body", - "TopDownMovement" - ] - } - ] - }, + "actions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "s" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateDownKey" - }, - "parameters": [ - "Body", - "TopDownMovement" - ] - } + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "Game.Camera.Zoom", + "", + "" ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "folded": true, + "name": "Separate", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "folded": true, "type": "BuiltinCommonInstructions::Comment", @@ -1984,137 +2165,74 @@ "textG": 0, "textR": 0 }, - "comment": "Reveert to values set in the body ovject variable \"Body.Movement.TopDownMovement.*****\"" + "comment": "Move \"body\" away from all these objects" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "SeparateFromObjects" }, "parameters": [ - "GodMode.active", - "False" + "player_body", + "Game_Static", + "" ] - } - ], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjetTxt" - }, - "parameters": [ - "Body", - "Animation", - "=", - "\"walk\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::MaxSpeed" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.walk.maxSpeed" - ] - }, - { - "type": { - "value": "TopDownMovementBehavior::Deceleration" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.walk.Deceleration" - ] - }, - { - "type": { - "value": "TopDownMovementBehavior::Acceleration" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.walk.Acceleration" - ] - } + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "props_moveable", + "player_body", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjetTxt" - }, - "parameters": [ - "Body", - "Animation", - "=", - "\"run\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::MaxSpeed" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.run.maxSpeed" - ] - }, - { - "type": { - "value": "TopDownMovementBehavior::Deceleration" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.run.Deceleration" - ] - }, - { - "type": { - "value": "TopDownMovementBehavior::Acceleration" - }, - "parameters": [ - "Body", - "TopDownMovement", - "=", - "Body.Movement.TopDownMovement.run.Acceleration" - ] - } + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "props_moveable", + "Game_Static", + "" ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] } ] }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "In rooms" + }, { "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [] + "actions": [ + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "player_body", + "kitchen", + "" + ] + } + ] } ], "parameters": [] @@ -2126,7 +2244,7 @@ "creationTime": 0, "disabled": true, "folded": true, - "name": "Weapon system", + "name": "Swimming", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2136,254 +2254,178 @@ "conditions": [ { "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "AjoutObjConcern" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "", - "reloading" - ] + "parameters": [] } ], "actions": [ { "type": { - "value": "Cache" + "value": "ModVarScene" }, "parameters": [ - "flame_thrower_fire_collision" + "swimming", + "=", + "0" ] - }, + } + ], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "flame_thrower_fire" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Weapon_holding", + "=", + "GlobalVariable(Old_weapon_holding)" + ] + } ] - }, + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "swimming", + "=", + "1" + ] + } ] }, { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "flame_thrower_fire_collision", - "\"gun3_ammo\"" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "swimming", + "=", + "2" + ] + } ] - }, + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "VarScene" }, "parameters": [ - "gun4_shoot", + "swimming", "=", - "\"False\"" + "1" ] - }, + } + ], + "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "ChangeAnimation" }, "parameters": [ - "gun5_shoot", + "Player", "=", - "\"False\"" + "10" ] - }, + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "VarScene" }, "parameters": [ - "mele2_use", + "swimming", "=", - "\"False\"" + "2" ] } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "MettreXY" + "value": "ChangeAnimation" }, "parameters": [ - "flame_thrower_fire_collision", - "=", - "Player.PointX(\"f_t_collision\")", + "Player", "=", - "Player.PointY(\"f_t_collision\")" + "9" ] } ] }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If `Rotate_mouse` do ...." - }, { "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "value": "BuiltinCommonInstructions::Or" }, - "comment": "Top down veiw movment rotate = False" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "VarScene" }, - "parameters": [] - } - ], - "actions": [] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Top down veiw movment rotate = False" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ + "swimming", + "=", + "1" + ] + }, { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "VarScene" }, - "parameters": [] + "parameters": [ + "swimming", + "=", + "2" + ] } - ], - "actions": [] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pick up the gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" ] }, { @@ -2396,11 +2438,12 @@ "actions": [ { "type": { - "value": "Delete" + "value": "ModVarGlobal" }, "parameters": [ - "gun1", - "" + "Old_weapon_holding", + "=", + "GlobalVariable(Weapon_holding)" ] }, { @@ -2410,7 +2453,7 @@ "parameters": [ "Weapon_holding", "=", - "1" + "0" ] } ] @@ -2419,5920 +2462,720 @@ "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, { "type": { "value": "VarScene" }, "parameters": [ - "using_phone", + "swimming", "=", "0" ] }, { "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" + "value": "BuiltinCommonInstructions::And" }, - "parameters": [ - "gun2", - "" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Animation" + }, + "parameters": [ + "Player", + "!=", + "10" + ] + }, + { + "type": { + "value": "Animation" + }, + "parameters": [ + "Player", + "!=", + "9" + ] + } ] }, { "type": { - "value": "ModVarGlobal" + "value": "VarScene" }, "parameters": [ - "Weapon_holding", + "using_phone", "=", - "2" + "0" ] } - ] - }, + ], + "actions": [] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle movement with \"wasd\" and only move when the object variable \"Movement.canMove\" of player is possible" + }, + { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" + "value": "ObjectVariableAsBoolean" }, "parameters": [ - "", - "e" + "player_body", + "Movement.canMove", + "True" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Delete" - }, - "parameters": [ - "gun3", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "3" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "gun4", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "4" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "gun5", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "5" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "mele1", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "6" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "mele1", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "6" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "mele2", - "" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "7" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If holding an gun(0 is not holding) do ...." - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "weapon_icons", - "=", - "0" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "weaponholding" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "0" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "0" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "AmmoText" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "0" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Slash1", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "tazer_hitbox", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: gun1\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "2" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "4" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shoot gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun1_ammo", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "assets\\gun_shot_1.wav", - "", - "", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun1_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect", - "=", - "70000" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "gun1", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "gun1", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "2" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: gun2\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun2_shoot\"" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "3" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shoot gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun2_ammo", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "0.1", - "\"gun2_shoot\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun2_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun2_shoot\"" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "2" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect", - "=", - "70000" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "gun2", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "gun2", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: gun3\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "4" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "3" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shoot gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun3_ammo", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "flame_thrower_fire", - "" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ParticleSystem::RecreateParticleSystem" - }, - "parameters": [ - "flame_thrower_fire" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "flame_thrower_fire_collision", - "\"gun3_ammo\"" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "2", - "\"gun3_ammo\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun3_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "flame_thrower_fire_collision", - "\"gun3_ammo\"" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If fire in collision with burnable object, set it on fire" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CreateByName" - }, - "parameters": [ - "", - "flame_thrower_fire_secondary", - "\"flame_thrower_fire_secondary\"", - "flame_thrower_fire_collision.PointX(\"CenterBurning\")", - "flame_thrower_fire_collision.PointY(\"CenterBurning\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "flame_thrower_fire_secondary", - "=", - "222" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun3_ammo", - "=", - "0" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "flame_thrower_fire" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "gun3", - "Player.PointX(\"f_t_collision\")", - "Player.PointY(\"f_t_collision\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "gun3", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "flame_thrower_fire" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Put actual fire over hitbox" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "flame_thrower_fire", - "=", - "flame_thrower_fire_collision.X()", - "=", - "flame_thrower_fire_collision.Y()" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "4" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "weapon_icons", - "=", - "2" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: gun4\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "5" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "1" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shoot gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun4_ammo", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun4_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun4_shoot", - "=", - "\"True\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun4_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "4" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun4_shoot\"" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect_sniper", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect_sniper", - "=", - "70000" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun4_shoot", - "=", - "\"False\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun4_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "4" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun4_shoot\"" - ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "gun4_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect_sniper", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect_sniper", - "=", - "70000" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "gun4", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "gun4", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "reloading" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun4_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun4_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "reloading", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun4_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun4_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun4_ammo", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "5" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "weapon_icons", - "=", - "3" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: gun5\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "6" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "2" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shoot gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"True\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "5" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect_rocket", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect_rocket", - "=", - "70000" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"False\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "5" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "shooting_effect_rocket", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "shooting_effect_rocket", - "=", - "70000" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"True\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "gun5", - "Player.PointX(\"shoot\")", - "Player.PointY(\"shoot\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "gun5", - "=", - "0" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "gun5", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "reloading" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "reloading", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "11" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "5", - "\"gun5_shoot\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "gun5_shoot", - "=", - "\"True\"" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "6" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "11" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "reloading" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "6" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "weapon_icons", - "=", - "1" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: mele1\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "7" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "AmmoText", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "use mele " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "mele1_energy", - "!=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "tazer_hitbox", - "=", - "Player.PointX(\"hitbox\")", - "=", - "Player.PointY(\"hitbox\")" - ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "mele1_use", - "=", - "\"True\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "tazer_hitbox", - "Player.PointX(\"hitbox\")", - "Player.PointY(\"hitbox\")", - "\"\"" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"mele1_energy\"" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "2", - "\"mele1_energy\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "mele1_energy", - "-", - "1" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"mele1_energy\"" - ] - } - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "mele1_energy", - "=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "tazer_hitbox", - "tazer_hitbox" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "mele1", - "Player.PointX(\"hitbox\")", - "Player.PointY(\"hitbox\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "mele1", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "7" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "weaponholding", - "" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "weaponholding", - "=", - "\"weapon: mele2\"" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "Slash1" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Slash1", - "=", - "Player.PointX(\"slash\")", - "=", - "Player.PointY(\"slash\")" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change animation and `Rotate_mouse` " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Rotate_mouse", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Player", - "=", - "12" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "crosshair", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "use mele " - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "mele2_use", - "=", - "\"False\"" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Slash1", - "Player.PointX(\"slash\")", - "Player.PointY(\"slash\")", - "\"\"" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"mele2_use\"" - ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "mele2_use", - "=", - "\"True\"" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "2", - "\"mele2_use\"" - ] - }, - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "mele2_use", - "=", - "\"True\"" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Slash1", - "=", - "Player.PointX(\"slash\")", - "=", - "Player.PointY(\"slash\")" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Slash1", - "Player.PointX(\"slash\")", - "Player.PointY(\"slash\")", - "\"\"" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"mele2_use\"" - ] - } - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "0.50", - "\"mele2_use\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Slash1", - "tazer_hitbox" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Drop gun" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "mele2", - "Player.PointX(\"Center\")", - "Player.PointY(\"Center\")", - "\"\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "mele2", - "=", - "70000" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Slash1", - "tazer_hitbox" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "if bullets collide with \"bullet obstacles\"" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet_destroy_pistol", - "bullet.PointX(\"effects_bullet\")", - "bullet.PointY(\"effects_bullet\")", - "\"\"" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "bullet_destroy_pistol", - "=", - "(bullet.Angle())-180" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet_destroy_pistol", - "=", - "2000" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "2" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet_destroy_machine", - "bullet.PointX(\"effects_bullet\")", - "bullet.PointY(\"effects_bullet\")", - "\"\"" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "bullet_destroy_machine", - "=", - "(bullet.Angle())-180" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet_destroy_machine", - "=", - "2000" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "4" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet_destroy_sniper", - "bullet.PointX(\"effects_bullet\")", - "bullet.PointY(\"effects_bullet\")", - "\"\"" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "bullet_destroy_sniper", - "=", - "(bullet.Angle())-180" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet_destroy_sniper", - "=", - "2000" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "bullet_destroy_rocket", - "bullet.PointX(\"effects_bullet\")", - "bullet.PointY(\"effects_bullet\")", - "\"\"" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "bullet_destroy_rocket", - "=", - "(bullet.Angle())-180" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet_destroy_rocket", - "=", - "2000" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - }, - { - "type": { - "value": "CameraShake::CameraShake" - }, - "parameters": [ - "", - "5", - "5", - "\"\"", - "0", - "0.25", - "2", - "3", - "0", - "no", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Distance" - }, - "parameters": [ - "bullet", - "Fences", - "15", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Arreter" - }, - "parameters": [ - "bullet" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Arret" - }, - "parameters": [ - "bullet" - ] - }, - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "bullet", - "Fences", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "bullet", - "=", - "-200" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Ammo" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "e" - ] - }, - { - "type": { - "value": "Animation" - }, - "parameters": [ - "ammo", - "=", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "ammo", - "" - ] - } - ], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun1_ammo", - "+", - "10" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "2" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun2_ammo", - "+", - "10" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun3_ammo", - "+", - "10" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "4" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun4_ammo", - "+", - "10" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "5" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Gun5_ammo", - "+", - "10000" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "6" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "mele1_energy", - "+", - "10" - ] - } - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Ammo: \" + GlobalVariableString(Gun1_ammo)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "2" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Ammo: \" + GlobalVariableString(Gun2_ammo)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Gas: \" + GlobalVariableString(Gun3_ammo)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "4" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Ammo: \" + GlobalVariableString(Gun4_ammo)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "5" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Ammo: \" + GlobalVariableString(Gun5_ammo)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "6" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "AmmoText", - "=", - "\"Energy: \" + GlobalVariableString(mele1_energy)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "bullet" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::ForEach", - "object": "bullet", - "conditions": [], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "bullet", - "\"delete1\"" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "4" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "bullet", - "=", - "1" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "5" - ] - } - ], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "bullet", - "=", - "2" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "1" - ] - }, - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "bullet", - "\"delete1\"", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "2" - ] - }, - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "bullet", - "\"delete1\"", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "4" - ] - }, - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "bullet", - "\"delete1\"", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "bullet", - "bullet", - "=", - "5" - ] - }, - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "bullet", - "\"delete1\"", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "bullet", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": true, - "folded": true, - "name": "Weapon system wheel", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Wheel_info", - "=", - "\"Wheel using: \" + GlobalVariableString(Wheel_stuff.wheel)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "IsMouseWheelScrollingUp" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "!=", - "5" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "+", - "1" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "IsMouseWheelScrollingDown" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "!=", - "1" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "-", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "1" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "2" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "1" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "v" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "b" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "GlobalVariable(Wheel_stuff.wheel1)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "h" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel1", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "2" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "GlobalVariableAsBoolean" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "debug.cameraControlType", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "1" + "", + "a" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel1", - "=", - "GlobalVariable(Weapon_holding)" + "", + "1", + "\"Left\"", + "\"Left\"", + "" ] } ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "AddForceAL" + }, + "parameters": [ + "player_body", + "player_body.Angle() - 90", + "200", + "" + ] + } + ] + }, + { + "disabled": true, + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "3" + "", + "d" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel3", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "2" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "v" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "b" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "GlobalVariable(Wheel_stuff.wheel2)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "GlobalVariable(Weapon_holding)" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "q" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "h" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel2", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "3" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "player_body", + "player_body.Angle() + 90", + "200", + "" + ] + } + ] + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "disabled": true, + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "2" + "", + "w" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel2", - "=", - "GlobalVariable(Weapon_holding)" + "", + "1", + "\"Left\"", + "\"Up\"", + "" ] } ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "AddForceAL" + }, + "parameters": [ + "player_body", + "player_body.Angle()", + "200", + "" + ] + } + ] + }, + { + "disabled": true, + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "4" + "", + "s" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel4", - "=", - "GlobalVariable(Weapon_holding)" + "", + "1", + "\"Left\"", + "\"Down\"", + "" ] } ] } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "3" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "v" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "b" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "GlobalVariable(Wheel_stuff.wheel3)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "h" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel3", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "4" - ] - } - ], - "actions": [], - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "player_body", + "player_body.Angle() + 180", + "200", + "" + ] + } + ] + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "RotateTowardPosition" + }, + "parameters": [ + "player_body", + "player_crosshair.CenterX()", + "player_crosshair.CenterY()", + "0", + "" + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "3" + "", + "a" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel3", - "=", - "GlobalVariable(Weapon_holding)" + "", + "1", + "\"Left\"", + "\"Left\"", + "" ] } ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "value": "VarGlobal" + "value": "KeyPressed" }, "parameters": [ - "Wheel_stuff.old wheel", - "=", - "5" + "", + "d" ] }, { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel5", - "=", - "GlobalVariable(Weapon_holding)" + "", + "1", + "\"Left\"", + "\"Right\"", + "" ] } ] } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "5" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "v" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "b" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] }, { - "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "GlobalVariable(Wheel_stuff.wheel4)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "q" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "w" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Up\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] }, { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "0" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "s" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Down\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ] }, { - "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyPressed" + "value": "GlobalVariableAsBoolean" }, "parameters": [ - "", - "h" + "debug.cameraControlType", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "a" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Left\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] }, { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "GlobalVariable(Weapon_holding)" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "d" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "w" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Up\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "s" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Down\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "player_body", + "TopDownMovement" + ] + } ] } ] @@ -8344,253 +3187,156 @@ "conditions": [ { "type": { - "value": "VarGlobal" + "value": "Gamepads::C_Axis_pushed" }, "parameters": [ - "Wheel_stuff.wheel", - "=", - "5" + "", + "1", + "\"Left\"", + "\"Right\"", + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "4" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel4", - "=", - "GlobalVariable(Weapon_holding)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Weapon_holding", - "=", - "0" - ] - } + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"lol\"", + "\"info\"", + "" ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.old wheel", - "=", - "5" - ] - } + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reveert to values set in the body ovject variable \"Body.Movement.TopDownMovement.*****\"" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "GodMode.active", + "False" ] - }, + } + ], + "actions": [], + "events": [ { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "v" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel5", - "=", - "0" - ] - }, - { - "type": { - "value": "VarScene" + "value": "VarObjetTxt" }, "parameters": [ - "using_phone", + "player_body", + "Animation", "=", - "0" + "\"walk\"" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "TopDownMovementBehavior::MaxSpeed" }, "parameters": [ - "Wheel_stuff.wheel5", + "player_body", + "TopDownMovement", "=", - "GlobalVariable(Weapon_holding)" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "b" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel5", - "!=", - "0" + "player_body.Movement.TopDownMovement.walk.maxSpeed" ] }, { "type": { - "value": "VarGlobal" + "value": "TopDownMovementBehavior::Deceleration" }, "parameters": [ - "Weapon_holding", + "player_body", + "TopDownMovement", "=", - "0" + "player_body.Movement.TopDownMovement.walk.Deceleration" ] }, { "type": { - "value": "VarScene" - }, - "parameters": [ - "using_phone", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" + "value": "TopDownMovementBehavior::Acceleration" }, "parameters": [ - "Weapon_holding", + "player_body", + "TopDownMovement", "=", - "GlobalVariable(Wheel_stuff.wheel5)" + "player_body.Movement.TopDownMovement.walk.Acceleration" ] } ] }, { - "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "q" - ] - }, - { - "type": { - "value": "VarGlobal" + "value": "VarObjetTxt" }, "parameters": [ - "Wheel_stuff.wheel5", + "player_body", + "Animation", "=", - "GlobalVariable(Weapon_holding)" + "\"run\"" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "TopDownMovementBehavior::MaxSpeed" }, "parameters": [ - "Wheel_stuff.wheel5", + "player_body", + "TopDownMovement", "=", - "0" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "h" + "player_body.Movement.TopDownMovement.run.maxSpeed" ] }, { "type": { - "value": "VarGlobal" + "value": "TopDownMovementBehavior::Deceleration" }, "parameters": [ - "Wheel_stuff.wheel5", + "player_body", + "TopDownMovement", "=", - "GlobalVariable(Weapon_holding)" + "player_body.Movement.TopDownMovement.run.Deceleration" ] - } - ], - "actions": [ + }, { "type": { - "value": "ModVarGlobal" + "value": "TopDownMovementBehavior::Acceleration" }, "parameters": [ - "Weapon_holding", + "player_body", + "TopDownMovement", "=", - "0" + "player_body.Movement.TopDownMovement.run.Acceleration" ] } ] @@ -8600,167 +3346,8 @@ { "folded": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Num1" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "1" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Num2" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "2" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Num3" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "3" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Num4" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "4" - ] - } - ] - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Num5" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Wheel_stuff.wheel", - "=", - "5" - ] - } - ] + "conditions": [], + "actions": [] } ], "parameters": [] @@ -8777,4 +3364,4 @@ "parameters": [] } ] -} \ No newline at end of file +} diff --git a/src/externalEvents/weaponselect.json b/src/externalEvents/weaponselect.json new file mode 100644 index 00000000..d1dfdaac --- /dev/null +++ b/src/externalEvents/weaponselect.json @@ -0,0 +1,165 @@ +{ + "associatedLayout": "City", + "lastChangeTimeStamp": 0, + "name": "WeaponSelect", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Select", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "bar", + "Resizable", + "=", + "SceneWindowWidth() + 4" + ] + }, + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "icons", + "Scale", + "=", + "0.8" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ExtendedVariables::CopyGlobalVariableToScene" + }, + "parameters": [ + "", + "\"Player.Weapons.Active\"", + "\"Player.Weapons.Active\"", + "yes", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "Player.Weapons.Active", + "\"info\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Player.Weapons.Active", + "valueIteratorVariableName": "child", + "keyIteratorVariableName": "i", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "Player.Weapons.Active[VariableString(i)]", + "True" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "icons", + "bar.CenterX() + Player.WeaponWheel.adder", + "bar.CenterY()", + "\"UI\"" + ] + }, + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "icons", + "Animation", + "=", + "VariableString(i)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Player.WeaponWheel.adder", + "+", + "300" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(child)", + "\"info\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "parameters": [] + } + ] +} \ No newline at end of file diff --git a/src/externalEvents/weaponwheel.json b/src/externalEvents/weaponwheel.json new file mode 100644 index 00000000..9ab65b40 --- /dev/null +++ b/src/externalEvents/weaponwheel.json @@ -0,0 +1,577 @@ +{ + "associatedLayout": "City", + "lastChangeTimeStamp": 0, + "name": "WeaponWheel", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Select", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "bar", + "Resizable", + "=", + "SceneWindowWidth() + 4" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinExternalLayouts::CreateObjectsFromExternalLayout" + }, + "parameters": [ + "", + "\"WeaponWheel\"", + "0", + "0", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Tab" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "WeaponWheel", + "" + ] + }, + { + "type": { + "value": "MontreSouris" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectPositionXTween2" + }, + "parameters": [ + "weaponWheelSticker", + "Tween", + "\"weaponWheelStickerAlign\"", + "SceneWindowWidth()/2 - weaponWheelSticker.Width()/2", + "\"easeOutQuad\"", + "0.5", + "" + ] + }, + { + "type": { + "value": "Tween::TweenNumberEffectPropertyTween" + }, + "parameters": [ + "", + "\"weaponWheelFade\"", + "20", + "", + "\"weaponwhe\"", + "\"blur\"", + "\"easeOutQuad\"", + "0.5" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "bar", + "Tween", + "\"bar\"", + "255", + "\"linear\"", + "0.1", + "" + ] + }, + { + "type": { + "value": "MontreSouris" + }, + "parameters": [ + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Tab" + ] + } + ], + "actions": [ + { + "type": { + "value": "CacheSouris" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenNumberEffectPropertyTween" + }, + "parameters": [ + "", + "\"weaponWheelFade\"", + "0", + "", + "\"weaponwhe\"", + "\"blur\"", + "\"easeInQuad\"", + "0.3" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectPositionXTween2" + }, + "parameters": [ + "weaponWheelSticker", + "Tween", + "\"weaponWheelStickerAlign\"", + "SceneWindowWidth()/2 - weaponWheelSticker.Width()/2 + 50", + "\"easeOutQuad\"", + "0.3", + "" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "bar", + "Tween", + "\"bar\"", + "0", + "\"linear\"", + "0.3", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.2" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "WeaponWheel" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisSurObjet" + }, + "parameters": [ + "icons", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectScaleTween3" + }, + "parameters": [ + "icons", + "Tween", + "\"weaponWheelHoverScale\"", + "1", + "\"easeInQuad\"", + "0.05", + "", + "yes" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "icons", + "Tween", + "\"weaponWheelHoverRotate\"", + "0.8", + "\"easeInQuad\"", + "0.05", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "icons", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectScaleTween3" + }, + "parameters": [ + "icons", + "Tween", + "\"weaponWheelHoverScale\"", + "1.2", + "\"easeInQuad\"", + "0.2", + "", + "yes" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "icons", + "Tween", + "\"weaponWheelHoverRotate\"", + "-45", + "\"easeInQuad\"", + "0.2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Player.Weapons.Active", + "valueIteratorVariableName": "child", + "keyIteratorVariableName": "i", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "Player.Weapons.Active[VariableString(i)].active", + "True" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Player.Weapons.Slot.current", + "<", + "Player.Weapons.Slot.max" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "icons", + "weaponWheelSticker.CenterX() + Player.WeaponWheel.adder", + "bar.CenterY()", + "\"UI\"" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Player.WeaponWheel.adder", + "+", + "icons.Width() + 50" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "weaponWheelSticker", + "Resizable", + "=", + "Player.WeaponWheel.adder" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "weaponWheelSticker", + "Resizable", + "=", + "bar.Height()" + ] + }, + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "icons", + "Animation", + "=", + "VariableString(i)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Player.Weapons.Slot.current", + "+", + "Player.Weapons.Active[VariableString(i)].slot" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "icons", + "Sticker", + "weaponWheelSticker", + "" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectPositionXTween2" + }, + "parameters": [ + "weaponWheelSticker", + "Tween", + "\"weaponWheelStickerAlign\"", + "SceneWindowWidth()/2 - weaponWheelSticker.Width()/2 + 50", + "\"linear\"", + "0.5", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "weaponWheelSticker" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "WeaponWheel" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "icons", + "=", + "", + "" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "Player.Weapons.Selected", + "=", + "icons.Animation::Name()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "AmmoText", + "Text", + "=", + "Player.Weapons.Selected" + ] + } + ] + } + ], + "parameters": [] + } + ] +} \ No newline at end of file diff --git a/src/externalLayouts/weaponselect.json b/src/externalLayouts/weaponselect.json new file mode 100644 index 00000000..30575f7d --- /dev/null +++ b/src/externalLayouts/weaponselect.json @@ -0,0 +1,36 @@ +{ + "associatedLayout": "City", + "name": "WeaponSelect", + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 201, + "keepRatio": true, + "layer": "UI", + "name": "bar", + "persistentUuid": "b2b01e97-40ff-4a40-847f-b389514ffb53", + "width": 1920, + "x": -2, + "y": 757, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 0.3895856273827297, + "windowMask": false + } +} \ No newline at end of file diff --git a/src/externalLayouts/weaponwheel.json b/src/externalLayouts/weaponwheel.json new file mode 100644 index 00000000..3bce1796 --- /dev/null +++ b/src/externalLayouts/weaponwheel.json @@ -0,0 +1,53 @@ +{ + "associatedLayout": "City", + "name": "WeaponWheel", + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 201, + "keepRatio": true, + "layer": "UI", + "name": "bar", + "persistentUuid": "b2b01e97-40ff-4a40-847f-b389514ffb53", + "width": 1920, + "x": -2, + "y": 757, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0.9901477832512315, + "height": 201, + "keepRatio": true, + "layer": "UI", + "name": "weaponWheelSticker", + "persistentUuid": "8a24af66-24b2-4908-9964-b239b8e905a7", + "width": 63.36945812807882, + "x": 736, + "y": 757, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 2.756660758663872, + "windowMask": false + } +} \ No newline at end of file diff --git a/src/game.json b/src/game.json index 2b899a12..8df86eab 100644 --- a/src/game.json +++ b/src/game.json @@ -2266,6 +2266,222 @@ "name": "assets/phone/wallpaper/4.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/uziSilencer.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/uziSilencer.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/uziLongSilencer.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/uziLongSilencer.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/uziLong.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/uziLong.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/uzi.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/uzi.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/sniper.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/sniper.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/shotgunShort.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/shotgunShort.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/shotgun.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/shotgun.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/rocketlauncherModern.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/rocketlauncherModern.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/rocketlauncher.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/rocketlauncher.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/pistolSilencer.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/pistolSilencer.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/pistol.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/pistol.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/machinegunLauncher.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/machinegunLauncher.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/machinegun.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/machinegun.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/knifeRound_smooth.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/knifeRound_smooth.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/knifeRound_sharp.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/knifeRound_sharp.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/knife_smooth.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/knife_smooth.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/knife_sharp.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/knife_sharp.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/grenadeVintage.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/grenadeVintage.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/grenadeSmoke.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/grenadeSmoke.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/grenadeFlash.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/grenadeFlash.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/grenade.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/grenade.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/flamethrower_short.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/flamethrower_short.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/flamethrower_long.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/flamethrower_long.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/weapons/icons/bar.png", + "kind": "image", + "metadata": "", + "name": "assets/weapons/icons/bar.png", + "smoothed": true, + "userAdded": true } ], "resourceFolders": [] @@ -2414,11 +2630,11 @@ ] }, { - "folded": true, "name": "Player", "type": "structure", "children": [ { + "folded": true, "name": "Customisation", "persistentUuid": "6f3e9e87-d6f3-44d0-a02a-6c8089850a4a", "type": "structure", @@ -2446,6 +2662,7 @@ ] }, { + "folded": true, "name": "debug", "type": "structure", "children": [ @@ -2463,6 +2680,7 @@ ] }, { + "folded": true, "name": "Game", "type": "structure", "children": [ @@ -2612,9 +2830,25 @@ { "__REFERENCE_TO_SPLIT_OBJECT": true, "referenceTo": "/externalEvents/debug" + }, + { + "__REFERENCE_TO_SPLIT_OBJECT": true, + "referenceTo": "/externalEvents/weaponwheel" } ], "eventsFunctionsExtensions": [ + { + "__REFERENCE_TO_SPLIT_OBJECT": true, + "referenceTo": "/eventsFunctionsExtensions/extendedvariables" + }, + { + "__REFERENCE_TO_SPLIT_OBJECT": true, + "referenceTo": "/eventsFunctionsExtensions/references" + }, + { + "__REFERENCE_TO_SPLIT_OBJECT": true, + "referenceTo": "/eventsFunctionsExtensions/gamepads" + }, { "__REFERENCE_TO_SPLIT_OBJECT": true, "referenceTo": "/eventsFunctionsExtensions/spritemasking" @@ -2692,6 +2926,10 @@ { "__REFERENCE_TO_SPLIT_OBJECT": true, "referenceTo": "/externalLayouts/phone" + }, + { + "__REFERENCE_TO_SPLIT_OBJECT": true, + "referenceTo": "/externalLayouts/weaponwheel" } ], "externalSourceFiles": [] diff --git a/src/layouts/city.json b/src/layouts/city.json index e5b9e9fa..2cd2f251 100644 --- a/src/layouts/city.json +++ b/src/layouts/city.json @@ -18,7 +18,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.24113360125461827, + "zoomFactor": 0.3250014140240832, "windowMask": false }, "objectsGroups": [ @@ -66,64 +66,23 @@ "name": "Fences" } ] + }, + { + "name": "WeaponWheel", + "objects": [ + { + "name": "icons" + }, + { + "name": "bar" + }, + { + "name": "weaponWheelSticker" + } + ] } ], "variables": [ - { - "name": "fade", - "type": "string", - "value": "" - }, - { - "name": "walk_in_west", - "type": "string", - "value": "" - }, - { - "name": "walk_in_north", - "type": "string", - "value": "" - }, - { - "name": "separate", - "type": "string", - "value": "" - }, - { - "name": "walk_in_south", - "type": "string", - "value": "" - }, - { - "name": "walk_in_east", - "type": "string", - "value": "" - }, - { - "name": "basketball", - "type": "string", - "value": "" - }, - { - "name": "phone", - "type": "string", - "value": "" - }, - { - "name": "using_phone", - "type": "string", - "value": "" - }, - { - "name": "phone_time", - "type": "string", - "value": "" - }, - { - "name": "Died_effects_tween", - "type": "string", - "value": "" - }, { "folded": true, "name": "DebugVariables", @@ -167,6 +126,223 @@ "value": false } ] + }, + { + "name": "Player", + "type": "structure", + "children": [ + { + "name": "WeaponWheel", + "type": "structure", + "children": [ + { + "folded": true, + "name": "adder", + "type": "number", + "value": 0 + } + ] + }, + { + "name": "Weapons", + "persistentUuid": "156e00a8-0565-4399-b01a-2d67f7dd2aea", + "type": "structure", + "children": [ + { + "name": "Active", + "type": "structure", + "children": [ + { + "name": "pistolSilencer", + "persistentUuid": "ca505ad0-64b4-44ee-b4b4-20ba640dd356", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": true + }, + { + "name": "slot", + "type": "number", + "value": 1 + } + ] + }, + { + "name": "rocketLauncher", + "persistentUuid": "a8cbcdb0-769a-42ec-97ba-2d4452a2f44c", + "type": "structure", + "children": [ + { + "name": "active", + "type": "boolean", + "value": false + }, + { + "name": "slot", + "type": "number", + "value": 2 + } + ] + }, + { + "name": "rocketLauncherModern", + "persistentUuid": "c25e6f18-b9d3-4077-badd-9e7fe02d7289", + "type": "structure", + "children": [ + { + "name": "active", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "slot", + "type": "number", + "value": 2 + } + ] + }, + { + "name": "shotgunLong", + "persistentUuid": "1ea7f09e-67e9-446c-b924-8b7841d8c706", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": true + }, + { + "folded": true, + "name": "slot", + "type": "number", + "value": 1 + } + ] + }, + { + "name": "sniper", + "persistentUuid": "fd26e664-81a2-41e1-b99d-eb5b6f68fd1f", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "slot", + "type": "number", + "value": 2 + } + ] + }, + { + "name": "uzi", + "persistentUuid": "8042baed-2539-4ca7-a163-86635a6c0c14", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "slot", + "type": "number", + "value": 1 + } + ] + }, + { + "name": "uziLong", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": false + }, + { + "name": "slot", + "type": "number", + "value": 1 + } + ] + }, + { + "name": "uziLongSilencer", + "persistentUuid": "f1e60af4-7996-42a0-b4ec-fa7e985445ea", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": true + }, + { + "folded": true, + "name": "slot", + "type": "number", + "value": 1 + } + ] + }, + { + "name": "uziSilencer", + "type": "structure", + "children": [ + { + "folded": true, + "name": "active", + "type": "boolean", + "value": false + }, + { + "name": "slot", + "type": "number", + "value": 1 + } + ] + } + ] + }, + { + "folded": true, + "name": "Selected", + "type": "string", + "value": "" + }, + { + "name": "Slot", + "type": "structure", + "children": [ + { + "folded": true, + "name": "current", + "type": "number", + "value": 0 + }, + { + "name": "max", + "type": "number", + "value": 4 + } + ] + } + ] + } + ] } ], "instances": [ @@ -53905,26 +54081,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "UI", - "name": "weapon_icons", - "persistentUuid": "e1f10fa7-78d4-4f19-91f7-1e2a6439f087", - "width": 0, - "x": 1823, - "y": 32, - "zOrder": 12643489, - "numberProperties": [ - { - "name": "animation", - "value": 2 - } - ], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": true, @@ -54786,6 +54942,22 @@ "value": "shadow" } ] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "UI", + "name": "AmmoText", + "persistentUuid": "1d0de529-1976-49aa-995b-d6a7e22f8a7c", + "width": 0, + "x": 1671, + "y": 19, + "zOrder": 12643570, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -57486,7 +57658,18 @@ "underlined": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "string": "Ammo: [number]", "font": "", "textAlignment": "", @@ -60079,6 +60262,7 @@ "value": "" }, { + "folded": true, "name": "Movement", "type": "structure", "children": [ @@ -60224,6 +60408,7 @@ ] }, { + "folded": true, "name": "Phone", "type": "structure", "children": [ @@ -60234,6 +60419,28 @@ "value": false } ] + }, + { + "name": "Weapons", + "type": "structure", + "children": [ + { + "name": "Active", + "type": "structure", + "children": [ + { + "name": "uziLong", + "type": "boolean", + "value": false + }, + { + "name": "uziSilencer", + "type": "boolean", + "value": false + } + ] + } + ] } ], "effects": [ @@ -61635,254 +61842,1503 @@ ] } ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "UI", - "children": [ - { - "folderName": "weapon", - "children": [ - { - "objectName": "NewObject" - }, - { - "objectName": "weapon_icons" - } - ] - }, - { - "folderName": "phone", - "children": [ - { - "objectName": "Thumb" - }, - { - "objectName": "phoneIcons" - }, - { - "objectName": "phoneFrame" - }, - { - "objectName": "phoneMask" - }, - { - "objectName": "phoneWallpaper" - }, - { - "objectName": "phone_battery" - }, - { - "objectName": "Pointer" - }, - { - "objectName": "phone_time" - }, - { - "objectName": "phone_wifi" - } - ] - }, - { - "folderName": "debug", - "children": [ - { - "objectName": "Wheel_info" - }, - { - "objectName": "weaponholding" - }, - { - "objectName": "reloading" - }, - { - "objectName": "debugToggle" - }, - { - "objectName": "debugText" - }, - { - "objectName": "AmmoText" - } - ] - }, - { - "objectName": "crosshair" - } - ] - }, - { - "folderName": "Environment", - "children": [ - { - "folderName": "particles", - "children": [ - { - "objectName": "green_leaves_particle" - }, - { - "objectName": "brown_leaves_particle" - } - ] - }, - { - "folderName": "sports", - "children": [ - { - "folderName": "basketball", - "children": [ - { - "objectName": "sports_equipments" - }, - { - "objectName": "ground_elements" - }, - { - "objectName": "sports_equipments_movable" - } - ] - } - ] - }, - { - "folderName": "props", - "children": [ - { - "objectName": "trash_movable" - }, - { - "objectName": "deco" - }, - { - "objectName": "Fences" - }, - { - "objectName": "road_block" - }, - { - "objectName": "foliage" - } - ] - } - ] - }, - { - "folderName": "Player", - "children": [ - { - "objectName": "Body" - }, - { - "objectName": "Leg" - }, - { - "objectName": "Hand" - } - ] - }, - { - "folderName": "Land", - "children": [ - { - "objectName": "beach_sand_2" - }, - { - "objectName": "sand_1" - }, - { - "objectName": "beach_sand_1" - }, - { - "objectName": "sand_2" - }, - { - "objectName": "concrete_1" - }, - { - "objectName": "sand" - }, - { - "objectName": "grass_tiled" - }, - { - "objectName": "grass" - } - ] - }, - { - "folderName": "Road", - "children": [ - { - "objectName": "road_3" - }, - { - "objectName": "road_4" - }, - { - "objectName": "bridge" - }, - { - "objectName": "road_2" - }, - { - "objectName": "road_1" - }, - { - "objectName": "road" - } - ] - }, - { - "folderName": "Weapons", - "children": [ - { - "folderName": "particles", - "children": [ - { - "objectName": "shooting_effect_sniper" - }, - { - "objectName": "shooting_effect" - }, - { - "objectName": "shooting_effect_rocket" - }, - { - "objectName": "bullet_destroy_pistol" - }, - { - "objectName": "bullet_destroy_sniper" - }, - { - "objectName": "bullet_destroy_machine" - }, - { - "objectName": "bullet_destroy_rocket" - } - ] - }, - { - "folderName": "type", - "children": [ - { - "folderName": "melee", - "children": [ - { - "objectName": "mele1" + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "icons", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false, + "IsDestroyedWithParent": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "uziSilencer", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/uziSilencer.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 85, + "y": 65 }, - { - "objectName": "mele2" - } - ] - }, - { - "folderName": "gun", - "children": [ - { - "objectName": "gun1" + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "uziLongSilencer", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/uziLongSilencer.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 121.5, + "y": 64.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "uziLong", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/uziLong.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 85, + "y": 65 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "uzi", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/uzi.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 65 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "sniper", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/sniper.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 200.5, + "y": 54.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "shotgunShort", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/shotgunShort.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 98, + "y": 26 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "shotgun", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/shotgun.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 97.5, + "y": 26 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "rocketLauncherModern", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/rocketlauncherModern.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 152.5, + "y": 65 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "rocketLauncher", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/rocketlauncher.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 199.5, + "y": 71 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "pistolSilencer", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/pistolSilencer.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 79.5, + "y": 45 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "pistol", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/pistol.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 57.5, + "y": 45 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/machinegunLauncher.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 116, + "y": 51.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/machinegun.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 116.5, + "y": 52 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/knifeRound_smooth.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15.5, + "y": 68.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/knifeRound_sharp.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 17.5, + "y": 68 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/knife_smooth.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 17.5, + "y": 69 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/knife_sharp.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 68.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/grenadeVintage.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19.5, + "y": 74 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/grenadeSmoke.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 18.5, + "y": 38.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/grenadeFlash.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 17.5, + "y": 38.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/grenade.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 22.5, + "y": 34 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/flamethrower_short.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 106.5, + "y": 41 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/flamethrower_long.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 114, + "y": 40.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 169, + "y": 1 + }, + { + "x": 169, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "bar", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/weapons/icons/bar.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 112, + "y": 0 + }, + { + "x": 1807, + "y": 0 + }, + { + "x": 1807, + "y": 296 + }, + { + "x": 112, + "y": 296 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "weaponWheelSticker", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "hidden_separate", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\sprite_objects\\hidden_separate-1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "UI", + "children": [ + { + "folderName": "weapon", + "children": [ + { + "objectName": "NewObject" + }, + { + "objectName": "weapon_icons" + } + ] + }, + { + "folderName": "phone", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "phoneIcons" + }, + { + "objectName": "phoneFrame" + }, + { + "objectName": "phoneMask" + }, + { + "objectName": "phoneWallpaper" + }, + { + "objectName": "phone_battery" + }, + { + "objectName": "Pointer" + }, + { + "objectName": "phone_time" + }, + { + "objectName": "phone_wifi" + } + ] + }, + { + "folderName": "debug", + "children": [ + { + "objectName": "Wheel_info" + }, + { + "objectName": "weaponholding" + }, + { + "objectName": "reloading" + }, + { + "objectName": "debugToggle" + }, + { + "objectName": "debugText" + }, + { + "objectName": "AmmoText" + } + ] + }, + { + "objectName": "crosshair" + } + ] + }, + { + "folderName": "Environment", + "children": [ + { + "folderName": "particles", + "children": [ + { + "objectName": "green_leaves_particle" + }, + { + "objectName": "brown_leaves_particle" + } + ] + }, + { + "folderName": "sports", + "children": [ + { + "folderName": "basketball", + "children": [ + { + "objectName": "sports_equipments" + }, + { + "objectName": "ground_elements" + }, + { + "objectName": "sports_equipments_movable" + } + ] + } + ] + }, + { + "folderName": "props", + "children": [ + { + "objectName": "trash_movable" + }, + { + "objectName": "deco" + }, + { + "objectName": "Fences" + }, + { + "objectName": "road_block" + }, + { + "objectName": "foliage" + } + ] + } + ] + }, + { + "folderName": "Player", + "children": [ + { + "objectName": "Body" + }, + { + "objectName": "Leg" + }, + { + "objectName": "Hand" + } + ] + }, + { + "folderName": "Land", + "children": [ + { + "objectName": "beach_sand_2" + }, + { + "objectName": "sand_1" + }, + { + "objectName": "beach_sand_1" + }, + { + "objectName": "sand_2" + }, + { + "objectName": "concrete_1" + }, + { + "objectName": "sand" + }, + { + "objectName": "grass_tiled" + }, + { + "objectName": "grass" + } + ] + }, + { + "folderName": "Road", + "children": [ + { + "objectName": "road_3" + }, + { + "objectName": "road_4" + }, + { + "objectName": "bridge" + }, + { + "objectName": "road_2" + }, + { + "objectName": "road_1" + }, + { + "objectName": "road" + } + ] + }, + { + "folderName": "Weapons", + "children": [ + { + "folderName": "Icons", + "children": [ + { + "objectName": "icons" + }, + { + "objectName": "bar" + } + ] + }, + { + "folderName": "particles", + "children": [ + { + "objectName": "shooting_effect_sniper" + }, + { + "objectName": "shooting_effect" + }, + { + "objectName": "shooting_effect_rocket" + }, + { + "objectName": "bullet_destroy_pistol" + }, + { + "objectName": "bullet_destroy_sniper" + }, + { + "objectName": "bullet_destroy_machine" + }, + { + "objectName": "bullet_destroy_rocket" + } + ] + }, + { + "folderName": "type", + "children": [ + { + "folderName": "melee", + "children": [ + { + "objectName": "mele1" + }, + { + "objectName": "mele2" + } + ] + }, + { + "folderName": "gun", + "children": [ + { + "objectName": "gun1" }, { "objectName": "gun3" @@ -61972,6 +63428,9 @@ }, { "objectName": "hidden_separate" + }, + { + "objectName": "weaponWheelSticker" } ] } @@ -62009,7 +63468,6 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "folded": true, "name": "Links", "source": "", "type": "BuiltinCommonInstructions::Group", @@ -62428,6 +63886,16 @@ }, "stringParameters": {}, "booleanParameters": {} + }, + { + "effectType": "TiltShift", + "name": "weaponwhe", + "doubleParameters": { + "blur": 0, + "gradientBlur": 0 + }, + "stringParameters": {}, + "booleanParameters": {} } ] },