diff --git a/__tests__/post-build/exampleShortHeaders.json.spec.js b/__tests__/post-build/exampleShortHeaders.json.spec.js index 4e0121ad1..e105a615f 100644 --- a/__tests__/post-build/exampleShortHeaders.json.spec.js +++ b/__tests__/post-build/exampleShortHeaders.json.spec.js @@ -57,6 +57,7 @@ describe('exampleShortHeaders.json post build checks', () => { 'Timers and time', 'Variables', 'Debugger Tools', + 'Linked objects', 'Panel Sprite (9-patch) Object', 'Particle system', 'Platform behavior', @@ -74,7 +75,7 @@ describe('exampleShortHeaders.json post build checks', () => { 'Checkpoints', 'Gamepads (controllers)', 'Multitouch joystick and buttons (sprite)', - 'Shake Object (position, angle, scale)', + 'Shake object', 'Volume Falloff', ]), codeSizeLevel: 'small', diff --git a/examples/platformer/assets/gui/Thumbstick Boundary_Dark.png b/examples/platformer/assets/gui/Thumbstick Boundary_Dark.png deleted file mode 100644 index 63d84a18a..000000000 Binary files a/examples/platformer/assets/gui/Thumbstick Boundary_Dark.png and /dev/null differ diff --git a/examples/platformer/assets/gui/Thumbstick Boundary_Light.png b/examples/platformer/assets/gui/Thumbstick Boundary_Light.png deleted file mode 100644 index 3a2f59475..000000000 Binary files a/examples/platformer/assets/gui/Thumbstick Boundary_Light.png and /dev/null differ diff --git a/examples/platformer/assets/laserGrayBurst.png b/examples/platformer/assets/laserGrayBurst.png deleted file mode 100644 index a7ccbc305..000000000 Binary files a/examples/platformer/assets/laserGrayBurst.png and /dev/null differ diff --git a/examples/platformer/platformer.json b/examples/platformer/platformer.json index 8936bb3fb..d8ab1b48c 100644 --- a/examples/platformer/platformer.json +++ b/examples/platformer/platformer.json @@ -8,6 +8,8 @@ }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.platformer", @@ -820,41 +822,6 @@ "smoothed": true, "userAdded": false }, - { - "alwaysLoaded": false, - "file": "assets/gui/Thumbstick Boundary_Dark.png", - "kind": "image", - "metadata": "", - "name": "Thumbstick Boundary_Dark.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://resources.gdevelop-app.com/assets/Interface/Thumbstick/Thumbstick Boundary_Dark.png", - "name": "gdevelop-asset-store" - } - }, - { - "alwaysLoaded": false, - "file": "assets/gui/Thumbstick Boundary_Light.png", - "kind": "image", - "metadata": "", - "name": "Thumbstick Boundary_Light.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://resources.gdevelop-app.com/assets/Interface/Thumbstick/Thumbstick Boundary_Light.png", - "name": "gdevelop-asset-store" - } - }, - { - "alwaysLoaded": false, - "file": "assets/gui/Thumbstick_Dark.png", - "kind": "image", - "metadata": "", - "name": "assets\\Thumbstick_Dark.png", - "smoothed": true, - "userAdded": false - }, { "alwaysLoaded": false, "file": "assets/gui/Top arrow round button.png", @@ -923,15 +890,6 @@ "name": "CantoraOne-Regular.ttf" } }, - { - "alwaysLoaded": false, - "file": "assets/gui/Thumbstick Boundary_Dark.png", - "kind": "image", - "metadata": "", - "name": "assets\\gui\\Thumbstick Boundary_Dark.png", - "smoothed": true, - "userAdded": true - }, { "alwaysLoaded": false, "file": "assets/gui/Thumbstick_Dark.png", @@ -941,15 +899,6 @@ "smoothed": true, "userAdded": true }, - { - "alwaysLoaded": false, - "file": "assets/gui/shadedDark45.png", - "kind": "image", - "metadata": "", - "name": "assets\\gui\\shadedDark45.png", - "smoothed": true, - "userAdded": true - }, { "alwaysLoaded": false, "file": "assets/gui/Thumbstick Boundary_Dark160.png", @@ -1726,6 +1675,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", "tags": "", @@ -1751,7 +1701,14 @@ "FallAnimationName": "Fall", "ClimbAnimationName": "Climb", "PlatformerBehavior": "PlatformerObject", - "RunAnimationName": "Run" + "RunAnimationName": "Run", + "AnimatableCapability": "Animation", + "FlippableCapability": "Flippable", + "AnimatableCapacity": "Animation", + "FlippableCapacity": "Flippable", + "Animation": "Animation", + "Flip": "Flippable", + "Flippable": "Flippable" }, { "name": "PlatformerGamepadMapper", @@ -3242,6 +3199,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Platform1", "tags": "", @@ -3310,6 +3268,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Platform2", "tags": "", @@ -3403,6 +3362,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Platform3", "tags": "", @@ -3471,6 +3431,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Platform4", "tags": "", @@ -3543,6 +3504,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Portal", "tags": "", @@ -3618,6 +3580,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Checkpoint", "tags": "", @@ -3809,6 +3772,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Ladder", "tags": "", @@ -3858,6 +3822,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Monster", "tags": "", @@ -3874,7 +3839,8 @@ "behaviors": [ { "name": "MonsterEnemy", - "type": "Enemy::MonsterEnemy" + "type": "Enemy::MonsterEnemy", + "Animation": "Animation" } ], "animations": [ @@ -4337,6 +4303,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Fly", "tags": "", @@ -5037,6 +5004,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Coin", "tags": "", @@ -5308,6 +5276,7 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "LeftBoundary", "tags": "", @@ -5357,6 +5326,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "RightBoundary", "tags": "", @@ -5406,6 +5376,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "TopBoundary", "tags": "", @@ -5447,6 +5418,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BottomBoundary", "tags": "", @@ -5488,6 +5460,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BoundaryJumpThrough", "tags": "", @@ -5537,6 +5510,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Moon", "tags": "", @@ -5783,6 +5757,7 @@ }, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -5817,6 +5792,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -5853,6 +5829,7 @@ } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "JumpButton", "tags": "", @@ -5955,8 +5932,7 @@ "textG": 0, "textR": 0 }, - "comment": "This tab is the event sheet, which defines the logic of the game.\nSome objects have behaviors that also perform logic and you can learn about those by reveiwing the extensions in this project.", - "comment2": "" + "comment": "This tab is the event sheet, which defines the logic of the game.\nSome objects have behaviors that also perform logic and you can learn about those by reveiwing the extensions in this project." }, { "colorB": 224, @@ -5977,8 +5953,7 @@ "textG": 0, "textR": 0 }, - "comment": "Note: Keyboard controls are provided by the Platformer behavior automatically", - "comment2": "" + "comment": "Note: Keyboard controls are provided by the Platformer behavior automatically" }, { "colorB": 228, @@ -6244,8 +6219,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the position of the player at the beginning of the scene as the first checkpoint", - "comment2": "" + "comment": "Save the position of the player at the beginning of the scene as the first checkpoint" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6285,8 +6259,7 @@ "textG": 0, "textR": 0 }, - "comment": "If the player collides with the checkpoint object and it is not active this will trigger", - "comment2": "" + "comment": "If the player collides with the checkpoint object and it is not active this will trigger" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6339,8 +6312,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset all checkpoints. \"Pick all\" is required because the collision condition only picks the checkpoint touching the player.", - "comment2": "" + "comment": "Reset all checkpoints. \"Pick all\" is required because the collision condition only picks the checkpoint touching the player." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6358,10 +6330,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Checkpoint", + "Animation", + "=", "\"InActive\"" ] } @@ -6377,8 +6351,7 @@ "textG": 0, "textR": 0 }, - "comment": "Activate the checkpoint that the player is touching", - "comment2": "" + "comment": "Activate the checkpoint that the player is touching" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6399,10 +6372,12 @@ }, { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Checkpoint", + "Animation", + "=", "\"Activate\"" ] } @@ -6506,8 +6481,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect player falling below the screen", - "comment2": "" + "comment": "Detect player falling below the screen" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6599,8 +6573,7 @@ "textG": 0, "textR": 0 }, - "comment": "The player kill ennemies when it falls on them.", - "comment2": "" + "comment": "The player kill ennemies when it falls on them." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6702,8 +6675,7 @@ "textG": 0, "textR": 0 }, - "comment": "When a Fly falls below background it is deleted. (This is just a good house keeping practice)", - "comment2": "" + "comment": "When a Fly falls below background it is deleted. (This is just a good house keeping practice)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6783,8 +6755,7 @@ "textG": 0, "textR": 0 }, - "comment": "The player always dies when the ennemy is on fire.", - "comment2": "" + "comment": "The player always dies when the ennemy is on fire." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6944,8 +6915,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start the game with the \"EndScreen\" layer hidden and make the overlay semi-transparent", - "comment2": "" + "comment": "Start the game with the \"EndScreen\" layer hidden and make the overlay semi-transparent" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6991,8 +6961,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when the player reaches the door", - "comment2": "" + "comment": "Detect when the player reaches the door" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7047,8 +7016,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop controlling player movement with platformer behavior and then use tweens to animate the player falling into the portal", - "comment2": "" + "comment": "Stop controlling player movement with platformer behavior and then use tweens to animate the player falling into the portal" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7129,8 +7097,7 @@ "textG": 0, "textR": 0 }, - "comment": "Display appropriate text based on player score", - "comment2": "" + "comment": "Display appropriate text based on player score" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7210,8 +7177,7 @@ "textG": 0, "textR": 0 }, - "comment": "Center objects and resize the overlay to cover entire screen", - "comment2": "" + "comment": "Center objects and resize the overlay to cover entire screen" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7341,8 +7307,7 @@ "textG": 0, "textR": 0 }, - "comment": "Boundary objects act like invisible walls for the player and they also define where the camera can move.", - "comment2": "" + "comment": "Boundary objects act like invisible walls for the player and they also define where the camera can move." }, { "type": "BuiltinCommonInstructions::Standard", @@ -7413,8 +7378,7 @@ "textG": 0, "textR": 0 }, - "comment": "Background motion (parallax) and adjust size to fit screen", - "comment2": "" + "comment": "Background motion (parallax) and adjust size to fit screen" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7550,8 +7514,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase volume of portal as the player gets closer", - "comment2": "" + "comment": "Increase volume of portal as the player gets closer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7587,9 +7550,14 @@ "ambientLightColorB": 8002120, "ambientLightColorG": 6031360, "ambientLightColorR": 7844472, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "2d", "visibility": true, "cameras": [], "effects": [] @@ -7598,9 +7566,14 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -7614,15 +7587,36 @@ "width": 0 } ], - "effects": [] + "effects": [ + { + "effectType": "Scene3D::HemisphereLight", + "name": "3D Light", + "doubleParameters": { + "elevation": 45, + "intensity": 1, + "rotation": 0 + }, + "stringParameters": { + "groundColor": "64;64;64", + "skyColor": "255;255;255", + "top": "Y-" + }, + "booleanParameters": {} + } + ] }, { "ambientLightColorB": 9191608, "ambientLightColorG": 6031360, "ambientLightColorR": 8756632, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "UI", + "renderingType": "2d", "visibility": true, "cameras": [], "effects": [] @@ -7631,9 +7625,14 @@ "ambientLightColorB": -2147483616, "ambientLightColorG": 6031360, "ambientLightColorR": 11020320, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "EndScreen", + "renderingType": "2d", "visibility": false, "cameras": [], "effects": [] @@ -7644,6 +7643,18 @@ "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior" }, + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, { "name": "MonsterEnemy", "type": "Enemy::MonsterEnemy" @@ -7652,6 +7663,14 @@ "name": "MultitouchButton", "type": "MultitouchJoystick::MultitouchButton" }, + { + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Platform", "type": "PlatformBehavior::PlatformBehavior" @@ -7676,6 +7695,14 @@ "name": "RectangleMovement", "type": "RectangleMovement::RectangleMovement" }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" @@ -7698,12 +7725,12 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "helpPath": "", + "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.3.0", + "version": "1.4.4", "description": [ "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", @@ -7755,8 +7782,7 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -7806,8 +7832,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" + "comment": "Make sure the cursor position is only checked once per frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -7871,8 +7896,7 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { "type": "BuiltinCommonInstructions::Standard", @@ -8108,73 +8132,64 @@ }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "PanelSpriteButton::ButtonFSM::PropertyState" }, "parameters": [ "Object", - "Behavior" + "Behavior", + "=", + "\"Hovered\"" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" ] } ] @@ -8184,99 +8199,74 @@ "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - } + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" ] } ] @@ -8415,6 +8405,96 @@ ], "objectGroups": [] }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -8734,6 +8814,46 @@ } ], "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTouchId()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -8811,7 +8931,7 @@ { "defaultName": "Button", "description": "A button that can be customized.", - "fullName": "Panel sprite button", + "fullName": "Button (panel sprite)", "name": "PanelSpriteButton", "eventsFunctions": [ { @@ -8830,8 +8950,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -8911,8 +9030,7 @@ "textG": 0, "textR": 0 }, - "comment": "Place the label over the backgrounds.", - "comment2": "" + "comment": "Place the label over the backgrounds." }, { "type": "BuiltinCommonInstructions::Standard", @@ -9043,8 +9161,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -9409,8 +9526,7 @@ "textG": 0, "textR": 0 }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" + "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." }, { "type": "BuiltinCommonInstructions::Standard", @@ -9793,7 +9909,7 @@ "type": "object" }, { - "description": "", + "description": "Text", "name": "LabelText", "type": "string" } @@ -9986,6 +10102,122 @@ ] } ] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -10164,13 +10396,21 @@ "name": "PlatformerCharacterAnimator", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Sports and Fitness/Sports and Fitness_training_running_run.svg", "shortDescription": "Change animations and horizontal flipping of a platformer character automatically.", - "version": "1.0.0", - "description": "Automatically change the animations and horizontal flipping of a platformer character based on movement and interaction with platform objects.", + "version": "1.1.0", + "description": [ + "Automatically change the animations and horizontal flipping of a platformer character based on movement and interaction with platform objects.", + "", + "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer))." + ], + "origin": { + "identifier": "PlatformerCharacterAnimator", + "name": "gdevelop-extension-store" + }, "tags": [ - "animations", + "animation", "platformer", - "flipping", - "automatic" + "platform", + "flip" ], "authorIds": [ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" @@ -10182,7 +10422,7 @@ "description": "Change animations and horizontal flipping of a platformer character automatically.", "fullName": "Platformer character animator", "name": "PlatformerCharacterAnimator", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -10248,10 +10488,11 @@ "actions": [ { "type": { - "value": "FlipX" + "value": "FlippableCapability::FlippableBehavior::FlipX" }, "parameters": [ "Object", + "Flippable", "yes" ] } @@ -10291,11 +10532,12 @@ "actions": [ { "type": { - "value": "FlipX" + "value": "FlippableCapability::FlippableBehavior::FlipX" }, "parameters": [ "Object", - "" + "Flippable", + "no" ] } ] @@ -10351,10 +10593,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "Object.Behavior::PropertyJumpAnimationName()" ] } @@ -10382,10 +10626,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "Object.Behavior::PropertyFallAnimationName()" ] } @@ -10428,10 +10674,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "Object.Behavior::PropertyRunAnimationName()" ] } @@ -10460,10 +10708,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "Object.Behavior::PropertyIdleAnimationName()" ] } @@ -10499,10 +10749,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "Object.Behavior::PropertyClimbAnimationName()" ] } @@ -10530,10 +10782,11 @@ "actions": [ { "type": { - "value": "PlayAnimation" + "value": "AnimatableCapability::AnimatableBehavior::PlayAnimation" }, "parameters": [ - "Object" + "Object", + "Animation" ] } ] @@ -10561,10 +10814,11 @@ "actions": [ { "type": { - "value": "PauseAnimation" + "value": "AnimatableCapability::AnimatableBehavior::PauseAnimation" }, "parameters": [ - "Object" + "Object", + "Animation" ] } ] @@ -10594,10 +10848,11 @@ "actions": [ { "type": { - "value": "PlayAnimation" + "value": "AnimatableCapability::AnimatableBehavior::PlayAnimation" }, "parameters": [ - "Object" + "Object", + "Animation" ] } ] @@ -10612,72 +10867,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Enable (or disable) automated animation changes a platformer character. Disabling animation changes is useful to play custom animations.", - "fullName": "Enable (or disable) automated animation changes", - "functionType": "Action", - "name": "EnableChangingAnimations", - "sentence": "Enable automated animation changes on _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"EnableAnimationChanges\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10685,120 +10874,575 @@ "name": "Behavior", "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "Change animations automatically", - "name": "EnableAnimationChanges", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Enable (or disable) automated horizontal flipping of a platform character.", - "fullName": "Enable (or disable) automated horizontal flipping", + "fullName": "", "functionType": "Action", - "name": "EnableHorizontalFlipping", - "sentence": "Enable automated horizontal flipping on _PARAM0_: _PARAM2_", + "name": "onActivate", + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Flip character based on input from controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"EnableHorizontalFlipping\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlippableCapability::FlippableBehavior::FlipX" + }, + "parameters": [ + "Object", + "Flip", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlippableCapability::FlippableBehavior::FlipX" + }, + "parameters": [ + "Object", + "Flip", + "no" + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", - "type": "behavior" + "parameters": [] }, { - "defaultValue": "yes", - "description": "Enable horizontal flipping", - "name": "EnableHorizontalFlipping", - "optional": true, - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Set the \"Idle\" animation name. Do not use quotation marks.", - "fullName": "\"Idle\" animation name", - "functionType": "Action", - "group": "Configure animations", - "name": "SetIdleAnimationName", - "sentence": "Set \"Idle\" animation of _PARAM0_ to _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change animations", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyIdleAnimationName" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"AnimationName\")" - ] - } - ] - } - ], - "parameters": [ - { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyJumpAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyFallAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyRunAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyIdleAnimationName()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyClimbAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::PlayAnimation" + }, + "parameters": [ + "Object", + "Animation" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::PauseAnimation" + }, + "parameters": [ + "Object", + "Animation" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::PlayAnimation" + }, + "parameters": [ + "Object", + "Animation" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automated animation changes a platformer character. Disabling animation changes is useful to play custom animations.", + "fullName": "Enable (or disable) automated animation changes", + "functionType": "Action", + "name": "EnableChangingAnimations", + "sentence": "Enable automated animation changes on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableAnimationChanges\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Change animations automatically", + "name": "EnableAnimationChanges", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automated horizontal flipping of a platform character.", + "fullName": "Enable (or disable) automated horizontal flipping", + "functionType": "Action", + "name": "EnableHorizontalFlipping", + "sentence": "Enable automated horizontal flipping on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableHorizontalFlipping\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Enable horizontal flipping", + "name": "EnableHorizontalFlipping", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Idle\" animation name. Do not use quotation marks.", + "fullName": "\"Idle\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetIdleAnimationName", + "sentence": "Set \"Idle\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyIdleAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10845,7 +11489,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10892,7 +11535,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10939,7 +11581,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10965,173 +11606,1166 @@ "sentence": "Set \"Climb\" animation of _PARAM0_ to _PARAM2_", "events": [ { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyClimbAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Enable animation changes", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "EnableAnimationChanges" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable horizontal flipping", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "EnableHorizontalFlipping" + }, + { + "value": "Idle", + "type": "String", + "label": "\"Idle\" animation name ", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "IdleAnimationName" + }, + { + "value": "Run", + "type": "String", + "label": "\"Run\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "RunAnimationName" + }, + { + "value": "Jump", + "type": "String", + "label": "\"Jump\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "JumpAnimationName" + }, + { + "value": "Fall", + "type": "String", + "label": "\"Fall\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "FallAnimationName" + }, + { + "value": "Climb", + "type": "String", + "label": "\"Climb\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "ClimbAnimationName" + }, + { + "value": "", + "type": "Behavior", + "label": "Platformer character", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerBehavior" + }, + { + "value": "", + "type": "Behavior", + "label": "Animatable capacity", + "description": "", + "group": "", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "hidden": false, + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Flippable capacity", + "description": "", + "group": "", + "extraInformation": [ + "FlippableCapability::FlippableBehavior" + ], + "hidden": false, + "name": "Flippable" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Rectangular movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", + "name": "RectangleMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", + "shortDescription": "Move objects in a rectangular pattern.", + "version": "1.2.0", + "description": [ + "Move objects in a rectangular pattern with easing functions from the Tween extension.", + "", + "It can be used for:", + "", + "- Moveable platforms", + "- Enemy movement patterns", + "- Moving along the border of another object (inside, center, outside)", + "", + "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer)).", + "", + "This game shows how to make objects move around the border of another object ([open the project online](https://editor.gdevelop.io/?project=example://moving-saw-platformer)).", + "", + "This example can be used to test different settings ([open the project online](https://editor.gdevelop.io/?project=example://rectangular-movement)).", + "" + ], + "origin": { + "identifier": "RectangleMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "rectangular", + "movement", + "rectangle", + "patrol", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Distance from an object to the closest edge of a second object.", + "fullName": "Distance from an object to the closest edge of a second object", + "functionType": "Expression", + "name": "DistanceToClosestEdge", + "private": true, + "sentence": "Distance from _PARAM1_ to the closest edge of _PARAM2_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If point is inside rectangle, just use min distance" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + ">=", + "CenterObject.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + "<=", + "CenterObject.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + ">=", + "CenterObject.BoundingBoxTop()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + "<=", + "CenterObject.BoundingBoxBottom()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "min(\nmin(\nMovingObject.BoundingBoxCenterY() - CenterObject.BoundingBoxTop(), \nCenterObject.BoundingBoxBottom() - MovingObject.BoundingBoxCenterY()),\nmin(\nMovingObject.BoundingBoxCenterX() - CenterObject.BoundingBoxLeft(), \nCenterObject.BoundingBoxRight() - MovingObject.BoundingBoxCenterX())\n)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If point is outside rectangle, find distance to clamped position on rectangle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + "<", + "CenterObject.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + ">", + "CenterObject.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + "<", + "CenterObject.BoundingBoxTop()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + ">", + "CenterObject.BoundingBoxBottom()" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "DistanceBetweenPositions(\nMovingObject.BoundingBoxCenterX(),\nMovingObject.BoundingBoxCenterY(),\nclamp(MovingObject.BoundingBoxCenterX(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxRight()),\nclamp(MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxTop(), CenterObject.BoundingBoxBottom())\n)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Center object", + "name": "CenterObject", + "type": "objectList" + }, + { + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Update rectangular movement to follow the border of an object. Run once, or every time the center object moves.", + "fullName": "Update rectangular movement to follow the border of an object", + "functionType": "Action", + "name": "MoveAlongBorderOfObject", + "sentence": "Update rectangular movement of _PARAM1_ to follow the border of _PARAM3_. Position on border: _PARAM4_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create object link (if one has not been created)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Set a valid initial value by picking any Center object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "MovingObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.DistanceToClosestEdge", + "=", + "RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject)" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update value if distance is lower than existing minimum", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.DistanceToClosestEdge", + "=", + "min(MovingObject.Variable(__RectangleMovement.DistanceToClosestEdge), RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject))" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Link objects that have the closest distance", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Link the MovingObject that has the shortest distance (and don't create more links even if another object has the same distance)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject)", + "=", + "MovingObject.Variable(__RectangleMovement.DistanceToClosestEdge)" + ] + } + ], + "actions": [ + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "MovingObject", + "CenterObject" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "True" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update rectangular movement to follow the border of object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "MovingObject", + "CenterObject", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Inside (default)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Inside\"" + ] + }, + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom() - MovingObject.Height()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight() - MovingObject.Width()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Center", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Center\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop() - MovingObject.Height()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom() - MovingObject.Height()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft() - MovingObject.Width()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight() - MovingObject.Width()/2", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Outside", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Outside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop() - MovingObject.Height()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft() - MovingObject.Width()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" + }, + { + "description": "Rectangle Movement (required)", + "name": "RectangleMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Center object", + "name": "CenterObject", + "type": "objectList" + }, + { + "description": "Position on border", + "name": "PositionOnBorder", + "supplementaryInformation": "[\"Inside\",\"Center\",\"Outside\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Move to the nearest corner of the center object.", + "fullName": "Move to the nearest corner of the center object", + "functionType": "Action", + "name": "MoveToNearestCorner", + "sentence": "Move _PARAM1_ to the nearest corner of _PARAM3_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create a link to the closest object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::MoveAlongBorderOfObject" + }, + "parameters": [ + "", + "MovingObject", + "RectangleMovement", + "CenterObject", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move to nearest corner", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "MovingObject", "conditions": [], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyClimbAnimationName" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"AnimationName\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "CenterObject", + "MovingObject", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to TopLeft (don't use a condition on the first check so the variable starts with a valid corner)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxTop())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Top-left corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to TopRight" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxTop())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxTop())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Top-right corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to BottomLeft" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxBottom())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxBottom())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Bottom-left corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to BottomRight" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxBottom())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxBottom())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Bottom-right corner\"", + "" + ] + } + ] + } ] } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", - "type": "behavior" - }, - { - "description": "Animation name", - "name": "AnimationName", - "type": "string" - } - ], - "objectGroups": [] + "parameters": [] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "Enable animation changes", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "EnableAnimationChanges" - }, - { - "value": "true", - "type": "Boolean", - "label": "Enable horizontal flipping", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "EnableHorizontalFlipping" - }, - { - "value": "Idle", - "type": "String", - "label": "\"Idle\" animation name ", - "description": "", - "group": "Animation names", - "extraInformation": [], - "hidden": false, - "name": "IdleAnimationName" - }, - { - "value": "Run", - "type": "String", - "label": "\"Run\" animation name", - "description": "", - "group": "Animation names", - "extraInformation": [], - "hidden": false, - "name": "RunAnimationName" - }, - { - "value": "Jump", - "type": "String", - "label": "\"Jump\" animation name", - "description": "", - "group": "Animation names", - "extraInformation": [], - "hidden": false, - "name": "JumpAnimationName" - }, + "parameters": [ { - "value": "Fall", - "type": "String", - "label": "\"Fall\" animation name", - "description": "", - "group": "Animation names", - "extraInformation": [], - "hidden": false, - "name": "FallAnimationName" + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" }, { - "value": "Climb", - "type": "String", - "label": "\"Climb\" animation name", - "description": "", - "group": "Animation names", - "extraInformation": [], - "hidden": false, - "name": "ClimbAnimationName" + "description": "Rectangle Movement (required)", + "name": "RectangleMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" }, { - "value": "", - "type": "Behavior", - "label": "Platformer character", - "description": "", - "group": "", - "extraInformation": [ - "PlatformBehavior::PlatformerObjectBehavior" - ], - "hidden": false, - "name": "PlatformerBehavior" + "description": "Center object", + "name": "CenterObject", + "type": "objectList" } ], - "sharedPropertyDescriptors": [] + "objectGroups": [] } ], - "eventsBasedObjects": [] - }, - { - "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", - "category": "Movement", - "extensionNamespace": "", - "fullName": "Rectangular movement", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", - "name": "RectangleMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", - "shortDescription": "Move objects in a rectangular pattern.", - "version": "1.0.2", - "description": [ - "Move objects in a rectangular pattern with easing functions from the Tween extension.", - "", - "It can be used for:", - "- Moveable platforms", - "- Enemy movement patterns", - "", - "An example allows to check some settings ([open the project online](https://editor.gdevelop.io/?project=example://rectangular-movement))." - ], - "origin": { - "identifier": "RectangleMovement", - "name": "gdevelop-extension-store" - }, - "tags": [ - "rectangular", - "movement", - "rectangle", - "patrol", - "platform", - "enemy" - ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [], "eventsBasedBehaviors": [ { "description": "Move objects in a rectangular pattern.", @@ -11183,8 +12817,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set the initial state according to the configuration.", - "comment2": "" + "comment": "Set the initial state according to the configuration." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11333,8 +12966,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update the rectangle when the object is moved outside of the behavior.", - "comment2": "" + "comment": "Update the rectangle when the object is moved outside of the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11374,8 +13006,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move the object on the rectangular path.", - "comment2": "" + "comment": "Move the object on the rectangular path." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11405,8 +13036,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the position to detect when the object is moved outside of the behavior.", - "comment2": "" + "comment": "Save the position to detect when the object is moved outside of the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11468,8 +13098,7 @@ "textG": 0, "textR": 0 }, - "comment": "Step on the path.", - "comment2": "" + "comment": "Step on the path." }, { "type": "BuiltinCommonInstructions::Standard", @@ -12644,6 +14273,53 @@ ], "objectGroups": [] }, + { + "description": "Check if the object is moving clockwise.", + "fullName": "Is moving clockwise", + "functionType": "Condition", + "name": "IsMovingClockwise", + "sentence": "_PARAM0_ is moving clockwise", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Check if the object is moving to the left.", "fullName": "Is moving left", @@ -14056,8 +15732,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update private properties through setters to check their values and initialize state.", - "comment2": "" + "comment": "Update private properties through setters to check their values and initialize state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14290,8 +15965,7 @@ "textG": 0, "textR": 0 }, - "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice.", - "comment2": "" + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14353,8 +16027,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration", - "comment2": "" + "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14392,8 +16065,7 @@ "textG": 0, "textR": 0 }, - "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough.", - "comment2": "" + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14742,8 +16414,7 @@ "textG": 0, "textR": 0 }, - "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed.", - "comment2": "" + "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16019,8 +17690,7 @@ "textG": 0, "textR": 0 }, - "comment": "Deprecated use SetOffsetXOp instead.", - "comment2": "" + "comment": "Deprecated use SetOffsetXOp instead." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16119,8 +17789,7 @@ "textG": 0, "textR": 0 }, - "comment": "Deprecated use SetOffsetYOp instead.", - "comment2": "" + "comment": "Deprecated use SetOffsetYOp instead." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16482,8 +18151,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode.", - "comment2": "" + "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16552,8 +18220,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use the object center when no delay is asked.", - "comment2": "" + "comment": "Use the object center when no delay is asked." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16689,8 +18356,7 @@ "textG": 0, "textR": 0 }, - "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting.", - "comment2": "" + "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting." }, { "infiniteLoopWarning": true, @@ -16775,8 +18441,7 @@ "textG": 0, "textR": 0 }, - "comment": "Don't move the camera if there is not enough history.", - "comment2": "" + "comment": "Don't move the camera if there is not enough history." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16843,8 +18508,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))", - "comment2": "" + "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16903,8 +18567,7 @@ "textG": 0, "textR": 0 }, - "comment": "The time with delay is now between the first 2 indexes", - "comment2": "" + "comment": "The time with delay is now between the first 2 indexes" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17349,8 +19012,7 @@ "textG": 0, "textR": 0 }, - "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions.", - "comment2": "" + "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions." }, { "infiniteLoopWarning": true, @@ -17492,8 +19154,7 @@ "textG": 0, "textR": 0 }, - "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must.", - "comment2": "" + "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must." }, { "type": "BuiltinCommonInstructions::Standard", @@ -17749,8 +19410,7 @@ "textG": 0, "textR": 0 }, - "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))", - "comment2": "" + "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17972,8 +19632,7 @@ "textG": 0, "textR": 0 }, - "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX", - "comment2": "" + "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18075,8 +19734,7 @@ "textG": 0, "textR": 0 }, - "comment": "Axis permutation to avoid a ratio between 2 numbers near 0.", - "comment2": "" + "comment": "Axis permutation to avoid a ratio between 2 numbers near 0." }, { "type": "BuiltinCommonInstructions::Standard", @@ -18173,8 +19831,7 @@ "textG": 0, "textR": 0 }, - "comment": "Permute back axis", - "comment2": "" + "comment": "Permute back axis" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18395,8 +20052,7 @@ "textG": 0, "textR": 0 }, - "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)", - "comment2": "" + "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19766,7 +21422,7 @@ "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.5.0", + "version": "0.6.1", "description": [ "Add support for gamepads (or other controllers).", "", @@ -19790,7 +21446,10 @@ "joysticks", "axis", "xbox", - "ps4" + "ps4", + "platformer", + "platform", + "top-down" ], "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", @@ -19870,11 +21529,11 @@ "objectGroups": [] }, { - "description": "Get the force value of a gamepad stick.\n0 is stick on default position, 1 is at the maximum.", - "fullName": "Value of a stick force", - "functionType": "Expression", + "description": "the force of gamepad stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", "name": "StickForce", - "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "sentence": "the gamepad _PARAM1_ _PARAM2_ stick force", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -19942,10 +21601,51 @@ }, { "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", + "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", @@ -20010,9 +21710,10 @@ }, { "description": "Get the value of axis of a gamepad stick.", - "fullName": "Value of a gamepad axis", + "fullName": "Value of a gamepad axis (deprecated)", "functionType": "Expression", "name": "AxisValue", + "private": true, "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", "events": [ { @@ -20157,6 +21858,120 @@ ], "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", @@ -23165,21 +24980,23 @@ "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", - "helpPath": "https://wiki.gdevelop.io/gdevelop5/extensions/multitouch-joystick/start", + "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.0.0", + "version": "1.2.2", "description": [ "Multitouch joysticks can be used the same way as physical gamepads:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters" + "- Controls mapping for top-down movement and platformer characters", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." ], "origin": { - "identifier": "MultitouchJoystick", + "identifier": "SpriteMultitouchJoystick", "name": "gdevelop-extension-store" }, "tags": [ @@ -23190,7 +25007,10 @@ "touchscreen", "twin stick", "shooter", - "virtual" + "virtual", + "platformer", + "platform", + "top-down" ], "authorIds": [ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", @@ -24005,8 +25825,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24057,7 +25876,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" }, { "description": "Direction", @@ -24085,8 +25905,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24137,8 +25956,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" }, { "description": "Direction", @@ -24151,9 +25970,10 @@ }, { "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", "events": [ { @@ -24165,7 +25985,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + "SpriteMultitouchJoystick::StickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" ] } ] @@ -24183,7 +26003,48 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" } ], "objectGroups": [] @@ -24234,9 +26095,50 @@ }, { "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", "sentence": "", "events": [ { @@ -24266,7 +26168,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" } ], "objectGroups": [] @@ -24314,6 +26217,86 @@ } ], "objectGroups": [] + }, + { + "description": "Return the multitouch contoller 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::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * cos(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller 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::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * sin(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [ @@ -24440,16 +26423,6 @@ "Behavior", "" ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Resumed!!!\"", - "", - "" - ] } ] }, @@ -24564,8 +26537,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24666,7 +26638,7 @@ "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", + "description": "the joystick force (from 0 to 1).", "fullName": "Joystick force", "functionType": "ExpressionAndCondition", "name": "JoystickForce", @@ -24706,12 +26678,105 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "JoystickForce", - "name": "SetJoystickForce", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyJoystickForce()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", "private": true, - "sentence": "", + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24719,7 +26784,7 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" }, "parameters": [ "Object", @@ -24730,13 +26795,13 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::SetJoystickForce" + "value": "SpriteMultitouchJoystick::SetJoystickAngle" }, "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickForce()", + "Object.Behavior::PropertyJoystickAngle()", "" ] } @@ -24754,15 +26819,20 @@ "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", "functionType": "Expression", - "name": "JoystickAngle", + "name": "StickForceX", "sentence": "", "events": [ { @@ -24774,7 +26844,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyJoystickAngle()" + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" ] } ] @@ -24799,12 +26869,11 @@ "objectGroups": [] }, { - "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Action", - "name": "SetJoystickAngle", - "private": true, - "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "description": "Return the 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::Standard", @@ -24812,30 +26881,18 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::SetJoystickAngle" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickAngle()", - "" + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -24847,11 +26904,6 @@ "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" - }, - { - "description": "Angle", - "name": "Value", - "type": "expression" } ], "objectGroups": [] @@ -26035,11 +28087,14 @@ }, { "value": "Primary", - "type": "String", + "type": "Choice", "label": "Joystick name", "description": "", "group": "Controls", - "extraInformation": [], + "extraInformation": [ + "Primary", + "Secondary" + ], "hidden": false, "name": "JoystickIdentifier" }, @@ -26073,7 +28128,7 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", @@ -26091,8 +28146,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), ToString(Object.Behavior::PropertyJoystickIdentifier()))", - "SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), ToString(Object.Behavior::PropertyJoystickIdentifier()))" + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" ] } ] @@ -26102,7 +28157,7 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", @@ -26120,8 +28175,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), ToString(Object.Behavior::PropertyJoystickIdentifier()))", - "sign(SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), ToString(Object.Behavior::PropertyJoystickIdentifier())))" + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "sign(SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" ] } ] @@ -26131,7 +28186,7 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", @@ -26169,7 +28224,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Left\"", "" ] @@ -26197,7 +28252,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Right\"", "" ] @@ -26225,7 +28280,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Up\"", "" ] @@ -26253,7 +28308,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Down\"", "" ] @@ -26298,7 +28353,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Left\"", "" ] @@ -26326,7 +28381,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Right\"", "" ] @@ -26354,7 +28409,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Up\"", "" ] @@ -26382,7 +28437,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"Down\"", "" ] @@ -26410,7 +28465,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"UpLeft\"", "" ] @@ -26447,7 +28502,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"UpRight\"", "" ] @@ -26484,7 +28539,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"DownLeft\"", "" ] @@ -26521,7 +28576,7 @@ "parameters": [ "", "Object.Behavior::PropertyControllerIdentifier()", - "ToString(Object.Behavior::PropertyJoystickIdentifier())", + "Object.Behavior::PropertyJoystickIdentifier()", "\"DownRight\"", "" ] @@ -26594,11 +28649,14 @@ }, { "value": "Primary", - "type": "Number", + "type": "Choice", "label": "Joystick name", "description": "", "group": "", - "extraInformation": [], + "extraInformation": [ + "Primary", + "Secondary" + ], "hidden": false, "name": "JoystickIdentifier" }, @@ -26713,6 +28771,15 @@ "Object", "" ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] } ] } @@ -26929,11 +28996,11 @@ "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", "functionType": "Condition", "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "sentence": "Stick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -26967,21 +29034,16 @@ "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "the joystick force", "events": [ { @@ -26993,7 +29055,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickForce()" + "Border.MultitouchJoystick::JoystickForce()" ] } ] @@ -27008,21 +29070,121 @@ "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" - }, + } + ], + "objectGroups": [] + }, + { + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" } ], "objectGroups": [] }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, "sentence": "", "events": [ { @@ -27034,7 +29196,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickAngle()" + "Border.MultitouchJoystick::JoystickAngle()" ] } ] @@ -27049,12 +29211,41 @@ "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" - }, + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" } ], "objectGroups": [] @@ -27389,11 +29580,14 @@ }, { "value": "Primary", - "type": "String", + "type": "Choice", "label": "Joystick name", "description": "", "group": "", - "extraInformation": [], + "extraInformation": [ + "Primary", + "Secondary" + ], "hidden": false, "name": "JoystickIdentifier" }, @@ -27454,6 +29648,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Thumb", "tags": "", @@ -27477,6 +29672,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Border", "tags": "", @@ -27518,34 +29714,24 @@ }, { "author": "Tristan Rhodes (https://victrisgames.itch.io/)", - "category": "", + "category": "Visual effect", "extensionNamespace": "", - "fullName": "Shake Object (position, angle, scale)", + "fullName": "Shake object", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", - "shortDescription": "Shake an object, using one or more ways to shake (position, angle, scale).", - "version": "1.5.5", + "shortDescription": "Shake an object.", + "version": "1.5.6", "description": [ - "Select one or more methods of shaking:", - "- Position: Shake the X and/or Y position of the object ", - "- Angle: Shake the angle (rotation) of the object ", - "- Scale: Shake the scale of the object (must be a sprite)", + "Shake an object (position, angle or scale).", "", - "Control how the object shakes:", - "- Amplitude: How far the object moves during each shake", - "- Duration: Amount of time to shake the object", - "- Time between shakes: Amount of time between each movement of the object", - "- Keep shaking until stopped (boolean)", + "It can be used for:", + "- Hit or impact", + "- Object slowly rocking back and forth (like a ship)", + "- Simulate engine vibration, earthquake, or pulsing", "", - "Tips:", - "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", - "- To make the single-shake move in the opposite direction, use negative numbers ", - "- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" ", - "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", - "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", - "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing" + "The top-down RPG example uses this extension for damage animations ([open the project online](https://editor.gdevelop.io/?project=example://top-down-rpg))." ], "origin": { "identifier": "ShakeObject", @@ -27574,7 +29760,7 @@ "objectType": "", "eventsFunctions": [ { - "description": "Shake an object, using one or more ways to shake (position, angle).", + "description": "Shake an object, using one or more ways to shake (position, angle). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", "fullName": "Shake object (position, angle)", "functionType": "Action", "name": "ShakeObject_PositionAngle", @@ -27599,8 +29785,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27627,8 +29812,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27701,8 +29885,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27755,8 +29938,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27826,8 +30008,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27868,8 +30049,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27910,8 +30090,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27958,6 +30137,7 @@ }, { "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", "name": "PowerY", "type": "expression" }, @@ -27968,6 +30148,7 @@ }, { "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", "name": "TimeBetweenShakes", "type": "expression" }, @@ -28031,8 +30212,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28090,8 +30270,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28168,8 +30347,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28266,8 +30444,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28321,8 +30498,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28370,8 +30546,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -28383,8 +30558,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28473,8 +30647,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28565,8 +30738,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -28595,8 +30767,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -28608,8 +30779,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28649,8 +30819,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -28662,8 +30831,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28705,8 +30873,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28749,8 +30916,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28779,8 +30945,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28809,8 +30974,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28879,8 +31043,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28922,8 +31085,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28962,8 +31124,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28996,8 +31157,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29025,8 +31185,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29095,8 +31254,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29138,8 +31296,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29178,8 +31335,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29229,8 +31385,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29315,8 +31470,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29413,8 +31567,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29593,7 +31746,7 @@ "objectType": "Sprite", "eventsFunctions": [ { - "description": "Shake an object, using one or more ways to shake (position, angle, scale).", + "description": "Shake an object, using one or more ways to shake (position, angle, scale). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters.", "fullName": "Shake object (position, angle, scale)", "functionType": "Action", "name": "ShakeObject_PositionAngleScale", @@ -29618,8 +31771,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29646,8 +31798,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29731,8 +31882,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29785,8 +31935,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29856,8 +32005,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29898,8 +32046,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29940,8 +32087,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29989,6 +32135,7 @@ }, { "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", "name": "PowerY", "type": "expression" }, @@ -30004,6 +32151,7 @@ }, { "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", "name": "TimeBetweenShakes", "type": "expression" }, @@ -30067,8 +32215,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30126,8 +32273,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30205,8 +32351,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30331,8 +32476,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30397,8 +32541,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30446,8 +32589,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30459,8 +32601,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30549,8 +32690,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30641,8 +32781,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -30671,8 +32810,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30684,8 +32822,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30725,8 +32862,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30738,8 +32874,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30781,8 +32916,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Scale shake", - "comment2": "" + "comment": "Calculate Scale shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30811,8 +32945,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate object scale displacement, with linear decay over time", - "comment2": "" + "comment": "Calculate object scale displacement, with linear decay over time" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30824,8 +32957,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30837,8 +32969,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every even shake, increase scale", - "comment2": "" + "comment": "Every even shake, increase scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30878,8 +33009,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, decrease scale", - "comment2": "" + "comment": "Every \"odd\" shake, decrease scale" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30891,8 +33021,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30934,8 +33063,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30978,8 +33106,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31008,8 +33135,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31038,8 +33164,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31108,8 +33233,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31151,8 +33275,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31191,8 +33314,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31223,8 +33345,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31263,8 +33384,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31297,8 +33417,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31326,8 +33445,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31396,8 +33514,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31439,8 +33556,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31479,8 +33595,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31511,8 +33626,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31551,8 +33665,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31602,8 +33715,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31688,8 +33800,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31814,8 +33925,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32172,8 +34282,7 @@ "textG": 0, "textR": 0 }, - "comment": "Disable the behavior that moved the fly up and down, add a downward force (90 degrees = down) and make fly rotate back and forth", - "comment2": "" + "comment": "Disable the behavior that moved the fly up and down, add a downward force (90 degrees = down) and make fly rotate back and forth" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32233,7 +34342,6 @@ { "description": "", "name": "Fly", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -32288,7 +34396,6 @@ { "description": "", "name": "Fly", - "supplementaryInformation": "Sprite", "type": "objectList" } ], @@ -32300,7 +34407,7 @@ "description": "", "fullName": "", "name": "MonsterEnemy", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -32318,8 +34425,7 @@ "textG": 0, "textR": 0 }, - "comment": "Timers must be started with an action", - "comment2": "" + "comment": "Timers must be started with an action" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32336,10 +34442,12 @@ }, { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "\"Fire\"" ] } @@ -32350,7 +34458,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -32378,8 +34485,7 @@ "textG": 0, "textR": 0 }, - "comment": "Turn \"Fire\" on and off", - "comment2": "" + "comment": "Turn \"Fire\" on and off" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32397,11 +34503,12 @@ }, { "type": { - "value": "AnimationName" + "value": "Enemy::MonsterEnemy::IsOnFire" }, "parameters": [ "Object", - "\"Fire\"" + "Behavior", + "" ] } ], @@ -32417,10 +34524,12 @@ }, { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "\"NoFire\"" ] } @@ -32442,11 +34551,13 @@ }, { "type": { - "value": "AnimationName" + "inverted": true, + "value": "Enemy::MonsterEnemy::IsOnFire" }, "parameters": [ "Object", - "\"NoFire\"" + "Behavior", + "" ] } ], @@ -32462,10 +34573,12 @@ }, { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", + "Animation", + "=", "\"Fire\"" ] } @@ -32476,7 +34589,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -32500,10 +34612,12 @@ "conditions": [ { "type": { - "value": "AnimationName" + "value": "AnimatableCapability::AnimatableBehavior::Name" }, "parameters": [ "Object", + "Animation", + "=", "\"Fire\"" ] } @@ -32524,7 +34638,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -32537,7 +34650,20 @@ "objectGroups": [] } ], - "propertyDescriptors": [], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "description": "", + "group": "", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "hidden": false, + "name": "Animation" + } + ], "sharedPropertyDescriptors": [] } ], @@ -32630,7 +34756,6 @@ { "description": "", "name": "Player", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -32684,7 +34809,6 @@ { "description": "", "name": "Player", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -32713,8 +34837,7 @@ "textG": 0, "textR": 0 }, - "comment": "If player is dead, move back to the last saved checkpoint position", - "comment2": "" + "comment": "If player is dead, move back to the last saved checkpoint position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32752,7 +34875,6 @@ { "description": "", "name": "Player", - "supplementaryInformation": "Sprite", "type": "objectList" } ], @@ -32779,10 +34901,12 @@ }, { "type": { - "value": "AnimationName" + "value": "AnimatableCapability::AnimatableBehavior::Name" }, "parameters": [ "Player", + "Animation", + "=", "\"Run\"" ] },