diff --git a/examples/starting-2d-car-racing/starting-2d-car-racing.json b/examples/starting-2d-car-racing/starting-2d-car-racing.json index 22733cdb1..a03bde85d 100644 --- a/examples/starting-2d-car-racing/starting-2d-car-racing.json +++ b/examples/starting-2d-car-racing/starting-2d-car-racing.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -190,8 +190,7 @@ "name": "assets\\NotoSansArabicUI-Black.ttf", "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -215,14 +214,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.26364576737708634, + "zoomFactor": 0.40575189059439243, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -572,6 +574,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "PlayerCar", + "persistentUuid": "bc893032-25f0-4609-8c66-002a17772982", "type": "Sprite", "updateIfNotVisible": false, "variables": [ @@ -706,6 +709,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BushObstacle", + "persistentUuid": "933dead8-3d82-4205-b261-650c47e60988", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -817,6 +821,7 @@ { "assetStoreId": "112c69f62e03fa6df7716cc6b8f174c17857fbf71c8d3fffd16fa8fdbfa49bf1", "name": "SteeringJoystick", + "persistentUuid": "6f61e3df-63ad-4216-b0b1-f5d9814e8947", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variant": "", "variables": [], @@ -996,6 +1001,7 @@ { "assetStoreId": "", "name": "Road", + "persistentUuid": "c46588e1-5005-4da7-9427-d13b93c58d0f", "type": "TileMap::SimpleTileMap", "variables": [], "effects": [], @@ -1091,6 +1097,7 @@ "height": 32, "leftMargin": 10, "name": "WallObstacle", + "persistentUuid": "6824bd6e-1e5a-4344-8d13-a5cccb00919f", "rightMargin": 10, "texture": "assets\\StartingWall.png", "tiled": false, @@ -1649,7 +1656,6 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "folded": true, "name": "Racing", "source": "", "type": "BuiltinCommonInstructions::Group", @@ -1842,6 +1848,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1870,6 +1877,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1887,6 +1895,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1955,6 +1964,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3939,12 +3949,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4843,6 +4935,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4923,6 +5016,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -5003,6 +5097,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -5095,6 +5190,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5144,13 +5309,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5637,6 +5830,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5687,13 +5900,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5867,6 +6108,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5909,13 +6158,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6010,6 +6283,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6052,13 +6333,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6142,6 +6447,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6184,13 +6497,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6431,6 +6768,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -6511,6 +6849,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6591,6 +6930,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6671,6 +7011,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6751,6 +7092,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6831,6 +7173,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6911,6 +7254,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6991,6 +7335,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -7071,6 +7416,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -7107,6 +7453,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7226,26 +7657,95 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ @@ -7345,6 +7845,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7404,13 +7912,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7917,6 +8452,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7972,7 +8515,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7986,8 +8550,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8066,6 +8633,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -8092,6 +8660,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -9046,6 +9615,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -9118,6 +9688,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -9190,6 +9761,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -9223,6 +9795,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -9301,6 +9952,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -9308,6 +9988,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": ">=5.5.222", @@ -9347,12 +10028,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11252,6 +11939,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -11392,6 +12080,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ @@ -13749,6 +14438,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -14111,13 +14935,184 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -14335,6 +15330,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14456,11 +15459,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-2d-driving/starting-2d-driving.json b/examples/starting-2d-driving/starting-2d-driving.json index f94b3e581..f26582298 100644 --- a/examples/starting-2d-driving/starting-2d-driving.json +++ b/examples/starting-2d-driving/starting-2d-driving.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -167,8 +167,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -192,14 +191,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.2912258866911175, + "zoomFactor": 0.3925161175488307, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -831,6 +833,7 @@ { "assetStoreId": "", "name": "Road", + "persistentUuid": "ab6a41e7-dfa2-43e0-9626-2bb27b7401fb", "type": "TileMap::SimpleTileMap", "variables": [], "effects": [], @@ -1316,6 +1319,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1344,6 +1348,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1408,6 +1413,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3392,12 +3398,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4296,6 +4384,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4376,6 +4465,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4456,6 +4546,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4548,6 +4639,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4597,13 +4758,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5090,6 +5279,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5140,13 +5349,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5320,6 +5557,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5362,13 +5607,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5463,6 +5732,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5505,13 +5782,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5595,6 +5896,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5637,13 +5946,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5884,6 +6217,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5964,6 +6298,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6044,6 +6379,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6124,6 +6460,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6204,6 +6541,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6284,6 +6622,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6364,6 +6703,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6444,6 +6784,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6524,6 +6865,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6560,6 +6902,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6679,13 +7106,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6798,6 +7294,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6857,13 +7361,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7370,6 +7901,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7425,7 +7964,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7439,8 +7999,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7519,6 +8082,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7545,6 +8109,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8499,6 +9064,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8571,6 +9137,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8643,6 +9210,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8676,6 +9244,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8754,6 +9401,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8761,6 +9437,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": ">=5.5.222", @@ -8800,12 +9477,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10705,6 +11388,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10845,6 +11529,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ @@ -13202,6 +13887,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13564,13 +14384,184 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13788,6 +14779,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13909,11 +14908,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-2d-platformer-shooter/starting-2d-platformer-shooter.json b/examples/starting-2d-platformer-shooter/starting-2d-platformer-shooter.json index bea17a48d..9e4a204d6 100644 --- a/examples/starting-2d-platformer-shooter/starting-2d-platformer-shooter.json +++ b/examples/starting-2d-platformer-shooter/starting-2d-platformer-shooter.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -179,8 +179,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -204,14 +203,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5843784410740976, + "zoomFactor": 0.6040838749988916, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -592,6 +594,7 @@ "assetStoreId": "", "height": 64, "name": "Background", + "persistentUuid": "bf92da0a-f09f-43bd-9589-c8048d1a6cbc", "texture": "assets\\Background.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, @@ -1201,6 +1204,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1218,6 +1222,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1246,6 +1251,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1333,6 +1339,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1341,7 +1348,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1373,12 +1380,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2452,6 +2465,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2519,13 +2567,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2820,6 +2893,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -2900,6 +2974,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -2980,6 +3055,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -3016,6 +3092,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3060,13 +3170,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3270,6 +3407,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3350,6 +3488,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3430,6 +3569,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3466,6 +3606,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3510,13 +3684,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3833,6 +4034,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -4352,6 +4650,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4432,6 +4731,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4512,6 +4812,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4593,6 +4894,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -4674,6 +4976,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -4754,6 +5057,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -4834,6 +5138,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -4870,6 +5175,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5226,6 +5610,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5297,32 +5688,108 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Smoothly resize buttons according to their state.", - "fullName": "Button scale tween", - "name": "ButtonScaleTween", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ScalableCapability::ScalableBehavior::SetValue" - }, - "parameters": [ - "Object", - "Scale", - "=", + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", + "name": "ButtonScaleTween", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", "IdleScale" ] } @@ -5713,6 +6180,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -5793,6 +6261,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -5873,6 +6342,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -5953,6 +6423,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -6033,6 +6504,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6114,6 +6586,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6195,6 +6668,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6231,6 +6705,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6607,13 +7145,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -7024,6 +7612,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -7106,6 +7695,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -7188,6 +7778,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -7270,6 +7861,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7352,6 +7944,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7435,6 +8028,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7518,6 +8112,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7555,6 +8150,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7918,7 +8577,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -7926,6 +8629,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -9910,12 +10614,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -10814,6 +11600,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -10894,6 +11681,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -10974,6 +11762,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -11066,38 +11855,108 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "String", - "label": "Joystick name", - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "name": "DeadZoneRadius" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick angle (range: -180 to 180)", - "hidden": true, - "name": "JoystickAngle" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick force (range: 0 to 1)", - "hidden": true, + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "String", + "label": "Joystick name", + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "hidden": true, "name": "JoystickForce" }, { @@ -11115,13 +11974,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11608,6 +12495,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -11658,13 +12565,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11838,6 +12773,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11880,13 +12823,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11981,6 +12948,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -12023,13 +12998,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -12113,6 +13112,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -12155,13 +13162,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -12402,6 +13433,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -12482,6 +13514,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -12562,6 +13595,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -12642,6 +13676,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -12722,6 +13757,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -12802,6 +13838,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -12882,6 +13919,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -12962,6 +14000,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -13042,6 +14081,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -13078,6 +14118,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13197,13 +14322,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13316,6 +14510,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13375,13 +14577,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13888,8 +15117,16 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { "value": "", "type": "Behavior", "label": "Top-down movement behavior", @@ -13943,7 +15180,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -13957,8 +15215,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -14037,6 +15298,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -14063,6 +15325,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -15017,6 +16280,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -15089,6 +16353,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -15161,6 +16426,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -15194,6 +16460,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -15272,6 +16617,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -15279,15 +16653,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -15318,12 +16693,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15481,11 +16863,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -15520,11 +16901,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -15582,12 +16964,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -15681,22 +17063,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -15838,22 +17220,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -16031,46 +17413,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -16107,22 +17485,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -16177,11 +17555,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -16224,11 +17601,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16274,44 +17650,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -16477,11 +17849,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -16492,22 +17864,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -16527,7 +17901,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -16547,11 +17921,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -16562,22 +17936,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -16597,7 +17973,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -16617,13 +17993,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -16643,7 +18018,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -16663,13 +18038,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -16689,7 +18063,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -16709,13 +18083,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -16735,7 +18108,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -16755,13 +18128,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -16781,7 +18153,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -16801,13 +18173,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16826,8 +18197,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -16847,13 +18218,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16873,7 +18243,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16893,13 +18263,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16919,7 +18288,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16939,13 +18308,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16965,7 +18333,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16985,24 +18353,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -17022,7 +18388,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17042,24 +18408,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -17079,7 +18443,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17099,24 +18463,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -17136,7 +18498,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17156,24 +18518,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -17193,7 +18553,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17244,6 +18604,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -17253,11 +18614,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -17313,7 +18673,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -17334,7 +18694,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -17385,32 +18745,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -17442,6 +18790,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -17495,13 +18855,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -17521,7 +18880,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -17541,13 +18900,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -17567,7 +18925,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -17837,22 +19195,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -18058,22 +19414,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -18136,11 +19490,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -18184,22 +19537,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -18290,11 +19641,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -18336,11 +19686,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -18349,11 +19698,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -18498,11 +19846,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -18555,22 +19902,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18731,22 +20076,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -18786,22 +20129,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18826,22 +20167,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18855,22 +20194,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18883,11 +20220,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -18912,22 +20248,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18941,22 +20275,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18969,11 +20301,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -19027,44 +20358,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -19078,44 +20405,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -19166,22 +20489,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -19260,22 +20581,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -19362,22 +20681,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -19448,33 +20765,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -19487,33 +20801,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -19574,22 +20885,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -19669,22 +20978,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19697,22 +21004,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19798,56 +21103,191 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "0.9", - "type": "Number", - "label": "Leftward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "LeftwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Rightward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "RightwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Upward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "UpwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Downward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "DownwardSpeed" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on X axis", - "name": "FollowOnX" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on Y axis", - "name": "FollowOnY" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Follow free area left border", - "group": "Position", - "advanced": true, - "name": "FollowFreeAreaLeft" - }, + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.9", + "type": "Number", + "label": "Leftward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "LeftwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Rightward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "RightwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "UpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "DownwardSpeed" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on X axis", + "name": "FollowOnX" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on Y axis", + "name": "FollowOnY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area left border", + "group": "Position", + "advanced": true, + "name": "FollowFreeAreaLeft" + }, { "value": "0", "type": "Number", @@ -20160,13 +21600,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -20383,6 +21995,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20504,7 +22124,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -20512,15 +22196,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -20563,34 +22248,145 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "eventsFunctions": [ { - "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", - "fullName": "Fire bullets", - "name": "FireBullet", - "objectType": "", - "eventsFunctions": [ + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"__FireBullet.FiringCooldown\"" - ] - }, - { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", + "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] + }, + { "type": { "value": "SetNumberVariable" }, @@ -21941,6 +23737,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -22074,6 +23871,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -22207,6 +24005,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -22340,6 +24139,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -22690,6 +24490,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -22823,6 +24624,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -22956,6 +24758,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -23089,6 +24892,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -23222,6 +25026,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -23355,6 +25160,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -23635,6 +25441,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -23869,6 +25676,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -24002,6 +25810,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -25239,8 +27048,311 @@ } ], "objectGroups": [] + }, + { + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, "propertyDescriptors": [ { "value": "0.1", @@ -25248,17 +27360,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -25266,9 +27373,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -25278,7 +27382,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -25287,7 +27390,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -25297,7 +27399,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -25308,7 +27409,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -25316,9 +27416,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -25328,7 +27425,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -25339,7 +27435,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -25347,9 +27442,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -25357,9 +27450,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -25368,8 +27458,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -25377,9 +27465,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -25387,9 +27472,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -25397,118 +27480,764 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, { - "value": "true", - "type": "Boolean", - "label": "Unlimited ammo", - "description": "", - "group": "Ammo", - "extraInformation": [], - "advanced": true, - "name": "UnlimitedAmmo" - }, + "value": "true", + "type": "Boolean", + "label": "Unlimited ammo", + "group": "Ammo", + "advanced": true, + "name": "UnlimitedAmmo" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ReloadInProgress" + }, + { + "value": "0", + "type": "Number", + "label": "Heat increase per shot (between 0 and 1)", + "description": " Object is overheated when Heat reaches 1.", + "group": "Overheat", + "advanced": true, + "name": "HeatIncreasePerShot" + }, + { + "value": "0", + "type": "Number", + "label": "Heat level (Range: 0 to 1)", + "hidden": true, + "name": "HeatLevel" + }, + { + "value": "true", + "type": "Boolean", + "label": "Reload automatically", + "group": "Reload", + "advanced": true, + "name": "AutomaticReloading" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Overheat duration", + "description": "Object cannot shoot while overheat duration is active.", + "group": "Overheat", + "advanced": true, + "name": "OverheatDuration" + }, + { + "value": "0.1", + "type": "Number", + "label": "Linear cooling rate (per second)", + "group": "Overheat", + "advanced": true, + "name": "LinearCoolingRate" + }, + { + "value": "0.3", + "type": "Number", + "label": "Exponential cooling rate (per second)", + "description": "Happens faster when heat is high and slower when heat is low.", + "group": "Overheat", + "extraInformation": [ + "Linear", + "Exponential" + ], + "choices": [], + "advanced": true, + "name": "ExponentialCoolingRate" + }, + { + "value": "", + "type": "String", + "label": "Layer the bullets are created on", + "description": "Base layer by default.", + "group": "Shooting configuration", + "hidden": true, + "name": "BulletLayer" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "RandomizedAngle" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ { "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ReloadInProgress" - }, - { - "value": "0", - "type": "Number", - "label": "Heat increase per shot (between 0 and 1)", - "description": " Object is overheated when Heat reaches 1.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "HeatIncreasePerShot" - }, - { - "value": "0", - "type": "Number", - "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HeatLevel" - }, - { - "value": "true", - "type": "Boolean", - "label": "Reload automatically", - "description": "", - "group": "Reload", - "extraInformation": [], - "advanced": true, - "name": "AutomaticReloading" - }, - { - "value": "0", - "type": "Number", - "unit": "Second", - "label": "Overheat duration", - "description": "Object cannot shoot while overheat duration is active.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "OverheatDuration" - }, - { - "value": "0.1", - "type": "Number", - "label": "Linear cooling rate (per second)", - "description": "", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "LinearCoolingRate" - }, - { - "value": "0.3", - "type": "Number", - "label": "Exponential cooling rate (per second)", - "description": "Happens faster when heat is high and slower when heat is low.", - "group": "Overheat", + "type": "Behavior", + "label": "3D capability", "extraInformation": [ - "Linear", - "Exponential" + "Scene3D::Base3DBehavior" ], - "advanced": true, - "name": "ExponentialCoolingRate" + "choices": [], + "name": "Object3D" }, { "value": "", - "type": "String", - "label": "Layer the bullets are created on", - "description": "Base layer by default.", - "group": "Shooting configuration", - "extraInformation": [], - "hidden": true, - "name": "BulletLayer" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "RandomizedAngle" + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] @@ -25516,6 +28245,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Platformer character animator", "gdevelopVersion": ">=5.5.222", @@ -25547,12 +28277,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Change animations and horizontal flipping of a platformer character automatically.", "fullName": "Platformer character animator", + "helpPath": "", + "iconUrl": "", "name": "PlatformerCharacterAnimator", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -26777,6 +29513,43 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onActivate" + }, + { + "functionName": "EnableChangingAnimations" + }, + { + "functionName": "EnableHorizontalFlipping" + }, + { + "folderName": "Configure animations", + "children": [ + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "SetMoveAnimationName" + }, + { + "functionName": "SetJumpAnimationName" + }, + { + "functionName": "SetFallAnimationName" + }, + { + "functionName": "SetClimbAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -26856,11 +29629,50 @@ "name": "Flippable" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "EnableAnimationChanges" + }, + { + "propertyName": "EnableHorizontalFlipping" + }, + { + "folderName": "Animation names", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "RunAnimationName" + }, + { + "propertyName": "JumpAnimationName" + }, + { + "propertyName": "FallAnimationName" + }, + { + "propertyName": "ClimbAnimationName" + } + ] + }, + { + "propertyName": "PlatformerBehavior" + }, + { + "propertyName": "Animation" + }, + { + "propertyName": "Flippable" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3D-platformer/assets/StarterPushable.png b/examples/starting-3D-platformer/assets/StarterPushable.png index fe58d8cbf..95088c6de 100644 Binary files a/examples/starting-3D-platformer/assets/StarterPushable.png and b/examples/starting-3D-platformer/assets/StarterPushable.png differ diff --git a/examples/starting-3D-platformer/assets/StartingGround.png b/examples/starting-3D-platformer/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-3D-platformer/assets/StartingGround.png and b/examples/starting-3D-platformer/assets/StartingGround.png differ diff --git a/examples/starting-3D-platformer/assets/StartingWall.png b/examples/starting-3D-platformer/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-3D-platformer/assets/StartingWall.png and b/examples/starting-3D-platformer/assets/StartingWall.png differ diff --git a/examples/starting-3D-platformer/starting-3D-platformer.json b/examples/starting-3D-platformer/starting-3D-platformer.json index e909f0704..4745cb44c 100644 --- a/examples/starting-3D-platformer/starting-3D-platformer.json +++ b/examples/starting-3D-platformer/starting-3D-platformer.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3D-platformer", "description": "", @@ -238,7 +237,7 @@ "metadata": "", "name": "assets/CoinPickUp.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false } @@ -262,7 +261,7 @@ "title": "", "v": 255, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, @@ -272,8 +271,8 @@ "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 0.36732575450589633, + "snap": false, + "zoomFactor": 0.5117784035210373, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -282,11 +281,13 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "ddbd5abc-fb86-427c-b240-e8b653b93b3c", "type": "string", "value": "Keyboard" }, { "name": "IsCameraLocked", + "persistentUuid": "690e89c7-0fce-446f-9764-7d695c2d8f98", "type": "boolean", "value": false } @@ -314,7 +315,7 @@ { "angle": 0, "customSize": true, - "depth": 120, + "depth": 128, "height": 128, "layer": "", "name": "Obstacle", @@ -330,7 +331,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 192, "layer": "", "name": "Obstacle", @@ -454,14 +455,14 @@ { "angle": 0, "customSize": true, - "depth": 60, + "depth": 64, "height": 128, "layer": "", "name": "PushableBox", "persistentUuid": "23eef725-fc64-4eec-8627-4bfb97898d8a", "width": 256, "x": 512, - "y": 455, + "y": 448, "zOrder": 5, "numberProperties": [], "stringProperties": [], @@ -479,7 +480,7 @@ "width": 0, "x": 561, "y": 16, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -497,7 +498,7 @@ "width": 0, "x": 561, "y": 80, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -515,7 +516,7 @@ "width": 0, "x": 561, "y": -48, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -533,7 +534,7 @@ "width": 0, "x": 719, "y": 16, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -551,7 +552,7 @@ "width": 0, "x": 719, "y": 80, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -569,7 +570,7 @@ "width": 0, "x": 719, "y": -48, - "z": 200, + "z": 226, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -642,6 +643,72 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "961ee194-cfab-4b45-bbc5-6c0916fe4aff", + "width": 2048, + "x": -384, + "y": -640, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "23f4c6c7-895b-4b3e-bef2-dd31e1f29410", + "width": 2048, + "x": -384, + "y": 1152, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "layer": "", + "name": "Obstacle", + "persistentUuid": "19af2973-d5c5-43a6-96dc-411bbeb35d78", + "width": 64, + "x": -384, + "y": -576, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "layer": "", + "name": "Obstacle", + "persistentUuid": "a4eb76b2-025f-4b7f-9c9c-d7beb89cd17b", + "width": 64, + "x": 1600, + "y": -576, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -871,9 +938,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -889,12 +956,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -947,7 +1014,7 @@ "shapeDimensionB": 0, "shapeDimensionC": 0, "density": 10, - "friction": 3, + "friction": 2.75, "restitution": 0.1, "linearDamping": 4, "angularDamping": 5, @@ -964,9 +1031,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StarterPushable.png", @@ -982,12 +1049,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -2221,6 +2288,7 @@ "elevation": 45, "frustumSize": 4000, "intensity": 0.75, + "minimumShadowBias": 0, "rotation": 30 }, "stringParameters": { diff --git a/examples/starting-3d-car-racing/assets/StartingGround.png b/examples/starting-3d-car-racing/assets/StartingGround.png index e3e68a63c..1c66f9341 100644 Binary files a/examples/starting-3d-car-racing/assets/StartingGround.png and b/examples/starting-3d-car-racing/assets/StartingGround.png differ diff --git a/examples/starting-3d-car-racing/starting-3d-car-racing.json b/examples/starting-3d-car-racing/starting-3d-car-racing.json index 1223cbfbd..f9734e5d8 100644 --- a/examples/starting-3d-car-racing/starting-3d-car-racing.json +++ b/examples/starting-3d-car-racing/starting-3d-car-racing.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-3d-driving", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3d-car-racing", "description": "", @@ -246,7 +245,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.3437520241612483, + "zoomFactor": 0.49508400737491426, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -276,16 +275,15 @@ "angle": 0, "customSize": true, "depth": 255, - "height": 320, + "height": 256, "layer": "", - "locked": true, "name": "Road_3D", "persistentUuid": "7e18d5f9-dfff-4bca-840a-a8089a7fa03e", "rotationY": 75, - "width": 192, - "x": -79, - "y": 157, - "z": -188, + "width": 271, + "x": -97, + "y": 192, + "z": -227, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -763,6 +761,142 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "d341bbe5-226f-49e6-858f-bb6b168ef06e", + "width": 2496, + "x": -640, + "y": 832, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "e0ad31b9-ce4c-44a9-b145-002eee2900a0", + "width": 4672, + "x": -1664, + "y": -256, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "96b1d772-a817-4590-bae0-7b3083345a91", + "width": 4672, + "x": -1728, + "y": 3136, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "341a0214-5a04-4b02-a96f-a62a222b311c", + "width": 2496, + "x": -576, + "y": 2048, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 3392, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "6c501c40-2cd2-47fd-b966-6c73cc7c5d5e", + "width": 64, + "x": 2944, + "y": -192, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 3392, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "3f4d6a10-2ade-4911-9018-933071b57003", + "width": 64, + "x": -1728, + "y": -256, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1216, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "b0b67c52-f2e0-4d6e-bf8a-b381ee0584ce", + "width": 64, + "x": -640, + "y": 896, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1216, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "a6aab085-b1ef-47b7-afdc-067bd06711fa", + "width": 64, + "x": 1856, + "y": 832, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1269,6 +1403,7 @@ { "assetStoreId": "", "name": "FinishLine_3D", + "persistentUuid": "91cf8a93-038f-4ba8-bdb9-c8b6f793d194", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -1425,6 +1560,74 @@ ] } ] + }, + { + "assetStoreId": "", + "name": "Walls_3D", + "persistentUuid": "9302e7e5-3ae1-4c52-9244-72b5350b712e", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 7, + "restitution": 0, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets\\StartingFinishLine.png", + "backFaceResourceName": "assets\\StartingFinishLine.png", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets\\StartingFinishLine.png", + "rightFaceResourceName": "assets\\StartingFinishLine.png", + "topFaceResourceName": "assets\\StartingFinishLine.png", + "bottomFaceResourceName": "assets\\StartingFinishLine.png", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } } ], "objectsFolderStructure": { @@ -1433,6 +1636,9 @@ { "objectName": "Road_3D" }, + { + "objectName": "Walls_3D" + }, { "objectName": "FinishLine_3D" }, @@ -1682,7 +1888,7 @@ "elevation": 40, "frustumSize": 2500, "intensity": 0.75, - "minimumShadowBias": 0.0001, + "minimumShadowBias": 0.00001, "rotation": 300 }, "stringParameters": { diff --git a/examples/starting-3d-draggable-tiles/starting-3d-draggable-tiles.json b/examples/starting-3d-draggable-tiles/starting-3d-draggable-tiles.json index bad280261..487effcf8 100644 --- a/examples/starting-3d-draggable-tiles/starting-3d-draggable-tiles.json +++ b/examples/starting-3d-draggable-tiles/starting-3d-draggable-tiles.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -185,7 +185,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.35534345588170113, + "zoomFactor": 0.3673257545058849, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -662,6 +662,7 @@ { "assetStoreId": "", "name": "PlacementGrid", + "persistentUuid": "c84a8f30-7720-484a-943e-1163514b251b", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -992,7 +993,7 @@ "doubleParameters": { "elevation": 40, "intensity": 0.33, - "rotation": 300 + "rotation": 120 }, "stringParameters": { "groundColor": "127;127;127", @@ -1009,8 +1010,8 @@ "elevation": 40, "frustumSize": 4000, "intensity": 0.75, - "minimumShadowBias": 0, - "rotation": 300 + "minimumShadowBias": 0.000001, + "rotation": 40 }, "stringParameters": { "color": "255;255;255", @@ -1053,6 +1054,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3037,12 +3039,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -3941,6 +4025,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4021,6 +4106,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4101,6 +4187,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4193,6 +4280,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4272,8 +4429,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4760,6 +4920,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4840,8 +5020,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5015,6 +5198,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5083,8 +5274,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5179,6 +5373,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5247,8 +5449,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5332,6 +5537,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5400,8 +5613,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5642,6 +5858,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5722,6 +5939,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5802,6 +6020,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5882,6 +6101,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -5962,6 +6182,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6042,6 +6263,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6122,6 +6344,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6202,6 +6425,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6282,6 +6506,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6318,6 +6543,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6508,8 +6818,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6622,6 +6935,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6710,8 +7031,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7218,6 +7542,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7308,8 +7640,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8370,6 +8705,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8442,6 +8778,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8514,6 +8851,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8547,6 +8885,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8661,6 +9078,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -8881,12 +9299,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "@Lizard-13", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Rectangular 2D grid", "gdevelopVersion": ">=5.5.222", @@ -8988,9 +9423,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SnapObjectToVirtualGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-driving/assets/StartingFinishLine.png b/examples/starting-3d-driving/assets/StartingFinishLine.png new file mode 100644 index 000000000..f5d24c0ed Binary files /dev/null and b/examples/starting-3d-driving/assets/StartingFinishLine.png differ diff --git a/examples/starting-3d-driving/assets/StartingGround.png b/examples/starting-3d-driving/assets/StartingGround.png index e3e68a63c..1c66f9341 100644 Binary files a/examples/starting-3d-driving/assets/StartingGround.png and b/examples/starting-3d-driving/assets/StartingGround.png differ diff --git a/examples/starting-3d-driving/starting-3d-driving.json b/examples/starting-3d-driving/starting-3d-driving.json index 8a06da743..370539ba0 100644 --- a/examples/starting-3d-driving/starting-3d-driving.json +++ b/examples/starting-3d-driving/starting-3d-driving.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3d-driving", "description": "", @@ -191,6 +190,14 @@ "name": "assets/Skybox_Right.png", "smoothed": true, "userAdded": false + }, + { + "file": "assets/StartingFinishLine.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingFinishLine.png", + "smoothed": true, + "userAdded": false } ] }, @@ -223,10 +230,10 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.3673257545058929, + "zoomFactor": 0.6244537826600177, "windowMask": false, "selectedLayer": "", - "gameEditorMode": "embedded-game" + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -617,6 +624,74 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "e92193a0-fadf-4deb-ba43-a8234f2e1264", + "width": 5376, + "x": -128, + "y": -640, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1856, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "d2bdd0a2-1031-46c4-bc6a-ce45d7a7291f", + "width": 64, + "x": 5184, + "y": -576, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1984, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "008e07bc-c15a-4179-8d0f-be77622e6bca", + "width": 64, + "x": -192, + "y": -640, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "a39c980a-ab79-4071-8095-962006dcedad", + "width": 5376, + "x": -128, + "y": 1280, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1109,6 +1184,74 @@ "width": 32, "animations": [] } + }, + { + "assetStoreId": "", + "name": "Walls_3D", + "persistentUuid": "8b7629de-42ed-4555-83a2-4803569072ef", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 7, + "restitution": 0, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets/StartingFinishLine.png", + "backFaceResourceName": "assets/StartingFinishLine.png", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets/StartingFinishLine.png", + "rightFaceResourceName": "assets/StartingFinishLine.png", + "topFaceResourceName": "assets/StartingFinishLine.png", + "bottomFaceResourceName": "assets/StartingFinishLine.png", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } } ], "objectsFolderStructure": { @@ -1117,6 +1260,9 @@ { "objectName": "Road_3D" }, + { + "objectName": "Walls_3D" + }, { "objectName": "Grass_3D" }, @@ -1170,13 +1316,17 @@ ], "effects": [ { - "effectType": "Scene3D::AmbientLight", + "effectType": "Scene3D::HemisphereLight", "name": "3D Light", "doubleParameters": { - "intensity": 0.25 + "elevation": 40, + "intensity": 0.33, + "rotation": 300 }, "stringParameters": { - "color": "255;255;255" + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" }, "booleanParameters": {} }, @@ -1185,10 +1335,11 @@ "name": "Effect", "doubleParameters": { "distanceFromCamera": 1500, - "elevation": 45, - "frustumSize": 4000, + "elevation": 40, + "frustumSize": 2500, "intensity": 0.75, - "rotation": 0 + "minimumShadowBias": 0.00001, + "rotation": 300 }, "stringParameters": { "color": "255;255;255", diff --git a/examples/starting-3d-endless-runner/assets/StartingWall.png b/examples/starting-3d-endless-runner/assets/StartingWall.png index dc2b30525..ea50f81d9 100644 Binary files a/examples/starting-3d-endless-runner/assets/StartingWall.png and b/examples/starting-3d-endless-runner/assets/StartingWall.png differ diff --git a/examples/starting-3d-endless-runner/starting-3d-endless-runner.json b/examples/starting-3d-endless-runner/starting-3d-endless-runner.json index 6fc90e9dc..cff7ac1b8 100644 --- a/examples/starting-3d-endless-runner/starting-3d-endless-runner.json +++ b/examples/starting-3d-endless-runner/starting-3d-endless-runner.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -217,7 +217,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.41943397827591883, + "zoomFactor": 0.44819780454104924, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -1740,8 +1740,8 @@ "elevation": 125, "frustumSize": 2500, "intensity": 0.75, - "minimumShadowBias": 0, - "rotation": 260 + "minimumShadowBias": 0.000001, + "rotation": 257 }, "stringParameters": { "color": "255;255;255", @@ -1758,7 +1758,7 @@ "doubleParameters": { "elevation": 40, "intensity": 0.33, - "rotation": 300 + "rotation": 0 }, "stringParameters": { "groundColor": "127;127;127", @@ -1845,6 +1845,7 @@ { "author": "", "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1885,12 +1886,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2964,6 +2971,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -3058,8 +3100,11 @@ { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3354,6 +3399,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -3434,6 +3480,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -3514,6 +3561,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -3550,6 +3598,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3623,8 +3705,11 @@ { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3828,6 +3913,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3908,6 +3994,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3988,6 +4075,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -4024,6 +4112,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4097,8 +4219,11 @@ { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4934,6 +5059,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -5014,6 +5140,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -5094,6 +5221,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -5175,6 +5303,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -5256,6 +5385,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -5336,6 +5466,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -5416,6 +5547,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -5452,6 +5584,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5954,8 +6165,11 @@ { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6365,6 +6579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -6445,6 +6660,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -6525,6 +6741,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -6605,6 +6822,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -6685,6 +6903,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6766,6 +6985,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6847,6 +7067,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6883,6 +7104,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7311,8 +7596,11 @@ { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -7723,6 +8011,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -7805,6 +8094,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -7887,6 +8177,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -7969,6 +8260,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -8051,6 +8343,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -8134,6 +8427,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -8217,6 +8511,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -8254,6 +8549,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8669,6 +9028,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": ">=5.5.222", @@ -8708,12 +9068,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10613,6 +10979,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10753,6 +11120,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ @@ -13110,6 +13478,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13645,8 +14148,11 @@ { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13864,6 +14370,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14057,6 +14571,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -14277,9 +14792,25 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-flight-sim/starting-3d-flight-sim.json b/examples/starting-3d-flight-sim/starting-3d-flight-sim.json index b99861aea..47614f38e 100644 --- a/examples/starting-3d-flight-sim/starting-3d-flight-sim.json +++ b/examples/starting-3d-flight-sim/starting-3d-flight-sim.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-top-down", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3d-flight-sim", "description": "", @@ -220,7 +219,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.3111974942445216, + "zoomFactor": 0.546875000000003, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" diff --git a/examples/starting-3d-point-and-click-adventure/assets/StartingWater.png b/examples/starting-3d-point-and-click-adventure/assets/StartingWater.png index 3a428b8d3..2adc0635a 100644 Binary files a/examples/starting-3d-point-and-click-adventure/assets/StartingWater.png and b/examples/starting-3d-point-and-click-adventure/assets/StartingWater.png differ diff --git a/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json b/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json index 2a315faea..b4af3faa3 100644 --- a/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json +++ b/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -248,7 +248,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.1830573495556051, + "zoomFactor": 0.2550455473354407, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -816,6 +816,7 @@ { "assetStoreId": "", "name": "Ground", + "persistentUuid": "597e84cf-6bc7-4fcc-ab30-0d776aff7add", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -1497,6 +1498,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3481,12 +3483,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4385,6 +4469,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4465,6 +4550,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4545,6 +4631,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4637,6 +4724,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4716,8 +4873,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5204,6 +5364,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5284,8 +5464,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5459,6 +5642,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5527,8 +5718,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5623,6 +5817,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5691,8 +5893,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5776,6 +5981,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5844,8 +6057,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6086,6 +6302,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -6166,6 +6383,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6246,6 +6464,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6326,6 +6545,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6406,6 +6626,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6486,6 +6707,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6566,6 +6788,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6646,6 +6869,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6726,6 +6950,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6762,6 +6987,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6952,8 +7262,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7066,6 +7379,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7154,8 +7475,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7662,6 +7986,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7752,8 +8084,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8814,6 +9149,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8886,6 +9222,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8958,6 +9295,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8991,41 +9329,120 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Joystick name", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "name": "DeadZoneRadius" - }, - { - "value": "Center-center", - "type": "String", - "label": "", - "description": "Only used by the scene editor.", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], @@ -9105,6 +9522,7 @@ { "author": "", "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -9145,12 +9563,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10224,6 +10648,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -10318,8 +10777,11 @@ { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10614,6 +11076,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -10694,6 +11157,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -10774,6 +11238,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -10810,6 +11275,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10883,8 +11382,11 @@ { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11088,6 +11590,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -11168,6 +11671,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -11248,6 +11752,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -11284,6 +11789,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11357,8 +11896,11 @@ { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -12194,6 +12736,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -12274,6 +12817,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -12354,6 +12898,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -12435,6 +12980,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -12516,6 +13062,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -12596,6 +13143,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -12676,6 +13224,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -12712,6 +13261,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13214,8 +13842,11 @@ { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -13625,6 +14256,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -13705,6 +14337,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -13785,6 +14418,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -13865,6 +14499,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -13945,6 +14580,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -14026,6 +14662,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -14107,6 +14744,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -14143,26 +14781,90 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Scalable capability", - "extraInformation": [ - "ScalableCapability::ScalableBehavior" - ], - "choices": [], - "name": "Scale" - }, - { - "value": "", - "type": "Behavior", - "label": "Button states behavior (required)", - "extraInformation": [ - "ButtonStates::ButtonFSM" - ], - "choices": [], - "name": "ButtonFSM" + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" }, { "value": "", @@ -14571,8 +15273,11 @@ { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -14983,6 +15688,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -15065,6 +15771,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -15147,6 +15854,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -15229,6 +15937,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -15311,6 +16020,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -15394,6 +16104,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -15477,6 +16188,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -15514,6 +16226,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15928,7 +16704,8 @@ }, { "author": "", - "category": "Input", + "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Two choices dialog boxes", "gdevelopVersion": ">=5.5.230", @@ -15936,11 +16713,13 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIxMSIgeDI9IjI5IiB5Mj0iMTEiLz4NCjxnPg0KCTxwYXRoIGQ9Ik03LDlDNi43LDksNi41LDguOSw2LjMsOC43QzYuMSw4LjUsNiw4LjMsNiw4YzAtMC4zLDAuMS0wLjUsMC4zLTAuN2MwLDAsMC4xLTAuMSwwLjEtMC4xYzAuMSwwLDAuMS0wLjEsMC4yLTAuMQ0KCQlDNi43LDcsNi43LDcsNi44LDdjMC4xLDAsMC4zLDAsMC40LDBjMC4xLDAsMC4xLDAsMC4yLDAuMWMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMCwwLDAuMSwwLjEsMC4xLDAuMWMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuMw0KCQlDOCw3LjcsOCw3LjksOCw4YzAsMC4xLDAsMC4zLTAuMSwwLjRDNy45LDguNSw3LjgsOC42LDcuNyw4LjdDNy41LDguOSw3LjMsOSw3LDl6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsOUM5LjcsOSw5LjUsOC45LDkuMyw4LjdDOS4xLDguNSw5LDguMyw5LDhjMC0wLjEsMC0wLjMsMC4xLTAuNGMwLjEtMC4xLDAuMS0wLjIsMC4yLTAuM2MwLjEtMC4xLDAuMi0wLjIsMC4zLTAuMg0KCQlDMTAsNi45LDEwLjQsNywxMC43LDcuM2MwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxMSw3LjcsMTEsNy45LDExLDhjMCwwLjMtMC4xLDAuNS0wLjMsMC43QzEwLjUsOC45LDEwLjMsOSwxMCw5eiIvPg0KPC9nPg0KPGc+DQoJPHBhdGggZD0iTTEzLDljLTAuMSwwLTAuMywwLTAuNC0wLjFjLTAuMS0wLjEtMC4yLTAuMS0wLjMtMC4yYy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM0MxMiw4LjMsMTIsOC4xLDEyLDhjMC0wLjEsMC0wLjMsMC4xLTAuNA0KCQljMC4xLTAuMSwwLjEtMC4yLDAuMi0wLjNjMC40LTAuNCwxLTAuNCwxLjQsMGMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxNCw3LjcsMTQsNy45LDE0LDhjMCwwLjEsMCwwLjMtMC4xLDAuNA0KCQljLTAuMSwwLjEtMC4xLDAuMi0wLjIsMC4zQzEzLjUsOC45LDEzLjMsOSwxMyw5eiIvPg0KPC9nPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDVINUMzLjksNSwzLDUuOSwzLDd2MThjMCwxLjEsMC45LDIsMiwyaDIyYzEuMSwwLDItMC45LDItMlY3QzI5LDUuOSwyOC4xLDUsMjcsNXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMywyM0g5Yy0xLjEsMC0yLTAuOS0yLTJ2LTRjMC0xLjEsMC45LTIsMi0yaDE0YzEuMSwwLDIsMC45LDIsMnY0QzI1LDIyLjEsMjQuMSwyMywyMywyM3oiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE1LDE5IDE2LDIwIDE4LDE4ICIvPg0KPC9zdmc+DQo=", "name": "TwoChoicesDialogBoxes", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", - "shortDescription": "A dialog box with buttons to let users make a choice.", - "version": "0.3.0", + "shortDescription": "Two-choice dialog box with keyboard, gamepad, and touch support. Customizable text.", + "version": "0.3.2", "description": [ "A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.", - "It handles keyboard, gamepad and touch controls." + "It handles keyboard, gamepad and touch controls.", + "", + "There are ready-to-use dialog boxes in the asset-store [dialog boxes pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=dialog-boxes-dialog-boxes)." ], "origin": { "identifier": "TwoChoicesDialogBoxes", @@ -15960,7 +16739,38 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -15970,13 +16780,17 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "dialog boxes", "defaultName": "", "description": "A dialog box showing two options.", "fullName": "Two choices dialog box ", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "TwoChoicesDialogBox", + "previewIconUrl": "", "objects": [ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", @@ -16383,287 +17197,305 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Buttons", - "" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlaySound" + "inverted": true, + "value": "TwoChoicesDialogBoxes::IsInGameEdition" }, "parameters": [ "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - }, - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "Buttons.ID", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, "parameters": [ - "", - "NumpadLeft" + "Buttons", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "", - "Left" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "1", - "\"Left\"", - "\"Left\"", + "Object", + "=", + "Buttons.ID", "" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "-", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "NumpadRight" - ] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "", - "Right" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadLeft" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Left\"", + "" + ] + } ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "-", "1", - "\"Right\"", "" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "\"Right\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "+", - "1", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadRight" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" + }, + "parameters": [ + "Object", + "+", + "1", + "" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] + } ] }, { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "EnableEscape", - "True", - "" - ] + "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Escape" + "EnableEscape", + "True", + "" ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Escape" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "=", "1", - "\"B\"", "" ] } ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "1", - "" - ] } ] } @@ -16700,14 +17532,36 @@ "=", "TextMessage" ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "YesButton", + "=", + "LabelButtonID0", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "NoButton", + "=", + "LabelButtonID1", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", "type": "object" } @@ -17027,6 +17881,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ActiveButtonById", + "group": "Dialog Box configuration", "name": "SetActiveButtonById", "private": true, "sentence": "", @@ -17157,6 +18012,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TextMessage", + "group": "Dialog Box configuration", "name": "SetTextMessage", "private": true, "sentence": "", @@ -17200,6 +18056,43 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "IsYesClicked" + }, + { + "functionName": "IsNoClicked" + }, + { + "folderName": "Dialog Box configuration", + "children": [ + { + "functionName": "ActiveButtonById" + }, + { + "functionName": "SetActiveButtonById" + }, + { + "functionName": "TextMessage" + }, + { + "functionName": "SetTextMessage" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "Default message. Continue?", @@ -17256,6 +18149,16 @@ ], "hidden": true, "name": "_PropertyMapping" + }, + { + "value": "", + "type": "Resource", + "label": "Sound at hovering", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "HoveredSound" } ], "propertiesFolderStructure": { @@ -17278,6 +18181,9 @@ }, { "propertyName": "_PropertyMapping" + }, + { + "propertyName": "HoveredSound" } ] }, @@ -17881,15 +18787,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", - "fullName": "Panel sprite button", + "fullName": "Labeled button", "gdevelopVersion": ">=5.5.230", "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": "2.1.1", + "shortDescription": "Resizeable button with a label.", + "version": "2.2.0", "description": [ "A button that can be used for menus and most labelled buttons of a game. 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.", "", @@ -17939,12 +18846,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -18782,23 +19700,946 @@ "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "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": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", "functionType": "Condition", "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "sentence": "_PARAM0_ isHovered", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"Hovered\"" + "IsHovered", + "True", + "" ] } ], @@ -18818,166 +20659,263 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"Hovered\"" + "IsHovered", + "False", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "BooleanVariable" }, "parameters": [ - "True" + "Value", + "True", + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetBooleanVariable" }, "parameters": [ - "State", - "=", - "\"PressedOutside\"" + "IsHovered", + "True", + "" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"PressedInside\"" + "IsHovered", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "BooleanVariable" }, "parameters": [ - "True" + "Value", + "False", + "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [ { "type": { - "value": "StringVariable" + "value": "SetBooleanVariable" }, "parameters": [ - "State", - "=", - "\"PressedOutside\"" + "IsHovered", + "False", + "" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } ] } ] @@ -18987,145 +20925,141 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "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", + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "TouchId" - ] - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "choices": [ - { - "label": "Idle", - "value": "Idle" - }, - { - "label": "Hovered", - "value": "Hovered" - }, - { - "label": "PressedInside", - "value": "PressedInside" - }, - { - "label": "PressedOutside", - "value": "PressedOutside" - }, - { - "label": "Validated", - "value": "Validated" - } - ], - "hidden": true, - "name": "State" + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "hidden": true, - "name": "TouchId" + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" }, { "value": "", "type": "Boolean", - "label": "Touch is inside", + "label": "", "hidden": true, - "name": "TouchIsInside" + "name": "IsHovered" }, { "value": "", - "type": "Boolean", - "label": "Mouse is inside", + "type": "String", + "label": "Idle text", "hidden": true, - "name": "MouseIsInside" + "name": "IdleText" }, { "value": "", - "type": "Number", - "label": "", + "type": "Color", + "label": "Idle color", "hidden": true, - "name": "Index" + "name": "IdleColor" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "ShouldCheckHovering" + "propertyName": "IsHovered" }, { - "propertyName": "State" + "propertyName": "HoverPrefix" }, { - "propertyName": "TouchId" + "propertyName": "HoverSuffix" }, { - "propertyName": "TouchIsInside" + "propertyName": "IdleText" }, { - "propertyName": "MouseIsInside" + "propertyName": "HoverColor" }, { - "propertyName": "Index" + "propertyName": "IdleColor" } ] } @@ -19139,12 +21073,16 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "menu buttons", "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", + "description": "Button with a label.", + "fullName": "Labeled button", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -19166,6 +21104,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Text", @@ -19313,6 +21262,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -19440,7 +21399,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -19693,6 +21668,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19848,29 +21845,34 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" }, "parameters": [ - "Object", - "=", - "0", + "Label", + "TextStyleState", + "", "" ] }, { "type": { - "value": "Cache" + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" }, "parameters": [ - "Idle" + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" ] }, { "type": { - "value": "Montre" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Hovered", + "Object", + "=", + "0", "" ] }, @@ -19879,28 +21881,64 @@ "value": "Cache" }, "parameters": [ - "Pressed" + "Idle" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "Montre" }, "parameters": [ "Hovered", - "Tween", - "\"Fadeout\"" + "" ] }, { "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" + "value": "Cache" }, "parameters": [ - "Hovered", - "Opacity", - "=", - "255" + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } ] } ] @@ -19925,6 +21963,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19983,6 +22043,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -20563,6 +22645,56 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20591,6 +22723,7 @@ "type": "Number", "unit": "Pixel", "label": "", + "group": "States", "hidden": true, "name": "LabelOffset" }, @@ -20618,6 +22751,9 @@ { "propertyName": "LabelText" }, + { + "propertyName": "_PropertyMapping" + }, { "folderName": "States", "children": [ @@ -20626,14 +22762,11 @@ }, { "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" } ] - }, - { - "propertyName": "LabelOffset" - }, - { - "propertyName": "_PropertyMapping" } ] }, @@ -20667,6 +22800,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -20814,6 +22958,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -20974,6 +23128,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -21121,6 +23286,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -21257,6 +23432,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -21264,8 +23440,8 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", - "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.8.1", + "shortDescription": "Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.", + "version": "0.9.1", "description": [ "Add support for gamepads (or other physical controllers).", "", @@ -21297,7 +23473,8 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], @@ -21356,83 +23533,343 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", " }\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", + " }\r", + "\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", + " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", + "\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function addFrameBeginningTaskIfNeeded(runtimeScene) {\r", + " const taskManager = runtimeScene.getAsyncTasksManager();\r", + " for (const taskWithCallback of taskManager.tasksWithCallback) {\r", + " if (taskWithCallback.asyncTask === frameBeginningTask) {\r", + " return;\r", + " }\r", + " }\r", + " // Async tasks are run before everything.\r", + " // This is a hack to make sure that button states are updated\r", + " // before mapping behavior events.\r", + " taskManager.addTask(frameBeginningTask);\r", + "}\r", + "\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function onScenePostEvents(runtimeScene) {\r", + " addFrameBeginningTaskIfNeeded(runtimeScene);\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -21441,44 +23878,53 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", - "\r", - " v = v - Math.sign(v) * DEADZONE;\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + " addFrameBeginningTaskIfNeeded,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -21491,59 +23937,30 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "gdjs._extensionController.onScenePostEvents(runtimeScene);", "" ], "parameterObjects": "", @@ -21981,27 +24398,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -22029,12 +24439,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -22051,43 +24461,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", - "\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -22100,12 +24495,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22129,7 +24524,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -22141,12 +24536,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22163,40 +24558,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -22209,12 +24591,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22232,18 +24614,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -22252,11 +24627,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -22353,7 +24729,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22381,26 +24757,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -22438,193 +24808,108 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisIndex = stick === 'right' ? 3 : 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Gamepad", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "Stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button released", + "functionType": "Condition", + "name": "C_Button_released", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\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", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "const axisIndex = stick === 'right' ? 3 : 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", - "" + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", + " return;\r", + "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" ], "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": true } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Gamepad", + "name": "PlayerId", "type": "expression" }, { - "description": "Stick: \"Left\" or \"Right\"", - "name": "Stick", - "supplementaryInformation": "[\"Left\",\"Right\"]", + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "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", + "description": "Check if a button was just pressed 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 just pressed", "functionType": "Condition", - "name": "C_Button_released", - "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is released", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -22634,12 +24919,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -22656,17 +24941,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -22679,7 +24956,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22695,46 +24972,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -22745,7 +24986,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22761,35 +25002,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -22802,7 +25026,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22824,20 +25048,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", - "" + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" ], "parameterObjects": "", "useStrict": true, @@ -22860,127 +25080,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -22991,7 +25100,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23018,15 +25127,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -23039,7 +25142,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23055,18 +25158,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -23077,7 +25174,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23098,141 +25195,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -23243,7 +25227,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23263,24 +25247,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -23304,22 +25288,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -23334,7 +25309,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23350,28 +25325,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -23386,7 +25347,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23407,17 +25368,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -23430,7 +25383,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23446,25 +25399,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -23481,7 +25425,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23502,35 +25446,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -23538,11 +25466,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23552,7 +25480,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23583,39 +25511,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -23624,8 +25535,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23635,7 +25546,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23666,54 +25577,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", - "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", - "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -23723,7 +25590,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23739,8 +25606,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23753,7 +25620,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23769,8 +25636,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23783,19 +25650,120 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24279,6 +26247,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24391,8 +26367,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24505,6 +26484,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24607,8 +26594,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24710,6 +26700,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24832,8 +26830,11 @@ { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -25074,6 +27075,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -25154,6 +27156,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -25234,6 +27237,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -25314,6 +27318,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -25394,6 +27399,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -25474,6 +27480,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -25554,6 +27561,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -25634,6 +27642,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -25714,6 +27723,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -25750,6 +27760,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25934,8 +28029,11 @@ { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26219,6 +28317,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -26331,8 +28437,11 @@ { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26910,6 +29019,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -27005,6 +29122,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -27225,12 +29343,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D raycast", "gdevelopVersion": ">=5.5.222", @@ -27913,9 +30048,61 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "folderName": "Collision", + "children": [ + { + "functionName": "RaycastWithAngle" + }, + { + "functionName": "RaycastBetweenPosition" + }, + { + "functionName": "RaycastFromCameraCenter" + }, + { + "functionName": "RaycastFromCameraPoint" + }, + { + "functionName": "RaycastFromCameraCursor" + } + ] + }, + { + "functionName": "Distance" + }, + { + "functionName": "IntersectionX" + }, + { + "functionName": "IntersectionY" + }, + { + "functionName": "IntersectionZ" + }, + { + "functionName": "NormalX" + }, + { + "functionName": "NormalY" + }, + { + "functionName": "NormalZ" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-rts-unit-selection/assets/StartingWall.png b/examples/starting-3d-rts-unit-selection/assets/StartingWall.png index 78edfe5fb..ea50f81d9 100644 Binary files a/examples/starting-3d-rts-unit-selection/assets/StartingWall.png and b/examples/starting-3d-rts-unit-selection/assets/StartingWall.png differ diff --git a/examples/starting-3d-rts-unit-selection/assets/StartingWater.png b/examples/starting-3d-rts-unit-selection/assets/StartingWater.png index 3a428b8d3..2adc0635a 100644 Binary files a/examples/starting-3d-rts-unit-selection/assets/StartingWater.png and b/examples/starting-3d-rts-unit-selection/assets/StartingWater.png differ diff --git a/examples/starting-3d-rts-unit-selection/starting-3d-rts-unit-selection.json b/examples/starting-3d-rts-unit-selection/starting-3d-rts-unit-selection.json index d7dcb5832..ae62ccfbe 100644 --- a/examples/starting-3d-rts-unit-selection/starting-3d-rts-unit-selection.json +++ b/examples/starting-3d-rts-unit-selection/starting-3d-rts-unit-selection.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -194,7 +194,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.37971210019480156, + "zoomFactor": 0.40575189059439154, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -242,7 +242,7 @@ { "angle": 0, "customSize": true, - "depth": 272, + "depth": 256, "height": 448, "layer": "", "name": "Building_Impassable", @@ -250,7 +250,6 @@ "width": 384, "x": -64, "y": -320, - "z": -1, "zOrder": 12, "numberProperties": [], "stringProperties": [], @@ -295,7 +294,7 @@ { "angle": 0, "customSize": true, - "depth": 340, + "depth": 384, "height": 256, "layer": "", "name": "Building_Impassable", @@ -347,14 +346,14 @@ "angle": 0, "customSize": true, "depth": 1, - "height": 512, + "height": 532, "layer": "", "locked": true, "name": "Water_Passable", "persistentUuid": "531976bc-5c74-4156-a2b5-896a6cc6b719", "width": 256, "x": 512, - "y": -320, + "y": -340, "zOrder": 15, "numberProperties": [], "stringProperties": [], @@ -397,7 +396,7 @@ { "angle": 0, "customSize": true, - "depth": 234, + "depth": 192, "height": 320, "layer": "", "name": "Building_Impassable", @@ -499,7 +498,7 @@ { "angle": 0, "customSize": true, - "depth": 340, + "depth": 384, "height": 384, "layer": "", "name": "Building_Impassable", @@ -665,6 +664,7 @@ { "assetStoreId": "", "name": "Ground", + "persistentUuid": "85ce9060-c961-4dd8-9467-ca6ca6ee5673", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -703,6 +703,7 @@ { "assetStoreId": "", "name": "RTSUnit", + "persistentUuid": "4abd7691-e4a8-437c-98d7-1b5cb761ce96", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -746,6 +747,7 @@ { "assetStoreId": "", "name": "Building_Impassable", + "persistentUuid": "38404eef-cf28-4e21-a6a7-c44d2ad4369f", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -776,12 +778,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "tint": "255;255;255", "isCastingShadow": true, @@ -791,6 +793,7 @@ { "assetStoreId": "", "name": "Water_Passable", + "persistentUuid": "422e79be-9cbf-4513-9b27-4d11c52d246e", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -861,6 +864,7 @@ { "assetStoreId": "", "name": "SelectionTool_3DSprite", + "persistentUuid": "19d3d02c-8ec2-457a-96f6-f57be8b25bb3", "type": "Sprite3D::Sprite3D", "variant": "", "variables": [ @@ -1473,7 +1477,7 @@ "effectType": "Scene3D::HemisphereLight", "name": "3D Ambient Hemisphere Light", "doubleParameters": { - "elevation": 40, + "elevation": 60, "intensity": 0.33, "rotation": 300 }, @@ -1546,6 +1550,7 @@ { "author": "Slash, Tristan Rhodes, @VictrisGames", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "RTS-like unit selection", "gdevelopVersion": ">=5.5.222", @@ -5971,12 +5976,54 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "RTSUnitSelection" + }, + { + "functionName": "IsPreSelected" + }, + { + "functionName": "IsSelected" + }, + { + "functionName": "SetPreSelected" + }, + { + "functionName": "SetSelected" + }, + { + "functionName": "AssignUnitID" + }, + { + "functionName": "TotalSelectedUnits" + }, + { + "functionName": "RTSControlGroups" + }, + { + "functionName": "ControlGroupID" + }, + { + "functionName": "IsAssignedToControlGroup" + }, + { + "functionName": "AssignControlGroup" + }, + { + "functionName": "SelectedUnitID" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -6197,12 +6244,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "Advanced 3D tween", "gdevelopVersion": ">=5.5.222", @@ -6992,12 +7056,67 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "folderName": "Color", + "children": [ + { + "functionName": "SetTint" + }, + { + "functionName": "SetTintNumber" + } + ] + }, + { + "functionName": "RgbMean" + }, + { + "functionName": "RgbToNumber" + }, + { + "functionName": "onSceneUnloading" + }, + { + "functionName": "StretchZ" + }, + { + "functionName": "SetStretchZ" + }, + { + "functionName": "StretchY" + }, + { + "functionName": "SetStretchY" + }, + { + "functionName": "ScaleVolume" + }, + { + "functionName": "SetScaleVolume" + }, + { + "functionName": "EaseExp" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Smoothly squash, strentch and tint 3D models.", "fullName": "Advanced 3D tween", + "helpPath": "", + "iconUrl": "", "name": "Tween3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7082,6 +7201,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "StretchZ", + "group": "Size", "name": "SetStretchZ", "sentence": "", "events": [ @@ -7227,6 +7347,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "StretchY", + "group": "Size", "name": "SetStretchY", "sentence": "", "events": [ @@ -7372,6 +7493,7 @@ "fullName": "Stretch on Z axis", "functionType": "ActionWithOperator", "getterName": "ScaleVolume", + "group": "Size", "name": "SetScaleVolume", "sentence": "", "events": [ @@ -10017,6 +10139,166 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "folderName": "Size", + "children": [ + { + "functionName": "StretchZ" + }, + { + "functionName": "SetStretchZ" + }, + { + "functionName": "StretchY" + }, + { + "functionName": "SetStretchY" + }, + { + "functionName": "ScaleVolume" + }, + { + "functionName": "SetScaleVolume" + }, + { + "functionName": "TweenStretchZ" + }, + { + "functionName": "TweenStretchY" + }, + { + "functionName": "TweenScaleVolume" + } + ] + }, + { + "folderName": "Color", + "children": [ + { + "functionName": "Tint" + }, + { + "functionName": "TweenTint" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "TweenPositionZ" + }, + { + "functionName": "TweenDepth" + } + ] + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "TweenRotationX" + }, + { + "functionName": "TweenRotationY" + } + ] + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TweenedValue" + }, + { + "functionName": "TweenedColor" + }, + { + "functionName": "ExponentTweenedValue" + }, + { + "functionName": "StartTween" + }, + { + "functionName": "Type" + }, + { + "functionName": "SetType" + }, + { + "functionName": "Time" + }, + { + "functionName": "SetTime" + }, + { + "functionName": "Duration" + }, + { + "functionName": "SetDuration" + }, + { + "functionName": "Easing" + }, + { + "functionName": "SetEasing" + }, + { + "functionName": "InitialValue" + }, + { + "functionName": "SetInitialValue" + }, + { + "functionName": "TargetedValue" + }, + { + "functionName": "SetTargetedValue" + }, + { + "functionName": "IsPaused" + }, + { + "functionName": "SetPaused" + }, + { + "functionName": "StopTween" + }, + { + "functionName": "PauseTween" + }, + { + "functionName": "ResumeTween" + }, + { + "functionName": "RemoveTween" + }, + { + "functionName": "Exists" + }, + { + "functionName": "IsPlaying" + }, + { + "functionName": "HasFinished" + }, + { + "functionName": "Progress" + }, + { + "functionName": "TweenIdentifier" + }, + { + "functionName": "InvalidateTweenIdentifiers" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10067,8 +10349,11 @@ { "description": "Squash and stretch a 3D model in loop.", "fullName": "3D wobble", + "helpPath": "", + "iconUrl": "", "name": "Wobble", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10384,6 +10669,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScaleMin", + "group": "3D wobble scale configuration", "name": "SetScaleMin", "sentence": "", "events": [ @@ -10464,6 +10750,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScaleMax", + "group": "3D wobble scale configuration", "name": "SetScaleMax", "sentence": "", "events": [ @@ -10898,6 +11185,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PeriodDuration", + "group": "3D wobble configuration", "name": "SetPeriodDuration", "sentence": "", "events": [ @@ -10978,6 +11266,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ScalePeriodOffset", + "group": "3D wobble scale configuration", "name": "SetScalePeriodOffset", "sentence": "", "events": [ @@ -11058,6 +11347,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchMin", + "group": "3D wobble stretch configuration", "name": "SetStretchMin", "sentence": "", "events": [ @@ -11138,6 +11428,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchMax", + "group": "3D wobble stretch configuration", "name": "SetStretchMax", "sentence": "", "events": [ @@ -11218,6 +11509,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StretchPeriodOffset", + "group": "3D wobble stretch configuration", "name": "SetStretchPeriodOffset", "sentence": "", "events": [ @@ -11254,6 +11546,89 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "3D wobble scale configuration", + "children": [ + { + "functionName": "ScaleMin" + }, + { + "functionName": "SetScaleMin" + }, + { + "functionName": "ScaleMax" + }, + { + "functionName": "SetScaleMax" + }, + { + "functionName": "TweenScaleMin" + }, + { + "functionName": "TweenScaleMax" + }, + { + "functionName": "ScalePeriodOffset" + }, + { + "functionName": "SetScalePeriodOffset" + } + ] + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "UpdateScaleVolume" + }, + { + "functionName": "UpdateStretch" + }, + { + "folderName": "3D wobble configuration", + "children": [ + { + "functionName": "PeriodDuration" + }, + { + "functionName": "SetPeriodDuration" + } + ] + }, + { + "folderName": "3D wobble stretch configuration", + "children": [ + { + "functionName": "StretchMin" + }, + { + "functionName": "SetStretchMin" + }, + { + "functionName": "StretchMax" + }, + { + "functionName": "SetStretchMax" + }, + { + "functionName": "StretchPeriodOffset" + }, + { + "functionName": "SetStretchPeriodOffset" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "0.75", @@ -11503,6 +11878,7 @@ { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D sprite", "gdevelopVersion": ">=5.5.222", @@ -11654,6 +12030,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -11666,10 +12050,13 @@ "defaultName": "", "description": "An animated sprite in 3D.", "fullName": "3D sprite", + "helpPath": "", + "iconUrl": "", "is3D": true, "isAnimatable": true, "isUsingLegacyInstancesRenderer": true, "name": "Sprite3D", + "previewIconUrl": "", "objects": [], "objectsFolderStructure": { "folderName": "__ROOT" @@ -11756,6 +12143,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + } + ] + }, "propertyDescriptors": [], "propertiesFolderStructure": { "folderName": "__ROOT" @@ -11766,4 +12161,4 @@ } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-shootemup/starting-3d-shootemup.json b/examples/starting-3d-shootemup/starting-3d-shootemup.json index 9833fd3a7..ba5d7b044 100644 --- a/examples/starting-3d-shootemup/starting-3d-shootemup.json +++ b/examples/starting-3d-shootemup/starting-3d-shootemup.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -216,7 +216,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.37971210019479623, + "zoomFactor": 0.4481978045410392, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -1198,6 +1198,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3182,12 +3183,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4086,6 +4169,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4166,6 +4250,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4246,6 +4331,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4338,6 +4424,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4417,8 +4573,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4905,6 +5064,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4985,8 +5164,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5160,6 +5342,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5228,8 +5418,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5324,6 +5517,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5392,8 +5593,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5477,6 +5681,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5545,8 +5757,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5787,6 +6002,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5867,6 +6083,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5947,6 +6164,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6027,6 +6245,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6107,6 +6326,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6187,6 +6407,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6267,6 +6488,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6347,6 +6569,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6427,6 +6650,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6463,6 +6687,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6653,8 +6962,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6767,6 +7079,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6855,8 +7175,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7363,6 +7686,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7453,8 +7784,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8515,6 +8849,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8587,6 +8922,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8659,6 +8995,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8692,41 +9029,120 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Joystick name", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "name": "DeadZoneRadius" - }, - { - "value": "Center-center", - "type": "String", - "label": "", - "description": "Only used by the scene editor.", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], @@ -8806,9 +9222,10 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", @@ -8858,12 +9275,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10235,6 +10658,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -10368,6 +10792,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -10501,6 +10926,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -10634,6 +11060,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -10984,6 +11411,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -11117,6 +11545,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -11250,6 +11679,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -11383,6 +11813,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -11516,6 +11947,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -11649,6 +12081,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -11929,6 +12362,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -12163,6 +12597,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -12296,6 +12731,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -13535,6 +13971,265 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, "propertyDescriptors": [ { "value": "0.1", @@ -13542,17 +14237,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -13560,9 +14250,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -13572,7 +14259,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -13581,7 +14267,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -13591,7 +14276,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -13602,7 +14286,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -13610,9 +14293,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -13622,7 +14302,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -13633,7 +14312,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -13641,9 +14319,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -13651,9 +14327,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -13662,8 +14335,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -13671,9 +14342,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -13681,9 +14349,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -13691,9 +14357,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -13701,9 +14364,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -13711,9 +14372,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -13723,7 +14381,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -13731,9 +14388,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -13741,9 +14395,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -13754,7 +14406,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -13762,9 +14413,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -13778,6 +14427,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -13787,7 +14437,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -13795,14 +14444,123 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } } ], "eventsBasedObjects": [] @@ -13810,6 +14568,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -14030,9 +14789,25 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-tank/assets/StartingFinishLine.png b/examples/starting-3d-tank/assets/StartingFinishLine.png new file mode 100644 index 000000000..f5d24c0ed Binary files /dev/null and b/examples/starting-3d-tank/assets/StartingFinishLine.png differ diff --git a/examples/starting-3d-tank/assets/StartingGround.png b/examples/starting-3d-tank/assets/StartingGround.png index e3e68a63c..1c66f9341 100644 Binary files a/examples/starting-3d-tank/assets/StartingGround.png and b/examples/starting-3d-tank/assets/StartingGround.png differ diff --git a/examples/starting-3d-tank/starting-3d-tank.json b/examples/starting-3d-tank/starting-3d-tank.json index 9dee6af3d..fd9d2d44a 100644 --- a/examples/starting-3d-tank/starting-3d-tank.json +++ b/examples/starting-3d-tank/starting-3d-tank.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-3d-driving", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3d-tank", "description": "", @@ -248,6 +247,14 @@ "name": "assets/Skybox_Right.png", "smoothed": true, "userAdded": false + }, + { + "file": "assets/StartingFinishLine.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingFinishLine.png", + "smoothed": true, + "userAdded": false } ] }, @@ -269,7 +276,7 @@ "title": "", "v": 255, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, @@ -279,8 +286,8 @@ "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 0.17708595277544872, + "snap": false, + "zoomFactor": 0.5290357402157136, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -297,6 +304,9 @@ }, { "name": "Target" + }, + { + "name": "Walls_3D" } ] } @@ -607,6 +617,72 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "fc438057-36d8-4923-9df1-d65eec38771f", + "width": 4864, + "x": -320, + "y": -576, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "d4c7c821-b353-4a00-95f7-9cb8df3e6c18", + "width": 4864, + "x": -320, + "y": 1216, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "914499dd-bfee-4543-b69f-607112aefcbe", + "width": 64, + "x": -320, + "y": -512, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "layer": "", + "name": "Walls_3D", + "persistentUuid": "152bf106-685e-4957-a4b2-72ba801da316", + "width": 64, + "x": 4480, + "y": -512, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1343,6 +1419,74 @@ ] } ] + }, + { + "assetStoreId": "", + "name": "Walls_3D", + "persistentUuid": "0f1901fe-78ec-426d-a170-956d906f8e21", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 7, + "restitution": 0, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets/StartingFinishLine.png", + "backFaceResourceName": "assets/StartingFinishLine.png", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets/StartingFinishLine.png", + "rightFaceResourceName": "assets/StartingFinishLine.png", + "topFaceResourceName": "assets/StartingFinishLine.png", + "bottomFaceResourceName": "assets/StartingFinishLine.png", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } } ], "objectsFolderStructure": { @@ -1351,6 +1495,9 @@ { "objectName": "Road_3D" }, + { + "objectName": "Walls_3D" + }, { "objectName": "Grass_3D" }, @@ -13878,7 +14025,7 @@ { "author": "", "category": "Visual effect", - "dimension": "", + "dimension": "3D", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -13887,7 +14034,7 @@ "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", - "version": "3.0.1", + "version": "3.1.0", "description": [ "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", @@ -14091,14 +14238,77 @@ " * @param colorOverLife {ColorOverLife}", " * @param sizeOverLife {SizeOverLife}", " * @param applyForce {ApplyForce}", + " * @param applyForce {ApplyForce}", + " * @param widthOverLength {WidthOverLength}", " */", - " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce) {", + " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength) {", " this.particleSystem = particleSystem;", " this.colorOverLife = colorOverLife;", " this.sizeOverLife = sizeOverLife;", " this.applyForce = applyForce;", + " this.widthOverLength = widthOverLength;", + " }", + "", + " /**", + " * @param renderMode {'Billboard' | 'Trail'}", + " */", + " setRenderMode(renderMode) {", + " switch (renderMode) {", + " case \"BillBoard\":", + " this.particleSystem.renderMode = RenderMode.BillBoard;", + " break;", + " case \"Trail\":", + " this.particleSystem.renderMode = RenderMode.Trail;", + " this.particleSystem.rendererEmitterSettings.startLength = new IntervalValue(30, 30);", + " break;", + " }", + " }", + "", + " /**", + " * @param startLengthMin {number}", + " */", + " setTrailStartLengthMin(startLengthMin) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.a = startLengthMin;", + " }", + "", + " /**", + " * @param startLengthMax {number}", + " */", + " setTrailStartLengthMax(startLengthMax) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.b = startLengthMax;", + " }", + "", + " /**", + " * @param followLocalOrigin {boolean}", + " */", + " setTrailFollowingLocalOrigin(followLocalOrigin) {", + " this.particleSystem.rendererEmitterSettings.followLocalOrigin = followLocalOrigin;", + " }", + "", + " /**", + " * @param trailEndWidthRatio {number}", + " */", + " setTrailEndWidthRatio(trailEndWidthRatio) {", + " // Check this comment in the lib code:", + " // We added a multiplication with size because it's more convenient for the extension.", + "", + " /** @type Bezier */", + " const bezier = this.widthOverLength.width.functions[0][0];", + " bezier.p[0] = 1;", + " bezier.p[1] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 1 / 3);", + " bezier.p[2] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 2 / 3);", + " bezier.p[3] = trailEndWidthRatio;", " }", "", + "", " /**", " * @param startColor {string}", " */", @@ -15508,7 +15718,8 @@ " const iter = particle.previous.values();", " for (let i = 0; i < particle.previous.length; i++) {", " const cur = iter.next();", - " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length);", + " // We added a multiplication with size because it's more convenient for the extension.", + " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length) * particle.size;", " }", " }", " }", @@ -20766,6 +20977,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "3d particles", "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", @@ -20841,7 +21053,7 @@ } ], "instances": [], - "editionSettings": {}, + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -20879,6 +21091,7 @@ " ColorOverLife,", " SizeOverLife,", " ApplyForce,", + " WidthOverLength,", " Gradient,", " PiecewiseBezier,", " Bezier,", @@ -20972,10 +21185,12 @@ "particleSystem.addBehavior(sizeOverLife);", "const applyForce = new ApplyForce(new THREE.Vector3(0, 0, -1), new ConstantValue(0));", "particleSystem.addBehavior(applyForce);", + "const widthOverLength = new WidthOverLength(new PiecewiseBezier([[new Bezier(1, 2 / 3, 1 / 3, 0), 0]]));", + "particleSystem.addBehavior(widthOverLength);", "", "particleSystem.emitter.name = object.getName() + object.getNameId();", "", - "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce);", + "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength);", "object.__particleSystem = particleSystem;", "", "// This is a hack that may break in future releases.", @@ -21174,6 +21389,50 @@ "" ] }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetRenderMode" + }, + "parameters": [ + "Object", + "=", + "RenderMode", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailEndWidthRatio" + }, + "parameters": [ + "Object", + "=", + "TrailEndWidthRatio", + "" + ] + }, { "type": { "value": "ParticleEmitter3D::ParticleEmitter3D::SetStartColor" @@ -21361,6 +21620,61 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "yes", + "TrailStartLengthMax" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -21615,7 +21929,10 @@ " for (const layerName of layerNames) {", " const layer = gameScene.getLayer(layerName);", " if (layer.__particleEmmiter3DExtension) {", - " layer.__particleEmmiter3DExtension.batchSystem.update(layer.getElapsedTime() / 1000);", + " const timeDelta = layer.getElapsedTime() / 1000;", + " if (timeDelta > 0) {", + " layer.__particleEmmiter3DExtension.batchSystem.update(timeDelta);", + " }", " }", " }", "}" @@ -22043,7 +22360,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyStartColor()" + "StartColor" ] } ] @@ -22126,7 +22443,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyEndColor()" + "EndColor" ] } ] @@ -22209,7 +22526,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartOpacity()" + "StartOpacity" ] } ] @@ -22292,7 +22609,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndOpacity()" + "EndOpacity" ] } ] @@ -22375,7 +22692,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyFlow()" + "Flow" ] } ] @@ -22459,7 +22776,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMin()" + "StartSizeMin" ] } ] @@ -22542,7 +22859,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMax()" + "StartSizeMax" ] } ] @@ -22626,7 +22943,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndScale()" + "EndScale" ] } ] @@ -22710,7 +23027,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMin()" + "StartSpeedMin" ] } ] @@ -22793,7 +23110,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMax()" + "StartSpeedMax" ] } ] @@ -22876,7 +23193,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMin()" + "LifespanMin" ] } ] @@ -22960,7 +23277,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMax()" + "LifespanMax" ] } ] @@ -23044,7 +23361,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyDuration()" + "Duration" ] } ] @@ -23266,7 +23583,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertySpayConeAngle()" + "SpayConeAngle" ] } ] @@ -23350,7 +23667,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyBlending()" + "Blending" ] } ] @@ -23436,7 +23753,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyGravityTop()" + "GravityTop" ] } ] @@ -23521,7 +23838,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyGravity()" + "Gravity" ] } ] @@ -23712,16 +24029,538 @@ } ], "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "functionName": "onCreated" - }, - { - "functionName": "onDestroy" + }, + { + "description": "the start min trail length of the object.", + "fullName": "Start min trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMin", + "sentence": "the start min trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMin", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMin", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the start max trail length of the object.", + "fullName": "Start max trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMax", + "sentence": "the start max trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMax", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMax", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMax(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the trail should follow the object.", + "fullName": "Trail following the object", + "functionType": "Condition", + "group": "3D particle emitter trail configuration", + "name": "IsTrailFollowingLocalOrigin", + "sentence": "The trail is following _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the trail should follow the object or not.", + "fullName": "Make the trail follow", + "functionType": "Action", + "group": "3D particle emitter trail configuration", + "name": "SetIsTrailFollowingLocalOrigin", + "sentence": "Make the trail follow _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailFollowingLocalOrigin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "IsTrailFollowingLocalOrigin", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the tail end width ratio of the object.", + "fullName": "Tail end width ratio", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailEndWidthRatio", + "sentence": "the tail end width ratio", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailEndWidthRatio" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailEndWidthRatio", + "group": "3D particle emitter trail configuration", + "name": "SetTrailEndWidthRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailEndWidthRatio", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailEndWidthRatio(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the render mode of the object.", + "fullName": "Render mode", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter configuration", + "name": "RenderMode", + "private": true, + "sentence": "the render mode", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "RenderMode" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Billboard\",\"Trail\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RenderMode", + "group": "3D particle emitter configuration", + "name": "SetRenderMode", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setRenderMode(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the trail properties because the RenderMode setter reset them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "\"Trail\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" }, { "functionName": "onHotReloading" @@ -23869,6 +24708,12 @@ }, { "functionName": "SetShouldAutodestruct" + }, + { + "functionName": "RenderMode" + }, + { + "functionName": "SetRenderMode" } ] }, @@ -23906,6 +24751,35 @@ "functionName": "SetGravity" } ] + }, + { + "folderName": "3D particle emitter trail configuration", + "children": [ + { + "functionName": "TrailStartLengthMin" + }, + { + "functionName": "SetTrailStartLengthMin" + }, + { + "functionName": "TrailStartLengthMax" + }, + { + "functionName": "SetTrailStartLengthMax" + }, + { + "functionName": "IsTrailFollowingLocalOrigin" + }, + { + "functionName": "SetIsTrailFollowingLocalOrigin" + }, + { + "functionName": "TrailEndWidthRatio" + }, + { + "functionName": "SetTrailEndWidthRatio" + } + ] } ] }, @@ -24117,11 +24991,81 @@ "group": "Position", "hidden": true, "name": "RotationY" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start min length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMin" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start max length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMax" + }, + { + "value": "Billboard", + "type": "Choice", + "label": "Render mode", + "choices": [ + { + "label": "Image facing the camera", + "value": "Billboard" + }, + { + "label": "Image following a trail", + "value": "Trail" + } + ], + "advanced": true, + "name": "RenderMode" + }, + { + "value": "", + "type": "Boolean", + "label": "Follow the object", + "group": "Trail", + "advanced": true, + "name": "IsTrailFollowingLocalOrigin" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail end width ratio", + "group": "Trail", + "advanced": true, + "name": "TrailEndWidthRatio" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ + { + "propertyName": "Flow" + }, + { + "propertyName": "LifespanMin" + }, + { + "propertyName": "LifespanMax" + }, + { + "propertyName": "Duration" + }, + { + "propertyName": "ShouldAutodestruct" + }, + { + "propertyName": "RenderMode" + }, { "folderName": "Color", "children": [ @@ -24142,9 +25086,6 @@ } ] }, - { - "propertyName": "Flow" - }, { "folderName": "Size", "children": [ @@ -24159,6 +25100,23 @@ } ] }, + { + "folderName": "Trail", + "children": [ + { + "propertyName": "TrailStartLengthMin" + }, + { + "propertyName": "TrailStartLengthMax" + }, + { + "propertyName": "TrailEndWidthRatio" + }, + { + "propertyName": "IsTrailFollowingLocalOrigin" + } + ] + }, { "folderName": "Speed", "children": [ @@ -24179,15 +25137,6 @@ } ] }, - { - "propertyName": "LifespanMin" - }, - { - "propertyName": "LifespanMax" - }, - { - "propertyName": "Duration" - }, { "folderName": "Position", "children": [ @@ -24205,9 +25154,6 @@ } ] }, - { - "propertyName": "ShouldAutodestruct" - }, { "propertyName": "ParentOrigin" } @@ -27920,7 +28866,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -27929,7 +28875,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -30615,6 +31561,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -32094,6 +33137,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -32216,6 +33266,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, diff --git a/examples/starting-3d-tile-placement/starting-3d-tile-placement.json b/examples/starting-3d-tile-placement/starting-3d-tile-placement.json index 180c99326..b0b9e31f3 100644 --- a/examples/starting-3d-tile-placement/starting-3d-tile-placement.json +++ b/examples/starting-3d-tile-placement/starting-3d-tile-placement.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-top-down", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-3d-tile-placement", "description": "", @@ -210,7 +209,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.2817259932079574, + "zoomFactor": 0.2912258866911128, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -642,6 +641,7 @@ { "assetStoreId": "", "name": "Unit", + "persistentUuid": "9967791f-0b52-48f1-b975-b79cbb8f7063", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -667,6 +667,7 @@ { "assetStoreId": "", "name": "Tower", + "persistentUuid": "d41aa69a-7c2f-4239-b8e6-89b155b04218", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -692,6 +693,7 @@ { "assetStoreId": "", "name": "Tree", + "persistentUuid": "d8d64c5a-3e87-4cbd-a1b2-c04e8fc07052", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -1352,8 +1354,8 @@ "elevation": 40, "frustumSize": 3000, "intensity": 0.75, - "minimumShadowBias": 0, - "rotation": 300 + "minimumShadowBias": 0.000001, + "rotation": 40 }, "stringParameters": { "color": "255;255;255", @@ -1677,7 +1679,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1686,7 +1688,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -4372,6 +4374,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -5851,6 +5950,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5973,6 +6079,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, diff --git a/examples/starting-3d-top-down-rpg/assets/StartingWall.png b/examples/starting-3d-top-down-rpg/assets/StartingWall.png index 78edfe5fb..ea50f81d9 100644 Binary files a/examples/starting-3d-top-down-rpg/assets/StartingWall.png and b/examples/starting-3d-top-down-rpg/assets/StartingWall.png differ diff --git a/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json b/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json index b2432a56d..9cd97e8e9 100644 --- a/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json +++ b/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -256,7 +256,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.20902556228335842, + "zoomFactor": 0.2817259932079644, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -577,9 +577,8 @@ { "angle": 0, "customSize": true, - "depth": 410, + "depth": 448, "height": 320, - "keepRatio": true, "layer": "", "name": "Building_Obstacle", "persistentUuid": "d9cfd4f5-2075-4178-aef2-c0ecc9b86e80", @@ -665,6 +664,7 @@ { "assetStoreId": "", "name": "Ground", + "persistentUuid": "d00ba412-c1f7-4d81-9bcb-dfac281408c4", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -857,6 +857,7 @@ { "assetStoreId": "", "name": "Building_Obstacle", + "persistentUuid": "5169d11c-2c06-4b3c-820f-5559751fc212", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -880,12 +881,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "tint": "255;255;255", "isCastingShadow": true, @@ -1494,6 +1495,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3478,12 +3480,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4382,6 +4466,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4462,6 +4547,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4542,6 +4628,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4634,6 +4721,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4713,8 +4870,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5201,6 +5361,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5281,8 +5461,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5456,6 +5639,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5524,8 +5715,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5620,159 +5814,178 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "choices": [], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "group": "Controls", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "group": "Controls", - "name": "JumpButton" - } - ], - "propertiesFolderStructure": { + "eventsFunctionsFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "PhysicsCharacter3D" - }, - { - "propertyName": "ControllerIdentifier" - }, - { - "folderName": "Controls", - "children": [ - { - "propertyName": "JoystickIdentifier" - }, - { - "propertyName": "JumpButton" - } - ] + "functionName": "doStepPreEvents" } ] - } - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5841,8 +6054,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6083,6 +6299,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -6163,6 +6380,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6243,6 +6461,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6323,6 +6542,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6403,6 +6623,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6483,6 +6704,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6563,6 +6785,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6643,6 +6866,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6723,6 +6947,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6759,6 +6984,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6949,8 +7259,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7063,6 +7376,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7151,8 +7472,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7659,6 +7983,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7749,8 +8081,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8811,6 +9146,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8883,6 +9219,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8955,6 +9292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8988,6 +9326,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -9102,6 +9519,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -9110,7 +9528,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -9142,12 +9560,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10221,6 +10645,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -10315,8 +10774,11 @@ { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10611,6 +11073,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -10691,6 +11154,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -10771,6 +11235,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -10807,6 +11272,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10880,8 +11379,11 @@ { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11085,6 +11587,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -11165,6 +11668,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -11245,6 +11749,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -11281,6 +11786,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11354,8 +11893,11 @@ { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11672,6 +12214,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -12191,6 +12830,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -12271,6 +12911,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -12351,6 +12992,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -12432,6 +13074,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -12513,6 +13156,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -12593,6 +13237,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -12673,6 +13318,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -12709,6 +13355,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13065,6 +13790,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -13187,6 +13919,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, @@ -13211,8 +13946,11 @@ { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -13622,6 +14360,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -13702,6 +14441,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -13782,6 +14522,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -13862,6 +14603,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -13942,6 +14684,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -14023,6 +14766,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -14104,6 +14848,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -14140,6 +14885,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14568,8 +15377,11 @@ { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -14980,6 +15792,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -15062,6 +15875,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -15144,6 +15958,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -15226,6 +16041,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -15308,6 +16124,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -15391,6 +16208,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -15474,6 +16292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -15511,6 +16330,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15925,7 +16808,8 @@ }, { "author": "", - "category": "Input", + "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Two choices dialog boxes", "gdevelopVersion": ">=5.5.230", @@ -15933,11 +16817,13 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIxMSIgeDI9IjI5IiB5Mj0iMTEiLz4NCjxnPg0KCTxwYXRoIGQ9Ik03LDlDNi43LDksNi41LDguOSw2LjMsOC43QzYuMSw4LjUsNiw4LjMsNiw4YzAtMC4zLDAuMS0wLjUsMC4zLTAuN2MwLDAsMC4xLTAuMSwwLjEtMC4xYzAuMSwwLDAuMS0wLjEsMC4yLTAuMQ0KCQlDNi43LDcsNi43LDcsNi44LDdjMC4xLDAsMC4zLDAsMC40LDBjMC4xLDAsMC4xLDAsMC4yLDAuMWMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMCwwLDAuMSwwLjEsMC4xLDAuMWMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuMw0KCQlDOCw3LjcsOCw3LjksOCw4YzAsMC4xLDAsMC4zLTAuMSwwLjRDNy45LDguNSw3LjgsOC42LDcuNyw4LjdDNy41LDguOSw3LjMsOSw3LDl6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsOUM5LjcsOSw5LjUsOC45LDkuMyw4LjdDOS4xLDguNSw5LDguMyw5LDhjMC0wLjEsMC0wLjMsMC4xLTAuNGMwLjEtMC4xLDAuMS0wLjIsMC4yLTAuM2MwLjEtMC4xLDAuMi0wLjIsMC4zLTAuMg0KCQlDMTAsNi45LDEwLjQsNywxMC43LDcuM2MwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxMSw3LjcsMTEsNy45LDExLDhjMCwwLjMtMC4xLDAuNS0wLjMsMC43QzEwLjUsOC45LDEwLjMsOSwxMCw5eiIvPg0KPC9nPg0KPGc+DQoJPHBhdGggZD0iTTEzLDljLTAuMSwwLTAuMywwLTAuNC0wLjFjLTAuMS0wLjEtMC4yLTAuMS0wLjMtMC4yYy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM0MxMiw4LjMsMTIsOC4xLDEyLDhjMC0wLjEsMC0wLjMsMC4xLTAuNA0KCQljMC4xLTAuMSwwLjEtMC4yLDAuMi0wLjNjMC40LTAuNCwxLTAuNCwxLjQsMGMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxNCw3LjcsMTQsNy45LDE0LDhjMCwwLjEsMCwwLjMtMC4xLDAuNA0KCQljLTAuMSwwLjEtMC4xLDAuMi0wLjIsMC4zQzEzLjUsOC45LDEzLjMsOSwxMyw5eiIvPg0KPC9nPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDVINUMzLjksNSwzLDUuOSwzLDd2MThjMCwxLjEsMC45LDIsMiwyaDIyYzEuMSwwLDItMC45LDItMlY3QzI5LDUuOSwyOC4xLDUsMjcsNXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMywyM0g5Yy0xLjEsMC0yLTAuOS0yLTJ2LTRjMC0xLjEsMC45LTIsMi0yaDE0YzEuMSwwLDIsMC45LDIsMnY0QzI1LDIyLjEsMjQuMSwyMywyMywyM3oiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE1LDE5IDE2LDIwIDE4LDE4ICIvPg0KPC9zdmc+DQo=", "name": "TwoChoicesDialogBoxes", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", - "shortDescription": "A dialog box with buttons to let users make a choice.", - "version": "0.3.0", + "shortDescription": "Two-choice dialog box with keyboard, gamepad, and touch support. Customizable text.", + "version": "0.3.2", "description": [ "A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.", - "It handles keyboard, gamepad and touch controls." + "It handles keyboard, gamepad and touch controls.", + "", + "There are ready-to-use dialog boxes in the asset-store [dialog boxes pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=dialog-boxes-dialog-boxes)." ], "origin": { "identifier": "TwoChoicesDialogBoxes", @@ -15957,7 +16843,38 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -15967,13 +16884,17 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "dialog boxes", "defaultName": "", "description": "A dialog box showing two options.", "fullName": "Two choices dialog box ", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "TwoChoicesDialogBox", + "previewIconUrl": "", "objects": [ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", @@ -16380,287 +17301,305 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Buttons", - "" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlaySound" + "inverted": true, + "value": "TwoChoicesDialogBoxes::IsInGameEdition" }, "parameters": [ "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - }, - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "Buttons.ID", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, "parameters": [ - "", - "NumpadLeft" + "Buttons", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "", - "Left" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "1", - "\"Left\"", - "\"Left\"", + "Object", + "=", + "Buttons.ID", "" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "-", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadLeft" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Left\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "KeyPressed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "NumpadRight" + "Object", + "-", + "1", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "PlaySound" }, "parameters": [ "", - "Right" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadRight" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "+", "1", - "\"Right\"", "" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "\"Right\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "+", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "EnableEscape", - "True", - "" - ] + "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Escape" + "EnableEscape", + "True", + "" ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Escape" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "=", "1", - "\"B\"", "" ] } ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "1", - "" - ] } ] } @@ -16697,6 +17636,28 @@ "=", "TextMessage" ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "YesButton", + "=", + "LabelButtonID0", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "NoButton", + "=", + "LabelButtonID1", + "" + ] } ] } @@ -17024,6 +17985,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ActiveButtonById", + "group": "Dialog Box configuration", "name": "SetActiveButtonById", "private": true, "sentence": "", @@ -17154,6 +18116,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TextMessage", + "group": "Dialog Box configuration", "name": "SetTextMessage", "private": true, "sentence": "", @@ -17197,6 +18160,43 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "IsYesClicked" + }, + { + "functionName": "IsNoClicked" + }, + { + "folderName": "Dialog Box configuration", + "children": [ + { + "functionName": "ActiveButtonById" + }, + { + "functionName": "SetActiveButtonById" + }, + { + "functionName": "TextMessage" + }, + { + "functionName": "SetTextMessage" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "Default message. Continue?", @@ -17253,6 +18253,16 @@ ], "hidden": true, "name": "_PropertyMapping" + }, + { + "value": "", + "type": "Resource", + "label": "Sound at hovering", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "HoveredSound" } ], "propertiesFolderStructure": { @@ -17275,6 +18285,9 @@ }, { "propertyName": "_PropertyMapping" + }, + { + "propertyName": "HoveredSound" } ] }, @@ -17878,15 +18891,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", - "fullName": "Panel sprite button", + "fullName": "Labeled button", "gdevelopVersion": ">=5.5.230", "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": "2.1.1", + "shortDescription": "Resizeable button with a label.", + "version": "2.2.0", "description": [ "A button that can be used for menus and most labelled buttons of a game. 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.", "", @@ -17936,12 +18950,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -18941,40 +19966,1060 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "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": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "State", - "=", - "\"PressedOutside\"" + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "True" + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } ] } ] @@ -18984,145 +21029,141 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "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", + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "TouchId" - ] - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "choices": [ - { - "label": "Idle", - "value": "Idle" - }, - { - "label": "Hovered", - "value": "Hovered" - }, - { - "label": "PressedInside", - "value": "PressedInside" - }, - { - "label": "PressedOutside", - "value": "PressedOutside" - }, - { - "label": "Validated", - "value": "Validated" - } - ], - "hidden": true, - "name": "State" + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "hidden": true, - "name": "TouchId" + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" }, { "value": "", "type": "Boolean", - "label": "Touch is inside", + "label": "", "hidden": true, - "name": "TouchIsInside" + "name": "IsHovered" }, { "value": "", - "type": "Boolean", - "label": "Mouse is inside", + "type": "String", + "label": "Idle text", "hidden": true, - "name": "MouseIsInside" + "name": "IdleText" }, { "value": "", - "type": "Number", - "label": "", + "type": "Color", + "label": "Idle color", "hidden": true, - "name": "Index" + "name": "IdleColor" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "ShouldCheckHovering" + "propertyName": "IsHovered" }, { - "propertyName": "State" + "propertyName": "HoverPrefix" }, { - "propertyName": "TouchId" + "propertyName": "HoverSuffix" }, { - "propertyName": "TouchIsInside" + "propertyName": "IdleText" }, { - "propertyName": "MouseIsInside" + "propertyName": "HoverColor" }, { - "propertyName": "Index" + "propertyName": "IdleColor" } ] } @@ -19136,12 +21177,16 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "menu buttons", "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", + "description": "Button with a label.", + "fullName": "Labeled button", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -19163,6 +21208,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Text", @@ -19310,6 +21366,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -19437,7 +21503,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -19690,6 +21772,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19845,29 +21949,34 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" }, "parameters": [ - "Object", - "=", - "0", + "Label", + "TextStyleState", + "", "" ] }, { "type": { - "value": "Cache" + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" }, "parameters": [ - "Idle" + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" ] }, { "type": { - "value": "Montre" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Hovered", + "Object", + "=", + "0", "" ] }, @@ -19876,28 +21985,64 @@ "value": "Cache" }, "parameters": [ - "Pressed" + "Idle" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "Montre" }, "parameters": [ "Hovered", - "Tween", - "\"Fadeout\"" + "" ] }, { "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" + "value": "Cache" }, "parameters": [ - "Hovered", - "Opacity", - "=", - "255" + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } ] } ] @@ -19922,6 +22067,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19980,6 +22147,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -20560,6 +22749,56 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20588,6 +22827,7 @@ "type": "Number", "unit": "Pixel", "label": "", + "group": "States", "hidden": true, "name": "LabelOffset" }, @@ -20615,6 +22855,9 @@ { "propertyName": "LabelText" }, + { + "propertyName": "_PropertyMapping" + }, { "folderName": "States", "children": [ @@ -20623,14 +22866,11 @@ }, { "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" } ] - }, - { - "propertyName": "LabelOffset" - }, - { - "propertyName": "_PropertyMapping" } ] }, @@ -20664,6 +22904,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -20811,6 +23062,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -20971,6 +23232,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -21118,6 +23390,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -21254,6 +23536,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -21261,8 +23544,8 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", - "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.8.1", + "shortDescription": "Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.", + "version": "0.9.1", "description": [ "Add support for gamepads (or other physical controllers).", "", @@ -21294,7 +23577,8 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], @@ -21353,83 +23637,343 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", + " }\r", + "\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", + " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", + "\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function addFrameBeginningTaskIfNeeded(runtimeScene) {\r", + " const taskManager = runtimeScene.getAsyncTasksManager();\r", + " for (const taskWithCallback of taskManager.tasksWithCallback) {\r", + " if (taskWithCallback.asyncTask === frameBeginningTask) {\r", + " return;\r", + " }\r", " }\r", + " // Async tasks are run before everything.\r", + " // This is a hack to make sure that button states are updated\r", + " // before mapping behavior events.\r", + " taskManager.addTask(frameBeginningTask);\r", + "}\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function onScenePostEvents(runtimeScene) {\r", + " addFrameBeginningTaskIfNeeded(runtimeScene);\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -21438,44 +23982,53 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", - "\r", - " v = v - Math.sign(v) * DEADZONE;\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + " addFrameBeginningTaskIfNeeded,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -21488,59 +24041,30 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "gdjs._extensionController.onScenePostEvents(runtimeScene);", "" ], "parameterObjects": "", @@ -21978,27 +24502,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -22026,12 +24543,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -22048,43 +24565,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", - "\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -22097,12 +24599,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22126,7 +24628,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -22138,12 +24640,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22160,40 +24662,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -22206,12 +24695,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -22229,18 +24718,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -22249,11 +24731,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -22350,7 +24833,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22378,26 +24861,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -22435,26 +24912,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 3 : 1;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -22492,136 +24963,57 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed 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 just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -22631,12 +25023,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -22653,17 +25045,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -22676,7 +25060,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22692,46 +25076,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -22742,7 +25090,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22758,35 +25106,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -22799,7 +25130,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22821,20 +25152,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", - "" + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" ], "parameterObjects": "", "useStrict": true, @@ -22857,127 +25184,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -22988,7 +25204,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23015,15 +25231,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -23036,7 +25246,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23052,18 +25262,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -23074,7 +25278,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23095,141 +25299,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -23240,7 +25331,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23260,24 +25351,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -23301,22 +25392,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -23331,7 +25413,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23347,28 +25429,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -23383,7 +25451,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23404,17 +25472,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -23427,7 +25487,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23443,25 +25503,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -23478,7 +25529,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23499,35 +25550,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -23535,11 +25570,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23549,7 +25584,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23580,39 +25615,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -23621,8 +25639,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23632,7 +25650,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -23663,54 +25681,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", - "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", - "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -23720,7 +25694,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23736,8 +25710,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23750,7 +25724,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23766,8 +25740,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23780,19 +25754,120 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24276,6 +26351,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24388,8 +26471,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24502,6 +26588,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24604,8 +26698,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24707,6 +26804,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24829,8 +26934,11 @@ { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -25071,6 +27179,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -25151,6 +27260,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -25231,6 +27341,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -25311,6 +27422,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -25391,6 +27503,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -25471,6 +27584,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -25551,6 +27665,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -25631,6 +27746,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -25711,6 +27827,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -25747,6 +27864,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25931,8 +28133,11 @@ { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26216,6 +28421,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -26328,8 +28541,11 @@ { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26907,6 +29123,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -27002,6 +29226,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -27222,12 +29447,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": ">=5.5.222", @@ -27267,12 +29509,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -29172,6 +31420,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -29312,6 +31561,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ @@ -31669,6 +33919,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -32204,8 +34589,11 @@ { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -32423,6 +34811,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -32615,4 +35011,4 @@ } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-twin-stick-shooter/starting-3d-twin-stick-shooter.json b/examples/starting-3d-twin-stick-shooter/starting-3d-twin-stick-shooter.json index 68db1b4e6..0506f5259 100644 --- a/examples/starting-3d-twin-stick-shooter/starting-3d-twin-stick-shooter.json +++ b/examples/starting-3d-twin-stick-shooter/starting-3d-twin-stick-shooter.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -201,7 +201,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.34375202416123274, + "zoomFactor": 0.405751890594384, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -559,6 +559,7 @@ { "assetStoreId": "", "name": "Player", + "persistentUuid": "5784e63a-7663-401f-bddd-aea5a2ee5bd3", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -1289,6 +1290,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3273,12 +3275,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4177,6 +4261,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4257,6 +4342,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4337,6 +4423,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4429,6 +4516,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4508,8 +4665,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4996,6 +5156,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5076,8 +5256,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5251,6 +5434,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5319,8 +5510,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5415,6 +5609,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5483,8 +5685,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5568,6 +5773,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5636,8 +5849,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5878,6 +6094,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5958,6 +6175,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6038,6 +6256,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6118,6 +6337,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6198,6 +6418,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6278,6 +6499,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6358,6 +6580,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6438,6 +6661,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6518,6 +6742,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6554,6 +6779,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6744,8 +7054,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6858,6 +7171,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6946,8 +7267,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7454,6 +7778,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7544,8 +7876,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8606,6 +8941,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8678,6 +9014,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8750,6 +9087,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8783,41 +9121,120 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Joystick name", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "name": "DeadZoneRadius" - }, - { - "value": "Center-center", - "type": "String", - "label": "", - "description": "Only used by the scene editor.", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], @@ -8897,15 +9314,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8936,12 +9354,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -9099,11 +9524,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -9138,11 +9562,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -9200,12 +9625,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -9299,22 +9724,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -9456,22 +9881,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9649,46 +10074,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9725,22 +10146,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9795,11 +10216,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9842,11 +10262,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9892,44 +10311,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -10095,11 +10510,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -10110,22 +10525,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -10145,7 +10562,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -10165,11 +10582,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -10180,22 +10597,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -10215,7 +10634,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -10235,13 +10654,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -10261,7 +10679,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -10281,13 +10699,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -10307,7 +10724,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -10327,13 +10744,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -10353,7 +10769,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -10373,13 +10789,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -10399,7 +10814,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -10419,13 +10834,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10444,8 +10858,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -10465,13 +10879,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10491,7 +10904,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10511,13 +10924,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10537,7 +10949,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10557,13 +10969,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10583,7 +10994,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10603,24 +11014,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10640,7 +11049,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10660,24 +11069,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10697,7 +11104,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10717,24 +11124,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10754,7 +11159,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10774,24 +11179,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10811,7 +11214,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10862,6 +11265,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10871,11 +11275,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10931,7 +11334,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10952,7 +11355,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -11003,32 +11406,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -11060,6 +11451,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -11113,13 +11516,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -11139,7 +11541,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -11159,13 +11561,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -11185,7 +11586,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -11455,22 +11856,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11676,22 +12075,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11754,11 +12151,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11802,22 +12198,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11908,11 +12302,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11954,11 +12347,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11967,11 +12359,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -12116,11 +12507,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -12173,22 +12563,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12349,22 +12737,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12404,22 +12790,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12444,22 +12828,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12473,22 +12855,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12501,11 +12881,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -12530,22 +12909,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12559,22 +12936,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12587,11 +12962,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12645,44 +13019,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12696,44 +13066,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12784,22 +13150,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12878,22 +13242,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12980,22 +13342,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -13066,33 +13426,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -13105,33 +13462,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -13192,22 +13546,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -13287,22 +13639,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13315,22 +13665,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13416,62 +13764,197 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "0.9", - "type": "Number", - "label": "Leftward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "LeftwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Rightward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "RightwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Upward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "UpwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Downward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "DownwardSpeed" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on X axis", - "name": "FollowOnX" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on Y axis", - "name": "FollowOnY" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Follow free area left border", - "group": "Position", - "advanced": true, - "name": "FollowFreeAreaLeft" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Follow free area right border", - "group": "Position", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.9", + "type": "Number", + "label": "Leftward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "LeftwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Rightward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "RightwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "UpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "DownwardSpeed" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on X axis", + "name": "FollowOnX" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on Y axis", + "name": "FollowOnY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area left border", + "group": "Position", + "advanced": true, + "name": "FollowFreeAreaLeft" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area right border", + "group": "Position", "advanced": true, "name": "FollowFreeAreaRight" }, @@ -13951,8 +14434,12 @@ { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -14169,6 +14656,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14362,15 +14857,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -14413,13 +14909,124 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15791,6 +16398,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -15924,6 +16532,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -16057,6 +16666,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -16190,6 +16800,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -16540,6 +17151,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -16673,6 +17285,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -16806,6 +17419,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -16939,6 +17553,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -17072,6 +17687,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -17205,6 +17821,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -17485,6 +18102,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -17719,6 +18337,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -17852,6 +18471,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -19089,37 +19709,332 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0.1", - "type": "Number", - "unit": "Second", - "label": "Firing cooldown", - "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], - "name": "FireCooldown" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HasJustFired" - }, - { - "value": "true", - "type": "Boolean", - "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "name": "RotateBullet" + }, + { + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Firing cooldown", + "description": "Objects cannot shoot while firing cooldown is active.", + "name": "FireCooldown" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasJustFired" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "name": "RotateBullet" }, { "value": "45", @@ -19128,7 +20043,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -19137,7 +20051,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -19147,7 +20060,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -19158,7 +20070,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -19166,9 +20077,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -19178,7 +20086,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -19189,7 +20096,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -19197,9 +20103,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -19207,9 +20111,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -19218,8 +20119,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -19227,9 +20126,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -19237,9 +20133,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -19247,118 +20141,764 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, { - "value": "true", - "type": "Boolean", - "label": "Unlimited ammo", - "description": "", - "group": "Ammo", - "extraInformation": [], - "advanced": true, - "name": "UnlimitedAmmo" - }, + "value": "true", + "type": "Boolean", + "label": "Unlimited ammo", + "group": "Ammo", + "advanced": true, + "name": "UnlimitedAmmo" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ReloadInProgress" + }, + { + "value": "0", + "type": "Number", + "label": "Heat increase per shot (between 0 and 1)", + "description": " Object is overheated when Heat reaches 1.", + "group": "Overheat", + "advanced": true, + "name": "HeatIncreasePerShot" + }, + { + "value": "0", + "type": "Number", + "label": "Heat level (Range: 0 to 1)", + "hidden": true, + "name": "HeatLevel" + }, + { + "value": "true", + "type": "Boolean", + "label": "Reload automatically", + "group": "Reload", + "advanced": true, + "name": "AutomaticReloading" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Overheat duration", + "description": "Object cannot shoot while overheat duration is active.", + "group": "Overheat", + "advanced": true, + "name": "OverheatDuration" + }, + { + "value": "0.1", + "type": "Number", + "label": "Linear cooling rate (per second)", + "group": "Overheat", + "advanced": true, + "name": "LinearCoolingRate" + }, + { + "value": "0.3", + "type": "Number", + "label": "Exponential cooling rate (per second)", + "description": "Happens faster when heat is high and slower when heat is low.", + "group": "Overheat", + "extraInformation": [ + "Linear", + "Exponential" + ], + "choices": [], + "advanced": true, + "name": "ExponentialCoolingRate" + }, + { + "value": "", + "type": "String", + "label": "Layer the bullets are created on", + "description": "Base layer by default.", + "group": "Shooting configuration", + "hidden": true, + "name": "BulletLayer" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "RandomizedAngle" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ { "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ReloadInProgress" - }, - { - "value": "0", - "type": "Number", - "label": "Heat increase per shot (between 0 and 1)", - "description": " Object is overheated when Heat reaches 1.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "HeatIncreasePerShot" - }, - { - "value": "0", - "type": "Number", - "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HeatLevel" - }, - { - "value": "true", - "type": "Boolean", - "label": "Reload automatically", - "description": "", - "group": "Reload", - "extraInformation": [], - "advanced": true, - "name": "AutomaticReloading" - }, - { - "value": "0", - "type": "Number", - "unit": "Second", - "label": "Overheat duration", - "description": "Object cannot shoot while overheat duration is active.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "OverheatDuration" - }, - { - "value": "0.1", - "type": "Number", - "label": "Linear cooling rate (per second)", - "description": "", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "LinearCoolingRate" - }, - { - "value": "0.3", - "type": "Number", - "label": "Exponential cooling rate (per second)", - "description": "Happens faster when heat is high and slower when heat is low.", - "group": "Overheat", + "type": "Behavior", + "label": "3D capability", "extraInformation": [ - "Linear", - "Exponential" + "Scene3D::Base3DBehavior" ], - "advanced": true, - "name": "ExponentialCoolingRate" + "choices": [], + "name": "Object3D" }, { "value": "", - "type": "String", - "label": "Layer the bullets are created on", - "description": "Base layer by default.", - "group": "Shooting configuration", - "extraInformation": [], - "hidden": true, - "name": "BulletLayer" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "RandomizedAngle" + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] @@ -19366,6 +20906,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -19586,9 +21127,25 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-3d-vampire-survivor/starting-3d-vampire-survivor.json b/examples/starting-3d-vampire-survivor/starting-3d-vampire-survivor.json index 5529e4795..f511860dd 100644 --- a/examples/starting-3d-vampire-survivor/starting-3d-vampire-survivor.json +++ b/examples/starting-3d-vampire-survivor/starting-3d-vampire-survivor.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 253, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -1112,6 +1112,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3096,12 +3097,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4000,6 +4083,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4080,6 +4164,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4160,6 +4245,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4252,6 +4338,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4331,8 +4487,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4819,6 +4978,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4899,8 +5078,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5074,6 +5256,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5142,8 +5332,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5238,6 +5431,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5306,8 +5507,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5391,6 +5595,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5459,8 +5671,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5701,6 +5916,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5781,6 +5997,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5861,6 +6078,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5941,6 +6159,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6021,6 +6240,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6101,6 +6321,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6181,6 +6402,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6261,6 +6483,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6341,6 +6564,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6377,6 +6601,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6567,8 +6876,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6681,6 +6993,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6769,8 +7089,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7277,6 +7600,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7367,8 +7698,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8429,6 +8763,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8501,6 +8836,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8573,6 +8909,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8606,41 +8943,120 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Joystick name", - "choices": [ - { - "label": "Primary", - "value": "Primary" - }, - { - "label": "Secondary", - "value": "Secondary" - } - ], - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "name": "DeadZoneRadius" - }, - { - "value": "Center-center", - "type": "String", - "label": "", - "description": "Only used by the scene editor.", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], @@ -8720,15 +9136,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8759,12 +9176,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8922,11 +9346,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -8961,11 +9384,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -9023,12 +9447,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -9122,22 +9546,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -9279,22 +9703,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9472,46 +9896,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9548,22 +9968,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9618,11 +10038,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9665,11 +10084,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9715,44 +10133,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -9918,11 +10332,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -9933,22 +10347,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -9968,7 +10384,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -9988,11 +10404,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -10003,22 +10419,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -10038,7 +10456,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -10058,13 +10476,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -10084,7 +10501,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -10104,13 +10521,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -10130,7 +10546,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -10150,13 +10566,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -10176,7 +10591,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -10196,13 +10611,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -10222,7 +10636,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -10242,13 +10656,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10267,8 +10680,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -10288,13 +10701,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10314,7 +10726,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10334,13 +10746,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10360,7 +10771,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10380,13 +10791,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10406,7 +10816,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10426,24 +10836,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10463,7 +10871,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10483,24 +10891,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10520,7 +10926,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10540,24 +10946,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10577,7 +10981,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10597,24 +11001,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10634,7 +11036,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10685,6 +11087,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10694,11 +11097,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10754,7 +11156,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10775,7 +11177,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10826,32 +11228,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -10883,6 +11273,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10936,13 +11338,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -10962,7 +11363,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -10982,13 +11383,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -11008,7 +11408,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -11278,22 +11678,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11499,22 +11897,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11577,11 +11973,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11625,22 +12020,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11731,11 +12124,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11777,11 +12169,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11790,11 +12181,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -11939,11 +12329,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -11996,22 +12385,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12172,22 +12559,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12227,22 +12612,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12267,22 +12650,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12296,22 +12677,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12324,11 +12703,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -12353,22 +12731,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12382,22 +12758,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12410,11 +12784,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12468,44 +12841,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12519,44 +12888,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12607,22 +12972,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12701,22 +13064,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12803,22 +13164,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -12889,33 +13248,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -12928,33 +13284,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -13015,22 +13368,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -13110,22 +13461,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13138,22 +13487,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13239,62 +13586,197 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "0.9", - "type": "Number", - "label": "Leftward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "LeftwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Rightward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "RightwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Upward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "UpwardSpeed" - }, - { - "value": "0.9", - "type": "Number", - "label": "Downward catch-up speed (in ratio per second)", - "group": "Catch-up speed", - "name": "DownwardSpeed" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on X axis", - "name": "FollowOnX" - }, - { - "value": "true", - "type": "Boolean", - "label": "Follow on Y axis", - "name": "FollowOnY" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Follow free area left border", - "group": "Position", - "advanced": true, - "name": "FollowFreeAreaLeft" - }, - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Follow free area right border", - "group": "Position", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.9", + "type": "Number", + "label": "Leftward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "LeftwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Rightward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "RightwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "UpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward catch-up speed (in ratio per second)", + "group": "Catch-up speed", + "name": "DownwardSpeed" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on X axis", + "name": "FollowOnX" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on Y axis", + "name": "FollowOnY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area left border", + "group": "Position", + "advanced": true, + "name": "FollowFreeAreaLeft" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area right border", + "group": "Position", "advanced": true, "name": "FollowFreeAreaRight" }, @@ -13774,8 +14256,12 @@ { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13992,6 +14478,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14185,15 +14679,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -14236,13 +14731,124 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15614,6 +16220,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -15747,6 +16354,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -15880,6 +16488,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -16013,6 +16622,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -16363,6 +16973,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -16496,6 +17107,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -16629,6 +17241,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -16762,6 +17375,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -16895,6 +17509,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -17028,6 +17643,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -17308,6 +17924,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -17542,6 +18159,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -17675,6 +18293,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -18912,37 +19531,332 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0.1", - "type": "Number", - "unit": "Second", - "label": "Firing cooldown", - "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], - "name": "FireCooldown" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HasJustFired" - }, - { - "value": "true", - "type": "Boolean", - "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "name": "RotateBullet" + }, + { + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Firing cooldown", + "description": "Objects cannot shoot while firing cooldown is active.", + "name": "FireCooldown" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasJustFired" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "name": "RotateBullet" }, { "value": "45", @@ -18951,7 +19865,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -18960,7 +19873,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -18970,7 +19882,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -18981,7 +19892,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -18989,9 +19899,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -19001,7 +19908,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -19012,7 +19918,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -19020,9 +19925,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -19030,9 +19933,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -19041,8 +19941,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -19050,9 +19948,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -19060,9 +19955,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -19070,118 +19963,764 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, { - "value": "true", - "type": "Boolean", - "label": "Unlimited ammo", - "description": "", - "group": "Ammo", - "extraInformation": [], - "advanced": true, - "name": "UnlimitedAmmo" - }, + "value": "true", + "type": "Boolean", + "label": "Unlimited ammo", + "group": "Ammo", + "advanced": true, + "name": "UnlimitedAmmo" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ReloadInProgress" + }, + { + "value": "0", + "type": "Number", + "label": "Heat increase per shot (between 0 and 1)", + "description": " Object is overheated when Heat reaches 1.", + "group": "Overheat", + "advanced": true, + "name": "HeatIncreasePerShot" + }, + { + "value": "0", + "type": "Number", + "label": "Heat level (Range: 0 to 1)", + "hidden": true, + "name": "HeatLevel" + }, + { + "value": "true", + "type": "Boolean", + "label": "Reload automatically", + "group": "Reload", + "advanced": true, + "name": "AutomaticReloading" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Overheat duration", + "description": "Object cannot shoot while overheat duration is active.", + "group": "Overheat", + "advanced": true, + "name": "OverheatDuration" + }, + { + "value": "0.1", + "type": "Number", + "label": "Linear cooling rate (per second)", + "group": "Overheat", + "advanced": true, + "name": "LinearCoolingRate" + }, + { + "value": "0.3", + "type": "Number", + "label": "Exponential cooling rate (per second)", + "description": "Happens faster when heat is high and slower when heat is low.", + "group": "Overheat", + "extraInformation": [ + "Linear", + "Exponential" + ], + "choices": [], + "advanced": true, + "name": "ExponentialCoolingRate" + }, + { + "value": "", + "type": "String", + "label": "Layer the bullets are created on", + "description": "Base layer by default.", + "group": "Shooting configuration", + "hidden": true, + "name": "BulletLayer" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "RandomizedAngle" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ { "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ReloadInProgress" - }, - { - "value": "0", - "type": "Number", - "label": "Heat increase per shot (between 0 and 1)", - "description": " Object is overheated when Heat reaches 1.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "HeatIncreasePerShot" - }, - { - "value": "0", - "type": "Number", - "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HeatLevel" - }, - { - "value": "true", - "type": "Boolean", - "label": "Reload automatically", - "description": "", - "group": "Reload", - "extraInformation": [], - "advanced": true, - "name": "AutomaticReloading" - }, - { - "value": "0", - "type": "Number", - "unit": "Second", - "label": "Overheat duration", - "description": "Object cannot shoot while overheat duration is active.", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "OverheatDuration" - }, - { - "value": "0.1", - "type": "Number", - "label": "Linear cooling rate (per second)", - "description": "", - "group": "Overheat", - "extraInformation": [], - "advanced": true, - "name": "LinearCoolingRate" - }, - { - "value": "0.3", - "type": "Number", - "label": "Exponential cooling rate (per second)", - "description": "Happens faster when heat is high and slower when heat is low.", - "group": "Overheat", + "type": "Behavior", + "label": "3D capability", "extraInformation": [ - "Linear", - "Exponential" + "Scene3D::Base3DBehavior" ], - "advanced": true, - "name": "ExponentialCoolingRate" + "choices": [], + "name": "Object3D" }, { "value": "", - "type": "String", - "label": "Layer the bullets are created on", - "description": "Base layer by default.", - "group": "Shooting configuration", - "extraInformation": [], - "hidden": true, - "name": "BulletLayer" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "RandomizedAngle" + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] @@ -19189,6 +20728,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "First person 3D camera", "gdevelopVersion": ">=5.5.222", @@ -19409,9 +20949,25 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + }, + { + "functionName": "LookFrom3DObjectEyes" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-beatemup/starting-beatemup.json b/examples/starting-beatemup/starting-beatemup.json index 63d17c85d..d7778ea3b 100644 --- a/examples/starting-beatemup/starting-beatemup.json +++ b/examples/starting-beatemup/starting-beatemup.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -171,8 +171,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -196,14 +195,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5290357402156872, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -1954,6 +1956,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1971,6 +1974,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1999,6 +2003,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -2066,6 +2071,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -4050,12 +4056,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4954,6 +5042,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -5034,6 +5123,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -5114,6 +5204,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -5206,6 +5297,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5255,13 +5416,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5748,6 +5937,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5798,13 +6007,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5978,6 +6215,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6020,13 +6265,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6121,6 +6390,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6163,13 +6440,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6253,6 +6554,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6295,13 +6604,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6542,6 +6875,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -6622,6 +6956,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6702,6 +7037,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6782,6 +7118,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6862,6 +7199,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6942,6 +7280,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -7022,6 +7361,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -7102,6 +7442,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -7182,6 +7523,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -7218,6 +7560,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7337,27 +7764,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -7456,6 +7952,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7515,13 +8019,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8028,6 +8559,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8083,7 +8622,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -8097,8 +8657,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -8177,6 +8740,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -8203,6 +8767,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -9157,6 +9722,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -9229,6 +9795,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -9301,6 +9868,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -9334,6 +9902,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -9412,6 +10059,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -9419,6 +10095,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -9427,7 +10104,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -9459,12 +10136,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10538,6 +11221,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -10605,13 +11323,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10906,6 +11649,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -10986,6 +11730,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -11066,6 +11811,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -11102,6 +11848,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11146,13 +11926,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11356,6 +12163,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -11436,6 +12244,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -11516,6 +12325,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -11552,6 +12362,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11596,13 +12440,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11919,11 +12790,108 @@ } ], "parameters": [] - } - ], - "parameters": [ + }, { - "description": "Object", + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", "name": "Object", "type": "object" }, @@ -12438,6 +13406,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -12518,6 +13487,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -12598,6 +13568,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -12679,6 +13650,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -12760,6 +13732,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -12840,6 +13813,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -12920,6 +13894,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -12956,6 +13931,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13312,6 +14366,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -13383,13 +14444,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -13799,6 +14936,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -13879,6 +15017,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -13959,6 +15098,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -14039,6 +15179,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -14119,6 +15260,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -14200,6 +15342,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -14281,6 +15424,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -14317,6 +15461,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14693,13 +15901,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15110,6 +16368,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -15192,6 +16451,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -15274,6 +16534,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -15356,6 +16617,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -15438,6 +16700,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -15521,6 +16784,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -15604,6 +16868,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -15641,6 +16906,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16004,11 +17333,55 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-card-game/starting-card-game.json b/examples/starting-card-game/starting-card-game.json index b33fe0229..90d9f828c 100644 --- a/examples/starting-card-game/starting-card-game.json +++ b/examples/starting-card-game/starting-card-game.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -544,12 +544,11 @@ "metadata": "", "name": "assets\\card shuffle.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -573,14 +572,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5290357402156892, + "zoomFactor": 0.5653158055126366, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -2958,6 +2960,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -2975,6 +2978,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3053,6 +3057,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -3061,7 +3066,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -3093,12 +3098,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4172,6 +4183,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -4239,13 +4285,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4540,6 +4611,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -4620,6 +4692,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -4700,6 +4773,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -4736,6 +4810,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4780,13 +4888,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4990,6 +5125,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -5070,6 +5206,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -5150,6 +5287,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -5186,6 +5324,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5230,13 +5402,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5553,6 +5752,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -6072,6 +6368,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -6152,6 +6449,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -6232,6 +6530,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -6313,6 +6612,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6394,6 +6694,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6474,6 +6775,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -6554,6 +6856,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6590,6 +6893,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6946,6 +7328,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -7017,13 +7406,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -7433,6 +7898,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -7513,6 +7979,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -7593,6 +8060,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -7673,6 +8141,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7753,6 +8222,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7834,6 +8304,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7915,6 +8386,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7951,6 +8423,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8327,13 +8863,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -8744,6 +9330,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -8826,6 +9413,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -8908,6 +9496,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -8990,6 +9579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -9072,6 +9662,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -9155,6 +9746,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -9238,6 +9830,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -9275,6 +9868,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9638,7 +10295,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -9646,6 +10347,7 @@ { "author": "Tristan Rhodes (https://victrisgames.itch.io/)", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "Shake object", "gdevelopVersion": ">=5.5.222", @@ -9686,12 +10388,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Shake objects with translation and rotation.", "fullName": "Shake object (position, angle)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngle", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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. ", @@ -11672,14 +12380,36 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngle" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT" + } }, { "description": "Shake objects with translation, rotation and scale.", "fullName": "Shake object (position, angle, scale)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngleScale", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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.", @@ -14046,6 +14776,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngleScale" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14058,7 +14805,14 @@ "name": "Scale" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + } + ] + } } ], "eventsBasedObjects": [] @@ -14066,6 +14820,7 @@ { "author": "Arthur Pacaud (arthuro555)", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "Array tools", "gdevelopVersion": ">=5.5.222", @@ -14073,8 +14828,8 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjExIiB5MT0iNyIgeDI9IjI5IiB5Mj0iNyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjExIiB5MT0iMTYiIHgyPSIyMiIgeTI9IjE2Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTEiIHkxPSIyNSIgeDI9IjI5IiB5Mj0iMjUiLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjUiIGN5PSI3IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI1IiBjeT0iMTYiIHI9IjIiLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjUiIGN5PSIyNSIgcj0iMiIvPg0KPC9zdmc+DQo=", "name": "ArrayTools", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Text Editing/9bfb52500e68d0fd164b1e30bc696e40566187245b80c345848379f40bb6fad7_Text Editing_bullet_points_list.svg", - "shortDescription": "A collection of utilities and tools for working with arrays.", - "version": "3.0.0", + "shortDescription": "Array utilities: search, sort, shuffle, slice, concat, reverse, pop, random element access.", + "version": "3.0.1", "description": [ "This extension adds features like:", "- Combining arrays (concatenate into new array, append all children to another array)", @@ -14140,7 +14895,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -14158,7 +14913,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14181,7 +14936,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -14199,7 +14954,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14222,7 +14977,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue = ", @@ -14240,7 +14995,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14263,7 +15018,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -14281,7 +15036,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14304,7 +15059,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -14323,7 +15078,7 @@ "parameters": [ { "description": "Array to get a number from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14341,7 +15096,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -14360,7 +15115,7 @@ "parameters": [ { "description": "Array to get a string from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14372,13 +15127,13 @@ "functionType": "ExpressionAndCondition", "group": "Scene variables/Array access", "name": "PopNumber", - "sentence": "Remove last child of _PARAM1_ and store it in _PARAM2_", + "sentence": "Remove last child of _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14397,7 +15152,7 @@ "parameters": [ { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14415,7 +15170,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14434,7 +15189,7 @@ "parameters": [ { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14452,7 +15207,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14471,7 +15226,7 @@ "parameters": [ { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14489,7 +15244,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14508,7 +15263,7 @@ "parameters": [ { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14531,7 +15286,7 @@ "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", + "\"ArrayArg\"", "Temp" ] } @@ -14566,7 +15321,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14594,7 +15349,7 @@ "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", + "\"ArrayArg\"", "Temp" ] } @@ -14629,7 +15384,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14652,7 +15407,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -14685,7 +15440,7 @@ "parameters": [ { "description": "The array to take a slice from", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14719,7 +15474,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14742,7 +15497,7 @@ "parameters": [ { "description": "The array to remove items from", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14772,7 +15527,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const otherArray = eventsFunctionContext.getArgument(\"OtherArray\");", "/** @type {gdjs.Variable} */", @@ -14798,7 +15553,7 @@ "parameters": [ { "description": "The first array", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14826,7 +15581,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -14843,7 +15598,7 @@ "parameters": [ { "description": "The array to get the variables from", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14866,7 +15621,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14882,7 +15637,7 @@ "parameters": [ { "description": "The array to reverse", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14900,7 +15655,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14924,7 +15679,7 @@ "parameters": [ { "description": "The array to fill", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -14958,7 +15713,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -14974,7 +15729,7 @@ "parameters": [ { "description": "The array to shuffle", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -14992,7 +15747,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15024,7 +15779,7 @@ "parameters": [ { "description": "The array to flatten", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -15048,7 +15803,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -15066,7 +15821,7 @@ "parameters": [ { "description": "The array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -15089,7 +15844,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -15107,7 +15862,7 @@ "parameters": [ { "description": "The array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -15130,7 +15885,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "/** @type {gdjs.Variable} */\r", "const target = eventsFunctionContext.getArgument(\"Target\");\r", "\r", @@ -15150,7 +15905,7 @@ "parameters": [ { "description": "The array to insert a variable in", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -15178,8 +15933,8 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", - "const stringToSplit = eventsFunctionContext.getArgument(\"String\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", + "const stringToSplit = eventsFunctionContext.getArgument(\"StringArg\");", "const separator = eventsFunctionContext.getArgument(\"Separator\");", "", "// Ensure the target is a clean new array", @@ -15198,7 +15953,7 @@ "parameters": [ { "description": "The string to split", - "name": "String", + "name": "StringArg", "type": "string" }, { @@ -15209,7 +15964,7 @@ }, { "description": "Array where to store the results", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15227,7 +15982,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "const separator = eventsFunctionContext.getArgument(\"Separator\");\r", "\r", "eventsFunctionContext.returnValue = array\r", @@ -15248,7 +16003,7 @@ "parameters": [ { "description": "The name of the array to join into a string", - "name": "Array", + "name": "ArrayArg", "type": "variable" }, { @@ -15271,7 +16026,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "eventsFunctionContext.returnValue =", - " eventsFunctionContext.getArgument(\"Array\")", + " eventsFunctionContext.getArgument(\"ArrayArg\")", " .getAllChildrenArray()", " .reduce((accumulator, current) => accumulator + current.getAsNumber(), 0);", "" @@ -15287,7 +16042,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15305,7 +16060,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -15339,7 +16094,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15357,7 +16112,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -15391,7 +16146,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15409,7 +16164,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "eventsFunctionContext.returnValue =\r", " internalArray.reduce(\r", @@ -15428,7 +16183,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15446,7 +16201,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "const sortedCopy = internalArray.slice().sort((a, b) => {\r", " const na = a.getAsNumber();\r", @@ -15472,7 +16227,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15490,7 +16245,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15511,7 +16266,7 @@ "parameters": [ { "description": "The array to sort", - "name": "Array", + "name": "ArrayArg", "type": "variable" } ], @@ -15530,7 +16285,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -15548,7 +16303,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -15572,7 +16327,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -15590,7 +16345,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -15614,7 +16369,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue = ", @@ -15632,7 +16387,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -15656,7 +16411,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -15674,7 +16429,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -15698,7 +16453,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -15717,7 +16472,7 @@ "parameters": [ { "description": "Array to get a number from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15736,7 +16491,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -15755,7 +16510,7 @@ "parameters": [ { "description": "Array to get a string from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15768,13 +16523,13 @@ "group": "Global variables/Array access", "name": "GlobalPopNumber", "private": true, - "sentence": "Remove last child of _PARAM1_ and store it in _PARAM2_", + "sentence": "Remove last child of _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15793,7 +16548,7 @@ "parameters": [ { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15812,7 +16567,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15831,7 +16586,7 @@ "parameters": [ { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15850,7 +16605,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15869,7 +16624,7 @@ "parameters": [ { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15888,7 +16643,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -15907,7 +16662,7 @@ "parameters": [ { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -15928,11 +16683,11 @@ "actions": [ { "type": { - "value": "CopyArgumentToVariable" + "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", - "__ArrayTools.Temp" + "\"ArrayArg\"", + "Temp" ] } ] @@ -15945,7 +16700,7 @@ "value": "Egal" }, "parameters": [ - "ArrayTools::IndexOf(__ArrayTools.Temp, Value)", + "ArrayTools::IndexOf(Temp, Value)", "!=", "-1" ] @@ -15966,7 +16721,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -15992,11 +16747,11 @@ "actions": [ { "type": { - "value": "CopyArgumentToVariable" + "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", - "__ArrayTools.Temp" + "\"ArrayArg\"", + "Temp" ] } ] @@ -16009,7 +16764,7 @@ "value": "Egal" }, "parameters": [ - "ArrayTools::IndexOfStr(__ArrayTools.Temp, Value)", + "ArrayTools::IndexOfStr(Temp, Value)", "!=", "-1" ] @@ -16030,7 +16785,7 @@ "parameters": [ { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16054,7 +16809,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -16087,7 +16842,7 @@ "parameters": [ { "description": "The array to take a slice from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16122,7 +16877,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16145,7 +16900,7 @@ "parameters": [ { "description": "The array to remove items from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16176,7 +16931,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const otherArray = eventsFunctionContext.getArgument(\"OtherArray\");", "/** @type {gdjs.Variable} */", @@ -16202,7 +16957,7 @@ "parameters": [ { "description": "The first array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16231,7 +16986,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -16248,7 +17003,7 @@ "parameters": [ { "description": "The array to get the variables from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16272,7 +17027,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16288,7 +17043,7 @@ "parameters": [ { "description": "The array to reverse", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16307,7 +17062,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16331,7 +17086,7 @@ "parameters": [ { "description": "The array to fill", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16366,7 +17121,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16382,7 +17137,7 @@ "parameters": [ { "description": "The array to shuffle", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16401,7 +17156,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16433,7 +17188,7 @@ "parameters": [ { "description": "The array to flatten", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16458,7 +17213,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -16476,7 +17231,7 @@ "parameters": [ { "description": "The array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16500,7 +17255,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -16518,7 +17273,7 @@ "parameters": [ { "description": "The array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16542,7 +17297,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "/** @type {gdjs.Variable} */\r", "const target = eventsFunctionContext.getArgument(\"Target\");\r", "\r", @@ -16562,7 +17317,7 @@ "parameters": [ { "description": "The array to insert a variable in", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16591,8 +17346,8 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", - "const stringToSplit = eventsFunctionContext.getArgument(\"String\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", + "const stringToSplit = eventsFunctionContext.getArgument(\"StringArg\");", "const separator = eventsFunctionContext.getArgument(\"Separator\");", "", "// Ensure the target is a clean new array", @@ -16611,7 +17366,7 @@ "parameters": [ { "description": "The string to split", - "name": "String", + "name": "StringArg", "type": "string" }, { @@ -16622,7 +17377,7 @@ }, { "description": "Array where to store the results", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16641,7 +17396,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "const separator = eventsFunctionContext.getArgument(\"Separator\");\r", "\r", "eventsFunctionContext.returnValue = array\r", @@ -16662,7 +17417,7 @@ "parameters": [ { "description": "The name of the array to join into a string", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" }, { @@ -16686,7 +17441,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "eventsFunctionContext.returnValue =", - " eventsFunctionContext.getArgument(\"Array\")", + " eventsFunctionContext.getArgument(\"ArrayArg\")", " .getAllChildrenArray()", " .reduce((accumulator, current) => accumulator + current.getAsNumber(), 0);", "" @@ -16702,7 +17457,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16721,7 +17476,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -16755,7 +17510,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16774,7 +17529,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -16808,7 +17563,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16827,7 +17582,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "eventsFunctionContext.returnValue =\r", " internalArray.reduce(\r", @@ -16846,7 +17601,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16865,7 +17620,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "const sortedCopy = internalArray.slice().sort((a, b) => {\r", " const na = a.getAsNumber();\r", @@ -16891,7 +17646,7 @@ "parameters": [ { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16910,7 +17665,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -16931,7 +17686,7 @@ "parameters": [ { "description": "The array to sort", - "name": "Array", + "name": "ArrayArg", "type": "globalvar" } ], @@ -16949,7 +17704,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -16967,12 +17722,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -16995,7 +17750,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -17013,12 +17768,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17041,7 +17796,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue = ", @@ -17059,12 +17814,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17087,7 +17842,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const value = eventsFunctionContext.getArgument(\"Value\");", "", "eventsFunctionContext.returnValue =", @@ -17105,12 +17860,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17133,7 +17888,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -17152,12 +17907,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to get a number from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17175,7 +17930,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "const internalArray = array.getAllChildrenArray();", "", "eventsFunctionContext.returnValue = internalArray.length === 0", @@ -17194,12 +17949,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to get a string from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17211,13 +17966,13 @@ "functionType": "ExpressionAndCondition", "group": "Object variables/Array access", "name": "ObjectPopNumber", - "sentence": "Remove last child of _PARAM2_ of _PARAM1_ and store it in _PARAM3_", + "sentence": "Remove last child of _PARAM2_ of _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17236,12 +17991,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17259,7 +18014,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17278,12 +18033,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17301,7 +18056,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17320,12 +18075,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17343,7 +18098,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17362,12 +18117,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17387,11 +18142,11 @@ "actions": [ { "type": { - "value": "CopyArgumentToVariable" + "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", - "__ArrayTools.Temp" + "\"ArrayArg\"", + "Temp" ] } ] @@ -17404,7 +18159,7 @@ "value": "Egal" }, "parameters": [ - "ArrayTools::IndexOf(__ArrayTools.Temp, Value)", + "ArrayTools::IndexOf(Temp, Value)", "!=", "-1" ] @@ -17425,12 +18180,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17455,11 +18210,11 @@ "actions": [ { "type": { - "value": "CopyArgumentToVariable" + "value": "CopyArgumentToVariable2" }, "parameters": [ - "\"Array\"", - "__ArrayTools.Temp" + "\"ArrayArg\"", + "Temp" ] } ] @@ -17472,7 +18227,7 @@ "value": "Egal" }, "parameters": [ - "ArrayTools::IndexOfStr(__ArrayTools.Temp, Value)", + "ArrayTools::IndexOfStr(Temp, Value)", "!=", "-1" ] @@ -17493,12 +18248,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array to search the value in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17521,7 +18276,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -17554,17 +18309,17 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to take a slice from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -17598,7 +18353,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17621,12 +18376,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to remove items from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17656,7 +18411,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const otherArray = eventsFunctionContext.getArgument(\"OtherArray\");", "/** @type {gdjs.Variable} */", @@ -17682,17 +18437,17 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The first array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -17702,7 +18457,7 @@ }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg2", "type": "objectList" }, { @@ -17725,7 +18480,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -17736,23 +18491,23 @@ ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ], "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to get the variables from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -17775,7 +18530,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17791,12 +18546,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to reverse", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17814,7 +18569,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17838,12 +18593,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to fill", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17877,7 +18632,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17893,12 +18648,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to shuffle", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -17916,7 +18671,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -17948,12 +18703,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to flatten", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -17977,7 +18732,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -17995,17 +18750,17 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to pop a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -18028,7 +18783,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "/** @type {gdjs.Variable} */", "const target = eventsFunctionContext.getArgument(\"Target\");", "", @@ -18046,17 +18801,17 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to shift a child from", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -18071,7 +18826,7 @@ "description": "Insert a variable at a specific index of an array.", "fullName": "Insert variable at", "functionType": "Action", - "group": "Object variables/Array manipulation", + "group": "Global variables/Number arrays", "name": "ObjectInsertAt", "sentence": "Insert variable _PARAM5_ of _PARAM4_ in _PARAM2_ of _PARAM1_ at index _PARAM3_", "events": [ @@ -18079,7 +18834,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "/** @type {gdjs.Variable} */\r", "const target = eventsFunctionContext.getArgument(\"Target\");\r", "\r", @@ -18099,12 +18854,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to insert a variable in", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -18114,7 +18869,7 @@ }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg1", "type": "objectList" }, { @@ -18137,8 +18892,8 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", - "const stringToSplit = eventsFunctionContext.getArgument(\"String\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", + "const stringToSplit = eventsFunctionContext.getArgument(\"StringArg\");", "const separator = eventsFunctionContext.getArgument(\"Separator\");", "", "// Ensure the target is a clean new array", @@ -18157,7 +18912,7 @@ "parameters": [ { "description": "The string to split", - "name": "String", + "name": "StringArg", "type": "string" }, { @@ -18168,12 +18923,12 @@ }, { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "Array where to store the results", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18191,7 +18946,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */\r", - "const array = eventsFunctionContext.getArgument(\"Array\");\r", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");\r", "const separator = eventsFunctionContext.getArgument(\"Separator\");\r", "\r", "eventsFunctionContext.returnValue = array\r", @@ -18212,12 +18967,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The name of the array to join into a string", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" }, { @@ -18240,7 +18995,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "eventsFunctionContext.returnValue =", - " eventsFunctionContext.getArgument(\"Array\")", + " eventsFunctionContext.getArgument(\"ArrayArg\")", " .getAllChildrenArray()", " .reduce((accumulator, current) => accumulator + current.getAsNumber(), 0);", "" @@ -18256,12 +19011,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18279,7 +19034,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -18313,12 +19068,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18336,7 +19091,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "const len = internalArray.length;\r", "\r", "if (len === 0) {\r", @@ -18370,12 +19125,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18393,7 +19148,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "eventsFunctionContext.returnValue =\r", " internalArray.reduce(\r", @@ -18412,12 +19167,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18435,7 +19190,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable[]} */\r", - "const internalArray = eventsFunctionContext.getArgument(\"Array\").getAllChildrenArray();\r", + "const internalArray = eventsFunctionContext.getArgument(\"ArrayArg\").getAllChildrenArray();\r", "\r", "const sortedCopy = internalArray.slice().sort((a, b) => {\r", " const na = a.getAsNumber();\r", @@ -18461,12 +19216,12 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], @@ -18484,7 +19239,7 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "/** @type {gdjs.Variable} */", - "const array = eventsFunctionContext.getArgument(\"Array\");", + "const array = eventsFunctionContext.getArgument(\"ArrayArg\");", "", "// Cast to array to ensure getAllChildrenArray returns the real array", "array.castTo(\"array\");", @@ -18505,21 +19260,395 @@ "parameters": [ { "description": "The object the variable is from", - "name": "Object", + "name": "ObjectArg", "type": "objectList" }, { "description": "The array to sort", - "name": "Array", + "name": "ArrayArg", "type": "objectvar" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Scene variables/Array search", + "children": [ + { + "functionName": "IndexOf" + }, + { + "functionName": "IndexOfStr" + }, + { + "functionName": "LastIndexOf" + }, + { + "functionName": "LastIndexOfStr" + }, + { + "functionName": "HasNumber" + }, + { + "functionName": "HasString" + } + ] + }, + { + "folderName": "Scene variables/Array access", + "children": [ + { + "functionName": "Shift" + }, + { + "functionName": "RandomNumberInArray" + }, + { + "functionName": "RandomStringInArray" + }, + { + "functionName": "PopNumber" + }, + { + "functionName": "PopString" + }, + { + "functionName": "ShiftNumber" + }, + { + "functionName": "ShiftString" + }, + { + "functionName": "Pop" + } + ] + }, + { + "folderName": "Scene variables/Array creation", + "children": [ + { + "functionName": "Slice" + }, + { + "functionName": "Concatenate" + }, + { + "functionName": "FillNumber" + }, + { + "functionName": "SplitString" + } + ] + }, + { + "folderName": "Scene variables/Array manipulation", + "children": [ + { + "functionName": "Splice" + }, + { + "functionName": "AppendAll" + }, + { + "functionName": "Reverse" + }, + { + "functionName": "Shuffle" + }, + { + "functionName": "Flatten" + }, + { + "functionName": "InsertAt" + } + ] + }, + { + "folderName": "Scene variables/String arrays", + "children": [ + { + "functionName": "Join" + } + ] + }, + { + "folderName": "Scene variables/Number arrays", + "children": [ + { + "functionName": "Sum" + }, + { + "functionName": "Min" + }, + { + "functionName": "Max" + }, + { + "functionName": "Mean" + }, + { + "functionName": "Median" + }, + { + "functionName": "Sort" + } + ] + }, + { + "folderName": "Global variables/Array search", + "children": [ + { + "functionName": "GlobalIndexOf" + }, + { + "functionName": "GlobalIndexOfStr" + }, + { + "functionName": "GlobalLastIndexOf" + }, + { + "functionName": "GlobalLastIndexOfStr" + }, + { + "functionName": "GlobalHasNumber" + }, + { + "functionName": "GlobalHasString" + } + ] + }, + { + "folderName": "Global variables/Array access", + "children": [ + { + "functionName": "GlobalRandomNumberInArray" + }, + { + "functionName": "GlobalRandomStringInArray" + }, + { + "functionName": "GlobalPopNumber" + }, + { + "functionName": "GlobalPopString" + }, + { + "functionName": "GlobalShiftNumber" + }, + { + "functionName": "GlobalShiftString" + }, + { + "functionName": "GlobalPop" + }, + { + "functionName": "GlobalShift" + } + ] + }, + { + "folderName": "Global variables/Array creation", + "children": [ + { + "functionName": "GlobalSlice" + }, + { + "functionName": "GlobalConcatenate" + }, + { + "functionName": "GlobalFillNumber" + }, + { + "functionName": "GlobalSplitString" + } + ] + }, + { + "folderName": "Global variables/Array manipulation", + "children": [ + { + "functionName": "GlobalSplice" + }, + { + "functionName": "GlobalAppendAll" + }, + { + "functionName": "GlobalReverse" + }, + { + "functionName": "GlobalShuffle" + }, + { + "functionName": "GlobalFlatten" + }, + { + "functionName": "GlobalInsertAt" + } + ] + }, + { + "folderName": "Global variables/String arrays", + "children": [ + { + "functionName": "GlobalJoin" + } + ] + }, + { + "folderName": "Global variables/Number arrays", + "children": [ + { + "functionName": "ObjectInsertAt" + }, + { + "functionName": "GlobalSum" + }, + { + "functionName": "GlobalMin" + }, + { + "functionName": "GlobalMax" + }, + { + "functionName": "GlobalMean" + }, + { + "functionName": "GlobalMedian" + }, + { + "functionName": "GlobalSort" + } + ] + }, + { + "folderName": "Object variables/Array search", + "children": [ + { + "functionName": "ObjectIndexOf" + }, + { + "functionName": "ObjectIndexOfStr" + }, + { + "functionName": "ObjectLastIndexOf" + }, + { + "functionName": "ObjectLastIndexOfStr" + }, + { + "functionName": "ObjectHasNumber" + }, + { + "functionName": "ObjectHasString" + } + ] + }, + { + "folderName": "Object variables/Array access", + "children": [ + { + "functionName": "ObjectRandomNumberInArray" + }, + { + "functionName": "ObjectRandomStringInArray" + }, + { + "functionName": "ObjectPopNumber" + }, + { + "functionName": "ObjectPopString" + }, + { + "functionName": "ObjectShiftNumber" + }, + { + "functionName": "ObjectShiftString" + }, + { + "functionName": "ObjectPop" + }, + { + "functionName": "ObjectShift" + } + ] + }, + { + "folderName": "Object variables/Array creation", + "children": [ + { + "functionName": "ObjectSlice" + }, + { + "functionName": "ObjectConcatenate" + }, + { + "functionName": "ObjectFillNumber" + }, + { + "functionName": "ObjectSplitString" + } + ] + }, + { + "folderName": "Object variables/Array manipulation", + "children": [ + { + "functionName": "ObjectSplice" + }, + { + "functionName": "ObjectAppendAll" + }, + { + "functionName": "ObjectReverse" + }, + { + "functionName": "ObjectShuffle" + }, + { + "functionName": "ObjectFlatten" + } + ] + }, + { + "folderName": "Object variables/String arrays", + "children": [ + { + "functionName": "ObjectJoin" + } + ] + }, + { + "folderName": "Object variables/Number arrays", + "children": [ + { + "functionName": "ObjectSum" + }, + { + "functionName": "ObjectMin" + }, + { + "functionName": "ObjectMax" + }, + { + "functionName": "ObjectMean" + }, + { + "functionName": "ObjectMedian" + }, + { + "functionName": "ObjectSort" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-clicker/starting-clicker.json b/examples/starting-clicker/starting-clicker.json index 190f9f8ba..356125280 100644 --- a/examples/starting-clicker/starting-clicker.json +++ b/examples/starting-clicker/starting-clicker.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 271, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-platformer", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-clicker", "description": "", @@ -165,7 +164,7 @@ "metadata": "", "name": "assets\\StartingPop.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -175,7 +174,7 @@ "metadata": "", "name": "assets\\Coins 8.aac", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false } @@ -210,7 +209,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.4950840073748959, + "zoomFactor": 0.5468750000000081, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" diff --git a/examples/starting-draggable-tiles/starting-draggable-tiles.json b/examples/starting-draggable-tiles/starting-draggable-tiles.json index 08d6b8b67..820d90313 100644 --- a/examples/starting-draggable-tiles/starting-draggable-tiles.json +++ b/examples/starting-draggable-tiles/starting-draggable-tiles.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -123,8 +123,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -148,14 +147,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.6244537826600037, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -980,6 +982,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1038,6 +1041,7 @@ { "author": "@Lizard-13", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Rectangular 2D grid", "gdevelopVersion": ">=5.5.222", @@ -1139,9 +1143,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SnapObjectToVirtualGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-endless-runner/starting-endless-runner.json b/examples/starting-endless-runner/starting-endless-runner.json index 9dabdd7d5..5939323a2 100644 --- a/examples/starting-endless-runner/starting-endless-runner.json +++ b/examples/starting-endless-runner/starting-endless-runner.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -154,8 +154,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -179,14 +178,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5843784410741054, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -1167,6 +1169,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "9c727020616afdd6ba786b8af206a90481f07db0ca175ed6a4cc5b7e01c66d06", "name": "JumpButton", + "persistentUuid": "5452ea7d-d87f-4e60-8b54-2c41360bfb99", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1564,6 +1567,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1581,6 +1585,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1609,6 +1614,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1676,6 +1682,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1684,7 +1691,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1716,12 +1723,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2795,6 +2808,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2862,13 +2910,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3163,6 +3236,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -3243,6 +3317,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -3323,6 +3398,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -3359,6 +3435,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3403,13 +3513,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3613,6 +3750,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3693,6 +3831,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3773,6 +3912,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3809,6 +3949,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3853,13 +4027,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4176,6 +4377,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -4695,6 +4993,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4775,6 +5074,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4855,6 +5155,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4936,6 +5237,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -5017,6 +5319,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -5097,6 +5400,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -5177,6 +5481,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -5213,6 +5518,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5569,6 +5953,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5640,13 +6031,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6056,6 +6523,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -6136,6 +6604,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -6216,6 +6685,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -6296,6 +6766,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -6376,6 +6847,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6457,6 +6929,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6538,6 +7011,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6574,6 +7048,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6950,13 +7488,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -7367,6 +7955,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -7449,6 +8038,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -7531,6 +8121,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -7613,6 +8204,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7695,6 +8287,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7778,6 +8371,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7861,6 +8455,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7898,6 +8493,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8261,7 +8920,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -8269,6 +8972,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": ">=5.5.222", @@ -8308,12 +9012,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10213,6 +10923,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10353,6 +11064,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ @@ -12710,6 +13422,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13072,13 +13919,184 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13296,6 +14314,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13417,11 +14443,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-first-person-farming/assets/Digging - Copy.wav b/examples/starting-first-person-farming/assets/Digging - Copy.wav deleted file mode 100644 index ee4a38c6c..000000000 Binary files a/examples/starting-first-person-farming/assets/Digging - Copy.wav and /dev/null differ diff --git a/examples/starting-first-person-farming/assets/StartingGround.png b/examples/starting-first-person-farming/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-first-person-farming/assets/StartingGround.png and b/examples/starting-first-person-farming/assets/StartingGround.png differ diff --git a/examples/starting-first-person-farming/assets/StartingWall.png b/examples/starting-first-person-farming/assets/StartingWall.png new file mode 100644 index 000000000..ea50f81d9 Binary files /dev/null and b/examples/starting-first-person-farming/assets/StartingWall.png differ diff --git a/examples/starting-first-person-farming/starting-first-person-farming.json b/examples/starting-first-person-farming/starting-first-person-farming.json index e85cf5f1b..a740c4714 100644 --- a/examples/starting-first-person-farming/starting-first-person-farming.json +++ b/examples/starting-first-person-farming/starting-first-person-farming.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-first-person", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person-farming", "description": "", @@ -287,7 +286,7 @@ "metadata": "", "name": "assets\\Placement thud.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -338,6 +337,14 @@ "name": "assets/Skybox_Right.png", "smoothed": true, "userAdded": false + }, + { + "file": "assets/StartingWall.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingWall.png", + "smoothed": true, + "userAdded": false } ] }, @@ -370,7 +377,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.39251611754884613, + "zoomFactor": 0.31119749424453913, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -419,21 +426,25 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "5ca6d787-e19a-4df0-80ad-23aa13516aca", "type": "string", "value": "Keyboard" }, { "name": "Inventory", + "persistentUuid": "145736d3-f559-46f4-b957-3cdea6cbb4e2", "type": "array", "children": [] }, { "name": "UpdateInventoryDisplay", + "persistentUuid": "55349b1c-2a0a-45eb-96a0-c1e010f26cb7", "type": "boolean", "value": false }, { "name": "SelectedSlot", + "persistentUuid": "2b737ad2-7770-426b-9d46-c89d82c84ad8", "type": "number", "value": 0 } @@ -1494,8 +1505,8 @@ "rotationX": 32, "rotationY": 26, "width": 0, - "x": 882, - "y": 320, + "x": 881, + "y": 334, "zOrder": 29, "numberProperties": [], "stringProperties": [], @@ -1535,6 +1546,74 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls", + "persistentUuid": "4186d026-4002-40a0-956f-b01176e6dc48", + "width": 2048, + "x": -384, + "y": -640, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Walls", + "persistentUuid": "3f4c04a4-bd53-44a0-ad9e-89f40f65641c", + "width": 2048, + "x": -384, + "y": 1152, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Walls", + "persistentUuid": "ac68f1ea-83f0-4672-9f8c-e84c11ac4a0d", + "width": 64, + "x": 1600, + "y": -576, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Walls", + "persistentUuid": "9a26192b-81a5-4aa8-9693-9b8129965af0", + "width": 64, + "x": -384, + "y": -576, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1608,6 +1687,7 @@ { "assetStoreId": "", "name": "DirtPlot", + "persistentUuid": "023ae897-662c-4d00-b249-80656720337a", "type": "Scene3D::Cube3DObject", "variables": [ { @@ -2467,6 +2547,7 @@ { "assetStoreId": "", "name": "Carrot", + "persistentUuid": "d339f762-028f-4133-8f3d-f3e7a46fc933", "type": "Scene3D::Model3DObject", "variables": [ { @@ -2953,6 +3034,7 @@ { "assetStoreId": "", "name": "Seed_Beet", + "persistentUuid": "f48a6cf7-7120-40d4-a483-4324833fd619", "type": "Scene3D::Model3DObject", "variables": [ { @@ -3269,6 +3351,73 @@ ] } } + }, + { + "assetStoreId": "", + "name": "Walls", + "persistentUuid": "a1194267-f9ad-4169-aa26-262b590d8bb1", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 1, + "friction": 0.3, + "restitution": 0.1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": { + "width": 128, + "height": 128, + "depth": 128, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "assets/StartingWall.png", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "assets/StartingWall.png", + "rightFaceResourceName": "assets/StartingWall.png", + "topFaceResourceName": "assets/StartingWall.png", + "bottomFaceResourceName": "assets/StartingWall.png", + "frontFaceVisible": true, + "backFaceVisible": false, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, + "materialType": "StandardWithoutMetalness", + "isCastingShadow": true, + "isReceivingShadow": true + } } ], "objectsFolderStructure": { @@ -3283,6 +3432,9 @@ { "objectName": "Ground" }, + { + "objectName": "Walls" + }, { "objectName": "Carrot" }, @@ -3409,36 +3561,6 @@ } ] }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FirstPersonCamera::LookFromObjectEyes" - }, - "parameters": [ - "", - "Player", - "", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "+", - "64", - "", - "" - ] - } - ] - }, { "colorB": 228, "colorG": 176, @@ -5989,9 +6111,9 @@ "doubleParameters": { "distanceFromCamera": 1500, "elevation": 45, - "frustumSize": 2500, + "frustumSize": 4000, "intensity": 0.75, - "minimumShadowBias": 0, + "minimumShadowBias": 0.00001, "rotation": 30 }, "stringParameters": { @@ -15140,249 +15262,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", @@ -26831,7 +26710,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -26840,7 +26719,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -29526,6 +29405,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -31005,6 +30981,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -31127,6 +31110,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, @@ -36974,7 +36960,7 @@ { "author": "", "category": "Visual effect", - "dimension": "", + "dimension": "3D", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -36983,7 +36969,7 @@ "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", - "version": "3.0.1", + "version": "3.1.0", "description": [ "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", @@ -37187,14 +37173,77 @@ " * @param colorOverLife {ColorOverLife}", " * @param sizeOverLife {SizeOverLife}", " * @param applyForce {ApplyForce}", + " * @param applyForce {ApplyForce}", + " * @param widthOverLength {WidthOverLength}", " */", - " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce) {", + " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength) {", " this.particleSystem = particleSystem;", " this.colorOverLife = colorOverLife;", " this.sizeOverLife = sizeOverLife;", " this.applyForce = applyForce;", + " this.widthOverLength = widthOverLength;", + " }", + "", + " /**", + " * @param renderMode {'Billboard' | 'Trail'}", + " */", + " setRenderMode(renderMode) {", + " switch (renderMode) {", + " case \"BillBoard\":", + " this.particleSystem.renderMode = RenderMode.BillBoard;", + " break;", + " case \"Trail\":", + " this.particleSystem.renderMode = RenderMode.Trail;", + " this.particleSystem.rendererEmitterSettings.startLength = new IntervalValue(30, 30);", + " break;", + " }", + " }", + "", + " /**", + " * @param startLengthMin {number}", + " */", + " setTrailStartLengthMin(startLengthMin) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.a = startLengthMin;", + " }", + "", + " /**", + " * @param startLengthMax {number}", + " */", + " setTrailStartLengthMax(startLengthMax) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.b = startLengthMax;", + " }", + "", + " /**", + " * @param followLocalOrigin {boolean}", + " */", + " setTrailFollowingLocalOrigin(followLocalOrigin) {", + " this.particleSystem.rendererEmitterSettings.followLocalOrigin = followLocalOrigin;", + " }", + "", + " /**", + " * @param trailEndWidthRatio {number}", + " */", + " setTrailEndWidthRatio(trailEndWidthRatio) {", + " // Check this comment in the lib code:", + " // We added a multiplication with size because it's more convenient for the extension.", + "", + " /** @type Bezier */", + " const bezier = this.widthOverLength.width.functions[0][0];", + " bezier.p[0] = 1;", + " bezier.p[1] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 1 / 3);", + " bezier.p[2] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 2 / 3);", + " bezier.p[3] = trailEndWidthRatio;", " }", "", + "", " /**", " * @param startColor {string}", " */", @@ -38604,7 +38653,8 @@ " const iter = particle.previous.values();", " for (let i = 0; i < particle.previous.length; i++) {", " const cur = iter.next();", - " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length);", + " // We added a multiplication with size because it's more convenient for the extension.", + " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length) * particle.size;", " }", " }", " }", @@ -43862,6 +43912,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "3d particles", "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", @@ -43937,7 +43988,7 @@ } ], "instances": [], - "editionSettings": {}, + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -43975,6 +44026,7 @@ " ColorOverLife,", " SizeOverLife,", " ApplyForce,", + " WidthOverLength,", " Gradient,", " PiecewiseBezier,", " Bezier,", @@ -44068,10 +44120,12 @@ "particleSystem.addBehavior(sizeOverLife);", "const applyForce = new ApplyForce(new THREE.Vector3(0, 0, -1), new ConstantValue(0));", "particleSystem.addBehavior(applyForce);", + "const widthOverLength = new WidthOverLength(new PiecewiseBezier([[new Bezier(1, 2 / 3, 1 / 3, 0), 0]]));", + "particleSystem.addBehavior(widthOverLength);", "", "particleSystem.emitter.name = object.getName() + object.getNameId();", "", - "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce);", + "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength);", "object.__particleSystem = particleSystem;", "", "// This is a hack that may break in future releases.", @@ -44270,6 +44324,50 @@ "" ] }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetRenderMode" + }, + "parameters": [ + "Object", + "=", + "RenderMode", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailEndWidthRatio" + }, + "parameters": [ + "Object", + "=", + "TrailEndWidthRatio", + "" + ] + }, { "type": { "value": "ParticleEmitter3D::ParticleEmitter3D::SetStartColor" @@ -44457,6 +44555,61 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "yes", + "TrailStartLengthMax" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -44711,7 +44864,10 @@ " for (const layerName of layerNames) {", " const layer = gameScene.getLayer(layerName);", " if (layer.__particleEmmiter3DExtension) {", - " layer.__particleEmmiter3DExtension.batchSystem.update(layer.getElapsedTime() / 1000);", + " const timeDelta = layer.getElapsedTime() / 1000;", + " if (timeDelta > 0) {", + " layer.__particleEmmiter3DExtension.batchSystem.update(timeDelta);", + " }", " }", " }", "}" @@ -45139,7 +45295,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyStartColor()" + "StartColor" ] } ] @@ -45222,7 +45378,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyEndColor()" + "EndColor" ] } ] @@ -45305,7 +45461,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartOpacity()" + "StartOpacity" ] } ] @@ -45388,7 +45544,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndOpacity()" + "EndOpacity" ] } ] @@ -45471,7 +45627,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyFlow()" + "Flow" ] } ] @@ -45555,7 +45711,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMin()" + "StartSizeMin" ] } ] @@ -45638,7 +45794,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMax()" + "StartSizeMax" ] } ] @@ -45722,7 +45878,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndScale()" + "EndScale" ] } ] @@ -45806,7 +45962,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMin()" + "StartSpeedMin" ] } ] @@ -45889,7 +46045,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMax()" + "StartSpeedMax" ] } ] @@ -45972,7 +46128,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMin()" + "LifespanMin" ] } ] @@ -46056,7 +46212,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMax()" + "LifespanMax" ] } ] @@ -46140,7 +46296,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyDuration()" + "Duration" ] } ] @@ -46362,7 +46518,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertySpayConeAngle()" + "SpayConeAngle" ] } ] @@ -46446,7 +46602,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyBlending()" + "Blending" ] } ] @@ -46532,7 +46688,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyGravityTop()" + "GravityTop" ] } ] @@ -46617,7 +46773,299 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyGravity()" + "Gravity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Gravity", + "group": "3D particle emitter speed configuration", + "name": "SetGravity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Gravity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setGravity(gravity);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Condition", + "group": "3D particle emitter configuration", + "name": "ShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Action", + "group": "3D particle emitter configuration", + "name": "SetShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "ShouldAutodestruct", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the start min trail length of the object.", + "fullName": "Start min trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMin", + "sentence": "the start min trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMin", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMin", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the start max trail length of the object.", + "fullName": "Start max trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMax", + "sentence": "the start max trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMax" ] } ] @@ -46639,9 +47087,9 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Gravity", - "group": "3D particle emitter speed configuration", - "name": "SetGravity", + "getterName": "TrailStartLengthMax", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMax", "sentence": "", "events": [ { @@ -46653,7 +47101,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "Gravity", + "TrailStartLengthMax", "=", "Value" ] @@ -46664,14 +47112,13 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "const object = objects[0];\r", - "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__particleEmitterAdapter.setGravity(gravity);\r", - "" + "object.__particleEmitterAdapter.setTrailStartLengthMax(value);" ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ], "parameters": [ @@ -46685,12 +47132,12 @@ "objectGroups": [] }, { - "description": "Check if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Check if the trail should follow the object.", + "fullName": "Trail following the object", "functionType": "Condition", - "group": "3D particle emitter configuration", - "name": "ShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends", + "group": "3D particle emitter trail configuration", + "name": "IsTrailFollowingLocalOrigin", + "sentence": "The trail is following _PARAM0_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -46700,7 +47147,7 @@ "value": "BooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] @@ -46729,24 +47176,23 @@ "objectGroups": [] }, { - "description": "Change if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Change if the trail should follow the object or not.", + "fullName": "Make the trail follow", "functionType": "Action", - "group": "3D particle emitter configuration", - "name": "SetShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "group": "3D particle emitter trail configuration", + "name": "SetIsTrailFollowingLocalOrigin", + "sentence": "Make the trail follow _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, "value": "BooleanVariable" }, "parameters": [ "Value", - "True", + "False", "" ] } @@ -46757,7 +47203,7 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "False", "" ] @@ -46784,12 +47230,24 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailFollowingLocalOrigin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ @@ -46801,13 +47259,233 @@ }, { "defaultValue": "yes", - "description": "ShouldAutodestruct", + "description": "IsTrailFollowingLocalOrigin", "name": "Value", "optional": true, "type": "yesorno" } ], "objectGroups": [] + }, + { + "description": "the tail end width ratio of the object.", + "fullName": "Tail end width ratio", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailEndWidthRatio", + "sentence": "the tail end width ratio", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailEndWidthRatio" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailEndWidthRatio", + "group": "3D particle emitter trail configuration", + "name": "SetTrailEndWidthRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailEndWidthRatio", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailEndWidthRatio(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the render mode of the object.", + "fullName": "Render mode", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter configuration", + "name": "RenderMode", + "private": true, + "sentence": "the render mode", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "RenderMode" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Billboard\",\"Trail\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RenderMode", + "group": "3D particle emitter configuration", + "name": "SetRenderMode", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setRenderMode(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the trail properties because the RenderMode setter reset them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "\"Trail\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] } ], "eventsFunctionsFolderStructure": { @@ -46965,6 +47643,12 @@ }, { "functionName": "SetShouldAutodestruct" + }, + { + "functionName": "RenderMode" + }, + { + "functionName": "SetRenderMode" } ] }, @@ -47002,6 +47686,35 @@ "functionName": "SetGravity" } ] + }, + { + "folderName": "3D particle emitter trail configuration", + "children": [ + { + "functionName": "TrailStartLengthMin" + }, + { + "functionName": "SetTrailStartLengthMin" + }, + { + "functionName": "TrailStartLengthMax" + }, + { + "functionName": "SetTrailStartLengthMax" + }, + { + "functionName": "IsTrailFollowingLocalOrigin" + }, + { + "functionName": "SetIsTrailFollowingLocalOrigin" + }, + { + "functionName": "TrailEndWidthRatio" + }, + { + "functionName": "SetTrailEndWidthRatio" + } + ] } ] }, @@ -47213,11 +47926,81 @@ "group": "Position", "hidden": true, "name": "RotationY" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start min length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMin" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start max length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMax" + }, + { + "value": "Billboard", + "type": "Choice", + "label": "Render mode", + "choices": [ + { + "label": "Image facing the camera", + "value": "Billboard" + }, + { + "label": "Image following a trail", + "value": "Trail" + } + ], + "advanced": true, + "name": "RenderMode" + }, + { + "value": "", + "type": "Boolean", + "label": "Follow the object", + "group": "Trail", + "advanced": true, + "name": "IsTrailFollowingLocalOrigin" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail end width ratio", + "group": "Trail", + "advanced": true, + "name": "TrailEndWidthRatio" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ + { + "propertyName": "Flow" + }, + { + "propertyName": "LifespanMin" + }, + { + "propertyName": "LifespanMax" + }, + { + "propertyName": "Duration" + }, + { + "propertyName": "ShouldAutodestruct" + }, + { + "propertyName": "RenderMode" + }, { "folderName": "Color", "children": [ @@ -47238,9 +48021,6 @@ } ] }, - { - "propertyName": "Flow" - }, { "folderName": "Size", "children": [ @@ -47255,6 +48035,23 @@ } ] }, + { + "folderName": "Trail", + "children": [ + { + "propertyName": "TrailStartLengthMin" + }, + { + "propertyName": "TrailStartLengthMax" + }, + { + "propertyName": "TrailEndWidthRatio" + }, + { + "propertyName": "IsTrailFollowingLocalOrigin" + } + ] + }, { "folderName": "Speed", "children": [ @@ -47275,15 +48072,6 @@ } ] }, - { - "propertyName": "LifespanMin" - }, - { - "propertyName": "LifespanMax" - }, - { - "propertyName": "Duration" - }, { "folderName": "Position", "children": [ @@ -47301,9 +48089,6 @@ } ] }, - { - "propertyName": "ShouldAutodestruct" - }, { "propertyName": "ParentOrigin" } diff --git a/examples/starting-first-person-horror/assets/StarterPushable.png b/examples/starting-first-person-horror/assets/StarterPushable.png index fe58d8cbf..95088c6de 100644 Binary files a/examples/starting-first-person-horror/assets/StarterPushable.png and b/examples/starting-first-person-horror/assets/StarterPushable.png differ diff --git a/examples/starting-first-person-horror/assets/StartingGround.png b/examples/starting-first-person-horror/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-first-person-horror/assets/StartingGround.png and b/examples/starting-first-person-horror/assets/StartingGround.png differ diff --git a/examples/starting-first-person-horror/assets/StartingWall.png b/examples/starting-first-person-horror/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-first-person-horror/assets/StartingWall.png and b/examples/starting-first-person-horror/assets/StartingWall.png differ diff --git a/examples/starting-first-person-horror/starting-first-person-horror.json b/examples/starting-first-person-horror/starting-first-person-horror.json index adfa8ec81..520b5b09f 100644 --- a/examples/starting-first-person-horror/starting-first-person-horror.json +++ b/examples/starting-first-person-horror/starting-first-person-horror.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-first-person", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person-horror", "description": "", @@ -251,7 +250,7 @@ "title": "", "v": 255, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, @@ -261,8 +260,8 @@ "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 0.25504554733544876, + "snap": false, + "zoomFactor": 0.26364576737709594, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -286,6 +285,7 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "928b4b8d-c842-4a49-83a4-097bd9da6cff", "type": "string", "value": "Keyboard" } @@ -321,8 +321,8 @@ "rotationX": -21, "width": 126, "x": 322, - "y": 384, - "z": -67, + "y": 379, + "z": -69, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -366,14 +366,14 @@ { "angle": 0, "customSize": true, - "depth": 130, - "height": 205, + "depth": 128, + "height": 192, "layer": "", "name": "Obstacle", "persistentUuid": "7d546d65-52a7-420f-a48c-4781e86cfe51", "width": 128, "x": 321, - "y": 217, + "y": 225, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -439,8 +439,8 @@ "rotationX": -21, "width": 126, "x": 322, - "y": -128, - "z": -67, + "y": -121, + "z": -69, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -811,7 +811,7 @@ { "angle": 0, "customSize": true, - "depth": 200, + "depth": 192, "height": 2496, "layer": "", "name": "Obstacle", @@ -827,7 +827,7 @@ { "angle": 90, "customSize": true, - "depth": 200, + "depth": 192, "height": 2688, "layer": "", "name": "Obstacle", @@ -843,7 +843,7 @@ { "angle": 0, "customSize": true, - "depth": 200, + "depth": 192, "height": 2496, "layer": "", "name": "Obstacle", @@ -859,7 +859,7 @@ { "angle": 90, "customSize": true, - "depth": 200, + "depth": 192, "height": 2688, "layer": "", "name": "Obstacle", @@ -979,9 +979,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -997,12 +997,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1052,9 +1052,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StarterPushable.png", @@ -1070,12 +1070,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1084,6 +1084,7 @@ { "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", "name": "MovementJoystick", + "persistentUuid": "4cc8677b-456f-4452-a420-3077e4f32707", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variant": "", "variables": [], @@ -1169,6 +1170,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "9c727020616afdd6ba786b8af206a90481f07db0ca175ed6a4cc5b7e01c66d06", "name": "JumpButton", + "persistentUuid": "8b542da4-4a65-411b-9083-1612d2437a74", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1393,6 +1395,7 @@ { "assetStoreId": "", "name": "ControlsToggle", + "persistentUuid": "de0c9d39-acf1-40fd-8c95-8aa18af25e6a", "type": "SpriteToggleSwitch::SpriteToggleSwitch", "variant": "Controls toggle", "variables": [], @@ -1540,7 +1543,8 @@ "ConeLength": 4000, "ConeAngle": 22, "Decay": 10, - "Smoothing": 0.15 + "Smoothing": 0.15, + "ShadowBias": 0.0001 } } ], @@ -11635,249 +11639,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", diff --git a/examples/starting-first-person-shooter-horror/assets/StarterPushable.png b/examples/starting-first-person-shooter-horror/assets/StarterPushable.png index fe58d8cbf..95088c6de 100644 Binary files a/examples/starting-first-person-shooter-horror/assets/StarterPushable.png and b/examples/starting-first-person-shooter-horror/assets/StarterPushable.png differ diff --git a/examples/starting-first-person-shooter-horror/assets/StartingGround.png b/examples/starting-first-person-shooter-horror/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-first-person-shooter-horror/assets/StartingGround.png and b/examples/starting-first-person-shooter-horror/assets/StartingGround.png differ diff --git a/examples/starting-first-person-shooter-horror/assets/StartingWall.png b/examples/starting-first-person-shooter-horror/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-first-person-shooter-horror/assets/StartingWall.png and b/examples/starting-first-person-shooter-horror/assets/StartingWall.png differ diff --git a/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json b/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json index 2392fd6eb..3d491972e 100644 --- a/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json +++ b/examples/starting-first-person-shooter-horror/starting-first-person-shooter-horror.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-first-person", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person-shooter-horror", "description": "", @@ -190,7 +189,7 @@ "metadata": "", "name": "assets\\Gunshot.mp3", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -292,7 +291,7 @@ "title": "", "v": 255, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, @@ -302,7 +301,7 @@ "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, + "snap": false, "zoomFactor": 0.24672586957407638, "windowMask": false, "selectedLayer": "", @@ -378,8 +377,8 @@ "rotationX": -21, "width": 126, "x": 322, - "y": 384, - "z": -67, + "y": 377, + "z": -70, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -423,14 +422,14 @@ { "angle": 0, "customSize": true, - "depth": 130, - "height": 205, + "depth": 128, + "height": 192, "layer": "", "name": "Obstacle", "persistentUuid": "7d546d65-52a7-420f-a48c-4781e86cfe51", "width": 128, "x": 321, - "y": 217, + "y": 223, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -480,8 +479,8 @@ "rotationX": -21, "width": 126, "x": 322, - "y": -128, - "z": -67, + "y": -122, + "z": -70, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -1076,9 +1075,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -1094,12 +1093,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1149,9 +1148,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StarterPushable.png", @@ -1167,12 +1166,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1875,7 +1874,8 @@ "Intensity": 2.5, "ConeAngle": 22, "ConeLength": 4000, - "Smoothing": 0.15 + "Smoothing": 0.15, + "ShadowBias": 0.0001 } } ], @@ -12537,249 +12537,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", @@ -18616,7 +18373,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -18625,7 +18382,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -21311,6 +21068,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -22790,6 +22644,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -22912,6 +22773,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, @@ -29499,7 +29363,7 @@ { "author": "", "category": "Visual effect", - "dimension": "", + "dimension": "3D", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -29508,7 +29372,7 @@ "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", - "version": "3.0.1", + "version": "3.1.0", "description": [ "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", @@ -29712,15 +29576,78 @@ " * @param colorOverLife {ColorOverLife}", " * @param sizeOverLife {SizeOverLife}", " * @param applyForce {ApplyForce}", + " * @param applyForce {ApplyForce}", + " * @param widthOverLength {WidthOverLength}", " */", - " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce) {", + " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength) {", " this.particleSystem = particleSystem;", " this.colorOverLife = colorOverLife;", " this.sizeOverLife = sizeOverLife;", " this.applyForce = applyForce;", + " this.widthOverLength = widthOverLength;", + " }", + "", + " /**", + " * @param renderMode {'Billboard' | 'Trail'}", + " */", + " setRenderMode(renderMode) {", + " switch (renderMode) {", + " case \"BillBoard\":", + " this.particleSystem.renderMode = RenderMode.BillBoard;", + " break;", + " case \"Trail\":", + " this.particleSystem.renderMode = RenderMode.Trail;", + " this.particleSystem.rendererEmitterSettings.startLength = new IntervalValue(30, 30);", + " break;", + " }", " }", "", " /**", + " * @param startLengthMin {number}", + " */", + " setTrailStartLengthMin(startLengthMin) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.a = startLengthMin;", + " }", + "", + " /**", + " * @param startLengthMax {number}", + " */", + " setTrailStartLengthMax(startLengthMax) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.b = startLengthMax;", + " }", + "", + " /**", + " * @param followLocalOrigin {boolean}", + " */", + " setTrailFollowingLocalOrigin(followLocalOrigin) {", + " this.particleSystem.rendererEmitterSettings.followLocalOrigin = followLocalOrigin;", + " }", + "", + " /**", + " * @param trailEndWidthRatio {number}", + " */", + " setTrailEndWidthRatio(trailEndWidthRatio) {", + " // Check this comment in the lib code:", + " // We added a multiplication with size because it's more convenient for the extension.", + "", + " /** @type Bezier */", + " const bezier = this.widthOverLength.width.functions[0][0];", + " bezier.p[0] = 1;", + " bezier.p[1] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 1 / 3);", + " bezier.p[2] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 2 / 3);", + " bezier.p[3] = trailEndWidthRatio;", + " }", + "", + "", + " /**", " * @param startColor {string}", " */", " setStartColor(startColor) {", @@ -31129,7 +31056,8 @@ " const iter = particle.previous.values();", " for (let i = 0; i < particle.previous.length; i++) {", " const cur = iter.next();", - " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length);", + " // We added a multiplication with size because it's more convenient for the extension.", + " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length) * particle.size;", " }", " }", " }", @@ -36387,6 +36315,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "3d particles", "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", @@ -36462,7 +36391,7 @@ } ], "instances": [], - "editionSettings": {}, + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -36500,6 +36429,7 @@ " ColorOverLife,", " SizeOverLife,", " ApplyForce,", + " WidthOverLength,", " Gradient,", " PiecewiseBezier,", " Bezier,", @@ -36593,10 +36523,12 @@ "particleSystem.addBehavior(sizeOverLife);", "const applyForce = new ApplyForce(new THREE.Vector3(0, 0, -1), new ConstantValue(0));", "particleSystem.addBehavior(applyForce);", + "const widthOverLength = new WidthOverLength(new PiecewiseBezier([[new Bezier(1, 2 / 3, 1 / 3, 0), 0]]));", + "particleSystem.addBehavior(widthOverLength);", "", "particleSystem.emitter.name = object.getName() + object.getNameId();", "", - "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce);", + "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength);", "object.__particleSystem = particleSystem;", "", "// This is a hack that may break in future releases.", @@ -36795,6 +36727,50 @@ "" ] }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetRenderMode" + }, + "parameters": [ + "Object", + "=", + "RenderMode", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailEndWidthRatio" + }, + "parameters": [ + "Object", + "=", + "TrailEndWidthRatio", + "" + ] + }, { "type": { "value": "ParticleEmitter3D::ParticleEmitter3D::SetStartColor" @@ -36982,6 +36958,61 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "yes", + "TrailStartLengthMax" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -37236,7 +37267,10 @@ " for (const layerName of layerNames) {", " const layer = gameScene.getLayer(layerName);", " if (layer.__particleEmmiter3DExtension) {", - " layer.__particleEmmiter3DExtension.batchSystem.update(layer.getElapsedTime() / 1000);", + " const timeDelta = layer.getElapsedTime() / 1000;", + " if (timeDelta > 0) {", + " layer.__particleEmmiter3DExtension.batchSystem.update(timeDelta);", + " }", " }", " }", "}" @@ -37664,7 +37698,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyStartColor()" + "StartColor" ] } ] @@ -37747,7 +37781,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyEndColor()" + "EndColor" ] } ] @@ -37830,7 +37864,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartOpacity()" + "StartOpacity" ] } ] @@ -37913,7 +37947,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndOpacity()" + "EndOpacity" ] } ] @@ -37996,7 +38030,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyFlow()" + "Flow" ] } ] @@ -38080,7 +38114,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMin()" + "StartSizeMin" ] } ] @@ -38163,7 +38197,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMax()" + "StartSizeMax" ] } ] @@ -38247,7 +38281,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndScale()" + "EndScale" ] } ] @@ -38331,7 +38365,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMin()" + "StartSpeedMin" ] } ] @@ -38414,7 +38448,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMax()" + "StartSpeedMax" ] } ] @@ -38497,7 +38531,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMin()" + "LifespanMin" ] } ] @@ -38581,7 +38615,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMax()" + "LifespanMax" ] } ] @@ -38665,7 +38699,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyDuration()" + "Duration" ] } ] @@ -38887,7 +38921,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertySpayConeAngle()" + "SpayConeAngle" ] } ] @@ -38971,7 +39005,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyBlending()" + "Blending" ] } ] @@ -39057,7 +39091,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyGravityTop()" + "GravityTop" ] } ] @@ -39142,7 +39176,299 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyGravity()" + "Gravity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Gravity", + "group": "3D particle emitter speed configuration", + "name": "SetGravity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Gravity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setGravity(gravity);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Condition", + "group": "3D particle emitter configuration", + "name": "ShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Action", + "group": "3D particle emitter configuration", + "name": "SetShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "ShouldAutodestruct", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the start min trail length of the object.", + "fullName": "Start min trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMin", + "sentence": "the start min trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMin", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMin", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the start max trail length of the object.", + "fullName": "Start max trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMax", + "sentence": "the start max trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMax" ] } ] @@ -39164,9 +39490,9 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Gravity", - "group": "3D particle emitter speed configuration", - "name": "SetGravity", + "getterName": "TrailStartLengthMax", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMax", "sentence": "", "events": [ { @@ -39178,7 +39504,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "Gravity", + "TrailStartLengthMax", "=", "Value" ] @@ -39189,14 +39515,13 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "const object = objects[0];\r", - "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__particleEmitterAdapter.setGravity(gravity);\r", - "" + "object.__particleEmitterAdapter.setTrailStartLengthMax(value);" ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ], "parameters": [ @@ -39210,12 +39535,12 @@ "objectGroups": [] }, { - "description": "Check if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Check if the trail should follow the object.", + "fullName": "Trail following the object", "functionType": "Condition", - "group": "3D particle emitter configuration", - "name": "ShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends", + "group": "3D particle emitter trail configuration", + "name": "IsTrailFollowingLocalOrigin", + "sentence": "The trail is following _PARAM0_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -39225,7 +39550,7 @@ "value": "BooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] @@ -39254,24 +39579,23 @@ "objectGroups": [] }, { - "description": "Change if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Change if the trail should follow the object or not.", + "fullName": "Make the trail follow", "functionType": "Action", - "group": "3D particle emitter configuration", - "name": "SetShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "group": "3D particle emitter trail configuration", + "name": "SetIsTrailFollowingLocalOrigin", + "sentence": "Make the trail follow _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, "value": "BooleanVariable" }, "parameters": [ "Value", - "True", + "False", "" ] } @@ -39282,7 +39606,7 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "False", "" ] @@ -39309,12 +39633,24 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailFollowingLocalOrigin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ @@ -39326,13 +39662,233 @@ }, { "defaultValue": "yes", - "description": "ShouldAutodestruct", + "description": "IsTrailFollowingLocalOrigin", "name": "Value", "optional": true, "type": "yesorno" } ], "objectGroups": [] + }, + { + "description": "the tail end width ratio of the object.", + "fullName": "Tail end width ratio", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailEndWidthRatio", + "sentence": "the tail end width ratio", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailEndWidthRatio" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailEndWidthRatio", + "group": "3D particle emitter trail configuration", + "name": "SetTrailEndWidthRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailEndWidthRatio", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailEndWidthRatio(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the render mode of the object.", + "fullName": "Render mode", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter configuration", + "name": "RenderMode", + "private": true, + "sentence": "the render mode", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "RenderMode" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Billboard\",\"Trail\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RenderMode", + "group": "3D particle emitter configuration", + "name": "SetRenderMode", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setRenderMode(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the trail properties because the RenderMode setter reset them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "\"Trail\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] } ], "eventsFunctionsFolderStructure": { @@ -39490,6 +40046,12 @@ }, { "functionName": "SetShouldAutodestruct" + }, + { + "functionName": "RenderMode" + }, + { + "functionName": "SetRenderMode" } ] }, @@ -39527,6 +40089,35 @@ "functionName": "SetGravity" } ] + }, + { + "folderName": "3D particle emitter trail configuration", + "children": [ + { + "functionName": "TrailStartLengthMin" + }, + { + "functionName": "SetTrailStartLengthMin" + }, + { + "functionName": "TrailStartLengthMax" + }, + { + "functionName": "SetTrailStartLengthMax" + }, + { + "functionName": "IsTrailFollowingLocalOrigin" + }, + { + "functionName": "SetIsTrailFollowingLocalOrigin" + }, + { + "functionName": "TrailEndWidthRatio" + }, + { + "functionName": "SetTrailEndWidthRatio" + } + ] } ] }, @@ -39738,11 +40329,81 @@ "group": "Position", "hidden": true, "name": "RotationY" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start min length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMin" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start max length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMax" + }, + { + "value": "Billboard", + "type": "Choice", + "label": "Render mode", + "choices": [ + { + "label": "Image facing the camera", + "value": "Billboard" + }, + { + "label": "Image following a trail", + "value": "Trail" + } + ], + "advanced": true, + "name": "RenderMode" + }, + { + "value": "", + "type": "Boolean", + "label": "Follow the object", + "group": "Trail", + "advanced": true, + "name": "IsTrailFollowingLocalOrigin" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail end width ratio", + "group": "Trail", + "advanced": true, + "name": "TrailEndWidthRatio" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ + { + "propertyName": "Flow" + }, + { + "propertyName": "LifespanMin" + }, + { + "propertyName": "LifespanMax" + }, + { + "propertyName": "Duration" + }, + { + "propertyName": "ShouldAutodestruct" + }, + { + "propertyName": "RenderMode" + }, { "folderName": "Color", "children": [ @@ -39763,9 +40424,6 @@ } ] }, - { - "propertyName": "Flow" - }, { "folderName": "Size", "children": [ @@ -39780,6 +40438,23 @@ } ] }, + { + "folderName": "Trail", + "children": [ + { + "propertyName": "TrailStartLengthMin" + }, + { + "propertyName": "TrailStartLengthMax" + }, + { + "propertyName": "TrailEndWidthRatio" + }, + { + "propertyName": "IsTrailFollowingLocalOrigin" + } + ] + }, { "folderName": "Speed", "children": [ @@ -39800,15 +40475,6 @@ } ] }, - { - "propertyName": "LifespanMin" - }, - { - "propertyName": "LifespanMax" - }, - { - "propertyName": "Duration" - }, { "folderName": "Position", "children": [ @@ -39826,9 +40492,6 @@ } ] }, - { - "propertyName": "ShouldAutodestruct" - }, { "propertyName": "ParentOrigin" } diff --git a/examples/starting-first-person-shooter/assets/StarterPushable.png b/examples/starting-first-person-shooter/assets/StarterPushable.png index fe58d8cbf..95088c6de 100644 Binary files a/examples/starting-first-person-shooter/assets/StarterPushable.png and b/examples/starting-first-person-shooter/assets/StarterPushable.png differ diff --git a/examples/starting-first-person-shooter/assets/StartingGround.png b/examples/starting-first-person-shooter/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-first-person-shooter/assets/StartingGround.png and b/examples/starting-first-person-shooter/assets/StartingGround.png differ diff --git a/examples/starting-first-person-shooter/assets/StartingWall.png b/examples/starting-first-person-shooter/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-first-person-shooter/assets/StartingWall.png and b/examples/starting-first-person-shooter/assets/StartingWall.png differ diff --git a/examples/starting-first-person-shooter/starting-first-person-shooter.json b/examples/starting-first-person-shooter/starting-first-person-shooter.json index 997141c2b..818d19ec6 100644 --- a/examples/starting-first-person-shooter/starting-first-person-shooter.json +++ b/examples/starting-first-person-shooter/starting-first-person-shooter.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-first-person", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person-shooter", "description": "", @@ -216,7 +215,7 @@ "metadata": "", "name": "assets\\Gunshot.mp3", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -290,16 +289,16 @@ "uiSettings": { "grid": false, "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridDepth": 32, + "gridWidth": 64, + "gridHeight": 64, + "gridDepth": 64, "gridOffsetX": 0, "gridOffsetY": 0, "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.4481978045410593, + "zoomFactor": 0.36732575450590194, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -352,7 +351,7 @@ { "angle": 0, "customSize": true, - "depth": 60, + "depth": 64, "height": 128, "layer": "", "name": "Obstacle", @@ -368,7 +367,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 128, "layer": "", "name": "Obstacle", @@ -436,7 +435,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 320, "layer": "", "name": "Obstacle", @@ -452,7 +451,7 @@ { "angle": 0, "customSize": true, - "depth": 120, + "depth": 128, "height": 128, "layer": "", "name": "Obstacle", @@ -468,7 +467,7 @@ { "angle": 0, "customSize": true, - "depth": 120, + "depth": 128, "height": 128, "layer": "", "name": "Obstacle", @@ -484,7 +483,7 @@ { "angle": 0, "customSize": true, - "depth": 60, + "depth": 64, "height": 128, "layer": "", "name": "Obstacle", @@ -588,7 +587,7 @@ { "angle": 0, "customSize": true, - "depth": 440, + "depth": 448, "height": 128, "layer": "", "name": "PushableBox", @@ -596,7 +595,7 @@ "width": 16, "x": 412, "y": 320, - "z": 120, + "z": 128, "zOrder": 5, "numberProperties": [], "stringProperties": [], @@ -623,7 +622,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 320, "layer": "", "name": "Obstacle", @@ -707,6 +706,74 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "50b705f3-24e7-40ea-9e34-6397fdf81911", + "width": 2048, + "x": -384, + "y": -640, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "c9405416-2be8-472a-8278-ec75d6661cf4", + "width": 2048, + "x": -384, + "y": 1152, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "dfa3dec4-31e9-4237-be49-a23a9657c1f2", + "width": 64, + "x": 1600, + "y": -576, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "f6e9621f-3145-421d-9c8e-fee947d1fe8c", + "width": 64, + "x": -384, + "y": -576, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -780,6 +847,7 @@ { "assetStoreId": "", "name": "Obstacle", + "persistentUuid": "af88fd90-be89-4bb1-9254-3aa697edcb4f", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -814,9 +882,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -832,12 +900,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -846,6 +914,7 @@ { "assetStoreId": "", "name": "PushableBox", + "persistentUuid": "b8905b16-18fb-43d0-87c7-16b52970707b", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -880,9 +949,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StarterPushable.png", @@ -898,12 +967,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1394,6 +1463,7 @@ { "assetStoreId": "", "name": "Target", + "persistentUuid": "5ccfec64-e590-4f88-aaf9-1f39e074f7f0", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -1774,7 +1844,7 @@ "", "assets\\Gunshot.mp3", "", - "70", + "60", "RandomFloatInRange(0.95,1.1)" ] }, @@ -11519,249 +11589,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", @@ -17598,7 +17425,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -17607,7 +17434,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -20293,6 +20120,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -21772,6 +21696,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -21894,6 +21825,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, @@ -24781,7 +24715,7 @@ { "author": "", "category": "Visual effect", - "dimension": "", + "dimension": "3D", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -24790,7 +24724,7 @@ "name": "ParticleEmitter3D", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", "shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.", - "version": "3.0.1", + "version": "3.1.0", "description": [ "3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.", "", @@ -24994,15 +24928,78 @@ " * @param colorOverLife {ColorOverLife}", " * @param sizeOverLife {SizeOverLife}", " * @param applyForce {ApplyForce}", + " * @param applyForce {ApplyForce}", + " * @param widthOverLength {WidthOverLength}", " */", - " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce) {", + " constructor(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength) {", " this.particleSystem = particleSystem;", " this.colorOverLife = colorOverLife;", " this.sizeOverLife = sizeOverLife;", " this.applyForce = applyForce;", + " this.widthOverLength = widthOverLength;", " }", "", " /**", + " * @param renderMode {'Billboard' | 'Trail'}", + " */", + " setRenderMode(renderMode) {", + " switch (renderMode) {", + " case \"BillBoard\":", + " this.particleSystem.renderMode = RenderMode.BillBoard;", + " break;", + " case \"Trail\":", + " this.particleSystem.renderMode = RenderMode.Trail;", + " this.particleSystem.rendererEmitterSettings.startLength = new IntervalValue(30, 30);", + " break;", + " }", + " }", + "", + " /**", + " * @param startLengthMin {number}", + " */", + " setTrailStartLengthMin(startLengthMin) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.a = startLengthMin;", + " }", + "", + " /**", + " * @param startLengthMax {number}", + " */", + " setTrailStartLengthMax(startLengthMax) {", + " const startLength = this.particleSystem.rendererEmitterSettings.startLength;", + " if (!startLength) {", + " return;", + " }", + " startLength.b = startLengthMax;", + " }", + "", + " /**", + " * @param followLocalOrigin {boolean}", + " */", + " setTrailFollowingLocalOrigin(followLocalOrigin) {", + " this.particleSystem.rendererEmitterSettings.followLocalOrigin = followLocalOrigin;", + " }", + "", + " /**", + " * @param trailEndWidthRatio {number}", + " */", + " setTrailEndWidthRatio(trailEndWidthRatio) {", + " // Check this comment in the lib code:", + " // We added a multiplication with size because it's more convenient for the extension.", + "", + " /** @type Bezier */", + " const bezier = this.widthOverLength.width.functions[0][0];", + " bezier.p[0] = 1;", + " bezier.p[1] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 1 / 3);", + " bezier.p[2] = gdjs.evtTools.common.lerp(1, trailEndWidthRatio, 2 / 3);", + " bezier.p[3] = trailEndWidthRatio;", + " }", + "", + "", + " /**", " * @param startColor {string}", " */", " setStartColor(startColor) {", @@ -26411,7 +26408,8 @@ " const iter = particle.previous.values();", " for (let i = 0; i < particle.previous.length; i++) {", " const cur = iter.next();", - " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length);", + " // We added a multiplication with size because it's more convenient for the extension.", + " cur.value.size = this.width.genValue((particle.previous.length - i) / particle.length) * particle.size;", " }", " }", " }", @@ -31669,6 +31667,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "3d particles", "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", @@ -31744,7 +31743,7 @@ } ], "instances": [], - "editionSettings": {}, + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -31782,6 +31781,7 @@ " ColorOverLife,", " SizeOverLife,", " ApplyForce,", + " WidthOverLength,", " Gradient,", " PiecewiseBezier,", " Bezier,", @@ -31875,10 +31875,12 @@ "particleSystem.addBehavior(sizeOverLife);", "const applyForce = new ApplyForce(new THREE.Vector3(0, 0, -1), new ConstantValue(0));", "particleSystem.addBehavior(applyForce);", + "const widthOverLength = new WidthOverLength(new PiecewiseBezier([[new Bezier(1, 2 / 3, 1 / 3, 0), 0]]));", + "particleSystem.addBehavior(widthOverLength);", "", "particleSystem.emitter.name = object.getName() + object.getNameId();", "", - "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce);", + "object.__particleEmitterAdapter = new ParticleEmitterAdapter(particleSystem, colorOverLife, sizeOverLife, applyForce, widthOverLength);", "object.__particleSystem = particleSystem;", "", "// This is a hack that may break in future releases.", @@ -32077,6 +32079,50 @@ "" ] }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetRenderMode" + }, + "parameters": [ + "Object", + "=", + "RenderMode", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailEndWidthRatio" + }, + "parameters": [ + "Object", + "=", + "TrailEndWidthRatio", + "" + ] + }, { "type": { "value": "ParticleEmitter3D::ParticleEmitter3D::SetStartColor" @@ -32264,6 +32310,61 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsTrailFollowingLocalOrigin", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetIsTrailFollowingLocalOrigin" + }, + "parameters": [ + "Object", + "yes", + "TrailStartLengthMax" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -32518,7 +32619,10 @@ " for (const layerName of layerNames) {", " const layer = gameScene.getLayer(layerName);", " if (layer.__particleEmmiter3DExtension) {", - " layer.__particleEmmiter3DExtension.batchSystem.update(layer.getElapsedTime() / 1000);", + " const timeDelta = layer.getElapsedTime() / 1000;", + " if (timeDelta > 0) {", + " layer.__particleEmmiter3DExtension.batchSystem.update(timeDelta);", + " }", " }", " }", "}" @@ -32946,7 +33050,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyStartColor()" + "StartColor" ] } ] @@ -33029,7 +33133,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyEndColor()" + "EndColor" ] } ] @@ -33112,7 +33216,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartOpacity()" + "StartOpacity" ] } ] @@ -33195,7 +33299,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndOpacity()" + "EndOpacity" ] } ] @@ -33278,7 +33382,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyFlow()" + "Flow" ] } ] @@ -33362,7 +33466,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMin()" + "StartSizeMin" ] } ] @@ -33445,7 +33549,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSizeMax()" + "StartSizeMax" ] } ] @@ -33529,7 +33633,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyEndScale()" + "EndScale" ] } ] @@ -33613,7 +33717,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMin()" + "StartSpeedMin" ] } ] @@ -33696,7 +33800,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyStartSpeedMax()" + "StartSpeedMax" ] } ] @@ -33779,7 +33883,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMin()" + "LifespanMin" ] } ] @@ -33863,7 +33967,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyLifespanMax()" + "LifespanMax" ] } ] @@ -33947,7 +34051,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyDuration()" + "Duration" ] } ] @@ -34169,7 +34273,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertySpayConeAngle()" + "SpayConeAngle" ] } ] @@ -34253,7 +34357,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyBlending()" + "Blending" ] } ] @@ -34339,7 +34443,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.PropertyGravityTop()" + "GravityTop" ] } ] @@ -34424,7 +34528,299 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.PropertyGravity()" + "Gravity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Gravity", + "group": "3D particle emitter speed configuration", + "name": "SetGravity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Gravity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setGravity(gravity);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Condition", + "group": "3D particle emitter configuration", + "name": "ShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if delete when emission ends.", + "fullName": "Delete when emission ends", + "functionType": "Action", + "group": "3D particle emitter configuration", + "name": "SetShouldAutodestruct", + "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldAutodestruct", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "ShouldAutodestruct", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the start min trail length of the object.", + "fullName": "Start min trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMin", + "sentence": "the start min trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailStartLengthMin", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailStartLengthMin", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailStartLengthMin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the start max trail length of the object.", + "fullName": "Start max trail length", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailStartLengthMax", + "sentence": "the start max trail length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailStartLengthMax" ] } ] @@ -34446,9 +34842,9 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Gravity", - "group": "3D particle emitter speed configuration", - "name": "SetGravity", + "getterName": "TrailStartLengthMax", + "group": "3D particle emitter trail configuration", + "name": "SetTrailStartLengthMax", "sentence": "", "events": [ { @@ -34460,7 +34856,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "Gravity", + "TrailStartLengthMax", "=", "Value" ] @@ -34471,14 +34867,13 @@ "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ "const object = objects[0];\r", - "const gravity = eventsFunctionContext.getArgument(\"Value\");\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", "\r", - "object.__particleEmitterAdapter.setGravity(gravity);\r", - "" + "object.__particleEmitterAdapter.setTrailStartLengthMax(value);" ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ], "parameters": [ @@ -34492,12 +34887,12 @@ "objectGroups": [] }, { - "description": "Check if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Check if the trail should follow the object.", + "fullName": "Trail following the object", "functionType": "Condition", - "group": "3D particle emitter configuration", - "name": "ShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends", + "group": "3D particle emitter trail configuration", + "name": "IsTrailFollowingLocalOrigin", + "sentence": "The trail is following _PARAM0_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -34507,7 +34902,7 @@ "value": "BooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] @@ -34536,24 +34931,23 @@ "objectGroups": [] }, { - "description": "Change if delete when emission ends.", - "fullName": "Delete when emission ends", + "description": "Change if the trail should follow the object or not.", + "fullName": "Make the trail follow", "functionType": "Action", - "group": "3D particle emitter configuration", - "name": "SetShouldAutodestruct", - "sentence": "_PARAM0_ delete when emission ends: _PARAM1_", + "group": "3D particle emitter trail configuration", + "name": "SetIsTrailFollowingLocalOrigin", + "sentence": "Make the trail follow _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, "value": "BooleanVariable" }, "parameters": [ "Value", - "True", + "False", "" ] } @@ -34564,7 +34958,7 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "False", "" ] @@ -34591,12 +34985,24 @@ "value": "SetBooleanVariable" }, "parameters": [ - "ShouldAutodestruct", + "IsTrailFollowingLocalOrigin", "True", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailFollowingLocalOrigin(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false } ], "parameters": [ @@ -34608,13 +35014,233 @@ }, { "defaultValue": "yes", - "description": "ShouldAutodestruct", + "description": "IsTrailFollowingLocalOrigin", "name": "Value", "optional": true, "type": "yesorno" } ], "objectGroups": [] + }, + { + "description": "the tail end width ratio of the object.", + "fullName": "Tail end width ratio", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter trail configuration", + "name": "TrailEndWidthRatio", + "sentence": "the tail end width ratio", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TrailEndWidthRatio" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TrailEndWidthRatio", + "group": "3D particle emitter trail configuration", + "name": "SetTrailEndWidthRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TrailEndWidthRatio", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setTrailEndWidthRatio(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the render mode of the object.", + "fullName": "Render mode", + "functionType": "ExpressionAndCondition", + "group": "3D particle emitter configuration", + "name": "RenderMode", + "private": true, + "sentence": "the render mode", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "RenderMode" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Billboard\",\"Trail\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "RenderMode", + "group": "3D particle emitter configuration", + "name": "SetRenderMode", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__particleEmitterAdapter.setRenderMode(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the trail properties because the RenderMode setter reset them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "RenderMode", + "=", + "\"Trail\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMin" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMin", + "" + ] + }, + { + "type": { + "value": "ParticleEmitter3D::ParticleEmitter3D::SetTrailStartLengthMax" + }, + "parameters": [ + "Object", + "=", + "TrailStartLengthMax", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "object" + } + ], + "objectGroups": [] } ], "eventsFunctionsFolderStructure": { @@ -34772,6 +35398,12 @@ }, { "functionName": "SetShouldAutodestruct" + }, + { + "functionName": "RenderMode" + }, + { + "functionName": "SetRenderMode" } ] }, @@ -34809,6 +35441,35 @@ "functionName": "SetGravity" } ] + }, + { + "folderName": "3D particle emitter trail configuration", + "children": [ + { + "functionName": "TrailStartLengthMin" + }, + { + "functionName": "SetTrailStartLengthMin" + }, + { + "functionName": "TrailStartLengthMax" + }, + { + "functionName": "SetTrailStartLengthMax" + }, + { + "functionName": "IsTrailFollowingLocalOrigin" + }, + { + "functionName": "SetIsTrailFollowingLocalOrigin" + }, + { + "functionName": "TrailEndWidthRatio" + }, + { + "functionName": "SetTrailEndWidthRatio" + } + ] } ] }, @@ -35020,11 +35681,81 @@ "group": "Position", "hidden": true, "name": "RotationY" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start min length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMin" + }, + { + "value": "120", + "type": "Number", + "unit": "Pixel", + "label": "Start max length", + "group": "Trail", + "advanced": true, + "name": "TrailStartLengthMax" + }, + { + "value": "Billboard", + "type": "Choice", + "label": "Render mode", + "choices": [ + { + "label": "Image facing the camera", + "value": "Billboard" + }, + { + "label": "Image following a trail", + "value": "Trail" + } + ], + "advanced": true, + "name": "RenderMode" + }, + { + "value": "", + "type": "Boolean", + "label": "Follow the object", + "group": "Trail", + "advanced": true, + "name": "IsTrailFollowingLocalOrigin" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail end width ratio", + "group": "Trail", + "advanced": true, + "name": "TrailEndWidthRatio" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ + { + "propertyName": "Flow" + }, + { + "propertyName": "LifespanMin" + }, + { + "propertyName": "LifespanMax" + }, + { + "propertyName": "Duration" + }, + { + "propertyName": "ShouldAutodestruct" + }, + { + "propertyName": "RenderMode" + }, { "folderName": "Color", "children": [ @@ -35045,9 +35776,6 @@ } ] }, - { - "propertyName": "Flow" - }, { "folderName": "Size", "children": [ @@ -35062,6 +35790,23 @@ } ] }, + { + "folderName": "Trail", + "children": [ + { + "propertyName": "TrailStartLengthMin" + }, + { + "propertyName": "TrailStartLengthMax" + }, + { + "propertyName": "TrailEndWidthRatio" + }, + { + "propertyName": "IsTrailFollowingLocalOrigin" + } + ] + }, { "folderName": "Speed", "children": [ @@ -35082,15 +35827,6 @@ } ] }, - { - "propertyName": "LifespanMin" - }, - { - "propertyName": "LifespanMax" - }, - { - "propertyName": "Duration" - }, { "folderName": "Position", "children": [ @@ -35108,9 +35844,6 @@ } ] }, - { - "propertyName": "ShouldAutodestruct" - }, { "propertyName": "ParentOrigin" } diff --git a/examples/starting-first-person-survival-crafting/assets/StartingWall.png b/examples/starting-first-person-survival-crafting/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-first-person-survival-crafting/assets/StartingWall.png and b/examples/starting-first-person-survival-crafting/assets/StartingWall.png differ diff --git a/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json b/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json index 7580d550f..5fa8bd5bc 100644 --- a/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json +++ b/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-first-person", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person-survival-crafting", "description": "", @@ -249,7 +248,7 @@ "metadata": "", "name": "assets\\Placement thud.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -375,21 +374,25 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "fcafbc0c-5c3f-40d2-ab75-f3355a38b4f1", "type": "string", "value": "Keyboard" }, { "name": "Inventory", + "persistentUuid": "ac8e82c8-c591-4644-92e8-8908cd473ecd", "type": "array", "children": [] }, { "name": "UpdateInventoryDisplay", + "persistentUuid": "d1ec9e52-04a9-4ce8-a08f-36d717eb884c", "type": "boolean", "value": false }, { "name": "SelectedSlot", + "persistentUuid": "11431277-f3b0-4e4d-a476-2fc08088c4b5", "type": "number", "value": 0 } @@ -870,6 +873,74 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "0ac1082e-a16d-4973-b86b-87912dc7dcdf", + "width": 2048, + "x": -384, + "y": -640, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "bbaccb13-e0b7-46d6-8a3e-b19accf2a7e9", + "width": 2048, + "x": -384, + "y": 1152, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "7d41c015-b1e0-4b65-b046-c6b6af945a7d", + "width": 64, + "x": 1600, + "y": -576, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "2f6fbc62-042d-4311-bb31-d178ebc30db1", + "width": 64, + "x": -384, + "y": -576, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -943,6 +1014,7 @@ { "assetStoreId": "", "name": "Obstacle", + "persistentUuid": "b5cbd456-bec7-41f0-99fe-2120c8aefa9f", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -977,9 +1049,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -995,12 +1067,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -2214,35 +2286,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FirstPersonCamera::LookFromObjectEyes" - }, - "parameters": [ - "", - "Player", - "", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "+", - "64", - "", - "" - ] - } - ] - }, { "colorB": 228, "colorG": 176, @@ -13579,249 +13622,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", @@ -25270,7 +25070,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -25279,7 +25079,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -27965,6 +27765,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -29444,6 +29341,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -29566,6 +29470,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, diff --git a/examples/starting-first-person/assets/StarterPushable.png b/examples/starting-first-person/assets/StarterPushable.png index fe58d8cbf..95088c6de 100644 Binary files a/examples/starting-first-person/assets/StarterPushable.png and b/examples/starting-first-person/assets/StarterPushable.png differ diff --git a/examples/starting-first-person/assets/StartingGround.png b/examples/starting-first-person/assets/StartingGround.png index b38c546fe..1c66f9341 100644 Binary files a/examples/starting-first-person/assets/StartingGround.png and b/examples/starting-first-person/assets/StartingGround.png differ diff --git a/examples/starting-first-person/assets/StartingWall.png b/examples/starting-first-person/assets/StartingWall.png index efbbc5e3d..ea50f81d9 100644 Binary files a/examples/starting-first-person/assets/StartingWall.png and b/examples/starting-first-person/assets/StartingWall.png differ diff --git a/examples/starting-first-person/starting-first-person.json b/examples/starting-first-person/starting-first-person.json index d45b36185..64c4dd52f 100644 --- a/examples/starting-first-person/starting-first-person.json +++ b/examples/starting-first-person/starting-first-person.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 269, + "build": 272, "major": 5, "minor": 6, "revision": 0 @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useDeprecatedZeroAsDefaultStringVariable": true, "version": "1.0.0", "name": "starting-first-person", "description": "", @@ -236,7 +235,7 @@ "title": "", "v": 255, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, @@ -246,8 +245,8 @@ "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 0.3010461197182587, + "snap": false, + "zoomFactor": 0.3437520241612461, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -256,6 +255,7 @@ "variables": [ { "name": "ControlKind", + "persistentUuid": "7d3cb27a-eea2-4449-872e-09f4d5250ba3", "type": "string", "value": "Keyboard" } @@ -282,7 +282,7 @@ { "angle": 0, "customSize": true, - "depth": 60, + "depth": 64, "height": 128, "layer": "", "name": "Obstacle", @@ -298,7 +298,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 320, "layer": "", "name": "Obstacle", @@ -314,7 +314,7 @@ { "angle": 0, "customSize": true, - "depth": 440, + "depth": 448, "height": 128, "layer": "", "name": "PushableBox", @@ -322,7 +322,7 @@ "width": 16, "x": 412, "y": 320, - "z": 120, + "z": 128, "zOrder": 5, "numberProperties": [], "stringProperties": [], @@ -366,7 +366,7 @@ { "angle": 0, "customSize": true, - "depth": 180, + "depth": 192, "height": 320, "layer": "", "name": "Obstacle", @@ -382,7 +382,7 @@ { "angle": 0, "customSize": true, - "depth": 120, + "depth": 128, "height": 128, "layer": "", "name": "Obstacle", @@ -398,7 +398,7 @@ { "angle": 0, "customSize": true, - "depth": 120, + "depth": 128, "height": 128, "layer": "", "name": "Obstacle", @@ -414,7 +414,7 @@ { "angle": 0, "customSize": true, - "depth": 60, + "depth": 64, "height": 128, "layer": "", "name": "Obstacle", @@ -459,6 +459,74 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "15c4e0e3-be52-4e6b-bb16-37ddbbbd9296", + "width": 2048, + "x": -384, + "y": -640, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "4955705b-f0d4-4f50-8427-c923662f0094", + "width": 2048, + "x": -384, + "y": 1152, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "40d29e05-0f28-4401-a44d-07125589520f", + "width": 64, + "x": -384, + "y": -576, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 64, + "height": 1728, + "keepRatio": true, + "layer": "", + "name": "Obstacle", + "persistentUuid": "4970e918-6973-4699-8a02-0d0b0aade12a", + "width": 64, + "x": 1600, + "y": -576, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -532,6 +600,7 @@ { "assetStoreId": "", "name": "Obstacle", + "persistentUuid": "d8251101-8e7e-48ec-8293-47aafa7fb87b", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -566,9 +635,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StartingWall.png", @@ -584,12 +653,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -598,6 +667,7 @@ { "assetStoreId": "", "name": "PushableBox", + "persistentUuid": "eafdf16e-8851-4f96-9bf0-578ef83c65ba", "type": "Scene3D::Cube3DObject", "variables": [], "effects": [], @@ -632,9 +702,9 @@ } ], "content": { - "width": 100, - "height": 100, - "depth": 100, + "width": 128, + "height": 128, + "depth": 128, "enableTextureTransparency": false, "facesOrientation": "Y", "frontFaceResourceName": "assets\\StarterPushable.png", @@ -650,12 +720,12 @@ "rightFaceVisible": true, "topFaceVisible": true, "bottomFaceVisible": true, - "frontFaceResourceRepeat": false, - "backFaceResourceRepeat": false, - "leftFaceResourceRepeat": false, - "rightFaceResourceRepeat": false, - "topFaceResourceRepeat": false, - "bottomFaceResourceRepeat": false, + "frontFaceResourceRepeat": true, + "backFaceResourceRepeat": true, + "leftFaceResourceRepeat": true, + "rightFaceResourceRepeat": true, + "topFaceResourceRepeat": true, + "bottomFaceResourceRepeat": true, "materialType": "StandardWithoutMetalness", "isCastingShadow": true, "isReceivingShadow": true @@ -1072,35 +1142,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FirstPersonCamera::LookFromObjectEyes" - }, - "parameters": [ - "", - "Player", - "", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "+", - "64", - "", - "" - ] - } - ] - }, { "colorB": 228, "colorG": 176, @@ -10611,249 +10652,6 @@ } ] }, - { - "author": "", - "category": "Camera", - "dimension": "", - "extensionNamespace": "", - "fullName": "First person 3D camera", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K", - "name": "FirstPersonCamera", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg", - "shortDescription": "Move the camera to look though objects eyes.", - "version": "1.0.4", - "description": [ - "Move the camera to look though objects eyes.", - "", - "This extension can be used with the \"Mouse pointer lock\" or \"Gamepad\" extension to build a first person camera.", - "", - "The first person example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://3d-first-person))." - ], - "origin": { - "identifier": "FirstPersonCamera", - "name": "gdevelop-extension-store" - }, - "tags": [ - "3d", - "camera", - "fps" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "m8kleQHonagHWsvILDhyJhgVhuF2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFromObjectEyes", - "private": true, - "sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Cube3DObject", - "type": "objectList" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - }, - { - "description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", - "fullName": "Look through object eyes", - "functionType": "Action", - "group": "Layers and cameras", - "name": "LookFrom3DObjectEyes", - "sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CentreCamera" - }, - "parameters": [ - "", - "Object", - "", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraZ" - }, - "parameters": [ - "", - "=", - "Object.Object3D::Z()", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationX" - }, - "parameters": [ - "", - "=", - "- Object.Object3D::RotationY() + 90", - "Layer", - "" - ] - }, - { - "type": { - "value": "Scene3D::SetCameraRotationY" - }, - "parameters": [ - "", - "=", - "Object.Object3D::RotationX()", - "Layer", - "" - ] - }, - { - "type": { - "value": "SetCameraAngle" - }, - "parameters": [ - "", - "=", - "Object.Angle() + 90", - "Layer", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "3D Object", - "name": "Object", - "type": "objectList" - }, - { - "description": "3D capability", - "name": "Object3D", - "supplementaryInformation": "Scene3D::Base3DBehavior", - "type": "behavior" - }, - { - "description": "Layer", - "name": "Layer", - "type": "layer" - } - ], - "objectGroups": [] - } - ], - "eventsFunctionsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Layers and cameras", - "children": [ - { - "functionName": "LookFromObjectEyes" - }, - { - "functionName": "LookFrom3DObjectEyes" - } - ] - } - ] - }, - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "PANDAKO-GitHub", "category": "Input", diff --git a/examples/starting-flappy-bird/starting-flappy-bird.json b/examples/starting-flappy-bird/starting-flappy-bird.json index 4bb83d3da..ed9da6a09 100644 --- a/examples/starting-flappy-bird/starting-flappy-bird.json +++ b/examples/starting-flappy-bird/starting-flappy-bird.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -131,8 +131,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -156,14 +155,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.37971210019479645, + "zoomFactor": 0.5843784410740986, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -460,6 +462,7 @@ "assetStoreId": "", "height": 64, "name": "Boundary", + "persistentUuid": "3430627c-fd52-47a1-94ea-c31cf1010e9e", "texture": "assets\\StartingGround.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, @@ -775,6 +778,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -792,6 +796,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -852,4 +857,4 @@ "externalEvents": [], "eventsFunctionsExtensions": [], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-physics-pixel/starting-physics-pixel.json b/examples/starting-physics-pixel/starting-physics-pixel.json index 058ba89f3..cd62218d8 100644 --- a/examples/starting-physics-pixel/starting-physics-pixel.json +++ b/examples/starting-physics-pixel/starting-physics-pixel.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -131,8 +131,7 @@ "smoothed": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -156,14 +155,17 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.2121641972173938, + "zoomFactor": 1.1343715797161202, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -549,6 +551,7 @@ "assetStoreId": "", "height": 64, "name": "Background", + "persistentUuid": "c808a364-7448-41ce-a294-4569a22bc5c2", "texture": "assets\\PixelBackground.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, @@ -851,6 +854,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -922,15 +926,16 @@ { "author": "", "category": "Movement", + "dimension": "2D", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Virtual Reality/Virtual Reality_hand_vr_ar_360.svg", - "shortDescription": "Drag a physics object with the mouse (or touch).", - "version": "1.2.1", + "shortDescription": "Drag Physics 2D objects with mouse or touch input.", + "version": "1.3.0", "description": [ "Enables players to click and drag on physics objects to move them. The object retains velocity when the click is released, allowing players to fling objects across the screen.", "", @@ -964,12 +969,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Drag a physics object with the mouse (or touch).", "fullName": "Draggable (for physics objects)", + "helpPath": "", + "iconUrl": "", "name": "DraggablePhysics", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -1040,11 +1051,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] } ], @@ -1115,11 +1127,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "Variable(__DraggablePhysics.MouseJointID)" ] @@ -1147,11 +1158,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] }, { @@ -1277,11 +1289,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "Variable(__DraggablePhysics.MouseJointID)" ] @@ -1338,11 +1349,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "0" ] @@ -1377,11 +1387,10 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyMouseJointID" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "!=", "0" ] @@ -1498,6 +1507,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MouseButton", + "group": "Draggable (for physics objects) configuration", "name": "SetMouseButton", "sentence": "", "events": [ @@ -1507,11 +1517,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseButton" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseButton", "=", "Value" ] @@ -1579,6 +1588,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxForce", + "group": "Draggable configuration", "name": "SetMaxForce", "sentence": "", "events": [ @@ -1588,11 +1598,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMaxForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxForce", "=", "Value" ] @@ -1660,6 +1669,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Frequency", + "group": "Draggable configuration", "name": "SetFrequency", "sentence": "", "events": [ @@ -1669,11 +1679,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyFrequency" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Frequency", "=", "Value" ] @@ -1741,6 +1750,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Damping", + "group": "Draggable configuration", "name": "SetDamping", "sentence": "", "events": [ @@ -1750,11 +1760,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyDamping" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Damping", "=", "Value" ] @@ -1790,11 +1799,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] } ], @@ -1839,22 +1849,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyEnableAutomaticDragging" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "EnableAutomaticDragging", + "False", + "" ] } ] @@ -1864,22 +1876,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyEnableAutomaticDragging" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "EnableAutomaticDragging", + "True", + "" ] } ] @@ -1908,6 +1922,66 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "StartDragging" + }, + { + "functionName": "ReleaseDrag" + }, + { + "functionName": "IsBeingDragged" + }, + { + "functionName": "onDeActivate" + }, + { + "folderName": "Draggable (for physics objects) configuration", + "children": [ + { + "functionName": "MouseButton" + }, + { + "functionName": "SetMouseButton" + }, + { + "functionName": "IsAutomaticDraggingEnabled" + }, + { + "functionName": "SetEnableAutomaticDragging" + } + ] + }, + { + "folderName": "Draggable configuration", + "children": [ + { + "functionName": "MaxForce" + }, + { + "functionName": "SetMaxForce" + }, + { + "functionName": "Frequency" + }, + { + "functionName": "SetFrequency" + }, + { + "functionName": "Damping" + }, + { + "functionName": "SetDamping" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -1973,11 +2047,36 @@ "name": "EnableAutomaticDragging" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsBehavior" + }, + { + "propertyName": "MouseButton" + }, + { + "propertyName": "MaxForce" + }, + { + "propertyName": "Frequency" + }, + { + "propertyName": "Damping" + }, + { + "propertyName": "MouseJointID" + }, + { + "propertyName": "EnableAutomaticDragging" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-physics/starting-physics.json b/examples/starting-physics/starting-physics.json index c8cba8835..defd3506b 100644 --- a/examples/starting-physics/starting-physics.json +++ b/examples/starting-physics/starting-physics.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -131,8 +131,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -156,14 +155,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5653158055126374, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -851,6 +853,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -922,15 +925,16 @@ { "author": "", "category": "Movement", + "dimension": "2D", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Virtual Reality/Virtual Reality_hand_vr_ar_360.svg", - "shortDescription": "Drag a physics object with the mouse (or touch).", - "version": "1.2.1", + "shortDescription": "Drag Physics 2D objects with mouse or touch input.", + "version": "1.3.0", "description": [ "Enables players to click and drag on physics objects to move them. The object retains velocity when the click is released, allowing players to fling objects across the screen.", "", @@ -964,12 +968,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Drag a physics object with the mouse (or touch).", "fullName": "Draggable (for physics objects)", + "helpPath": "", + "iconUrl": "", "name": "DraggablePhysics", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -1040,11 +1050,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] } ], @@ -1115,11 +1126,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "Variable(__DraggablePhysics.MouseJointID)" ] @@ -1147,11 +1157,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] }, { @@ -1277,11 +1288,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "Variable(__DraggablePhysics.MouseJointID)" ] @@ -1338,11 +1348,10 @@ }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "=", "0" ] @@ -1377,11 +1386,10 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyMouseJointID" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseJointID", "!=", "0" ] @@ -1498,6 +1506,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MouseButton", + "group": "Draggable (for physics objects) configuration", "name": "SetMouseButton", "sentence": "", "events": [ @@ -1507,11 +1516,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseButton" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseButton", "=", "Value" ] @@ -1579,6 +1587,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxForce", + "group": "Draggable configuration", "name": "SetMaxForce", "sentence": "", "events": [ @@ -1588,11 +1597,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMaxForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxForce", "=", "Value" ] @@ -1660,6 +1668,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Frequency", + "group": "Draggable configuration", "name": "SetFrequency", "sentence": "", "events": [ @@ -1669,11 +1678,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyFrequency" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Frequency", "=", "Value" ] @@ -1741,6 +1749,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Damping", + "group": "Draggable configuration", "name": "SetDamping", "sentence": "", "events": [ @@ -1750,11 +1759,10 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyDamping" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Damping", "=", "Value" ] @@ -1790,11 +1798,12 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyEnableAutomaticDragging" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAutomaticDragging", + "True", + "" ] } ], @@ -1839,22 +1848,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyEnableAutomaticDragging" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "EnableAutomaticDragging", + "False", + "" ] } ] @@ -1864,22 +1875,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyEnableAutomaticDragging" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "EnableAutomaticDragging", + "True", + "" ] } ] @@ -1908,6 +1921,66 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "StartDragging" + }, + { + "functionName": "ReleaseDrag" + }, + { + "functionName": "IsBeingDragged" + }, + { + "functionName": "onDeActivate" + }, + { + "folderName": "Draggable (for physics objects) configuration", + "children": [ + { + "functionName": "MouseButton" + }, + { + "functionName": "SetMouseButton" + }, + { + "functionName": "IsAutomaticDraggingEnabled" + }, + { + "functionName": "SetEnableAutomaticDragging" + } + ] + }, + { + "folderName": "Draggable configuration", + "children": [ + { + "functionName": "MaxForce" + }, + { + "functionName": "SetMaxForce" + }, + { + "functionName": "Frequency" + }, + { + "functionName": "SetFrequency" + }, + { + "functionName": "Damping" + }, + { + "functionName": "SetDamping" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -1973,11 +2046,36 @@ "name": "EnableAutomaticDragging" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsBehavior" + }, + { + "propertyName": "MouseButton" + }, + { + "propertyName": "MaxForce" + }, + { + "propertyName": "Frequency" + }, + { + "propertyName": "Damping" + }, + { + "propertyName": "MouseJointID" + }, + { + "propertyName": "EnableAutomaticDragging" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-platformer-pixel/assets/CoinPickUp.wav b/examples/starting-platformer-pixel/assets/CoinPickUp.wav new file mode 100644 index 000000000..0509182e6 Binary files /dev/null and b/examples/starting-platformer-pixel/assets/CoinPickUp.wav differ diff --git a/examples/starting-platformer-pixel/assets/PickupCoin.wav b/examples/starting-platformer-pixel/assets/PickupCoin.wav deleted file mode 100644 index baf5f0edb..000000000 Binary files a/examples/starting-platformer-pixel/assets/PickupCoin.wav and /dev/null differ diff --git a/examples/starting-platformer-pixel/starting-platformer-pixel.json b/examples/starting-platformer-pixel/starting-platformer-pixel.json index 2f1b6142f..34bad0e56 100644 --- a/examples/starting-platformer-pixel/starting-platformer-pixel.json +++ b/examples/starting-platformer-pixel/starting-platformer-pixel.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -127,16 +127,6 @@ "name": "Flat dark joystick thumb.png" } }, - { - "file": "assets/PickupCoin.wav", - "kind": "audio", - "metadata": "{\"extension\":\".wav\",\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.05,\\\"sustainPunch\\\":20,\\\"decay\\\":0.3,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":400,\\\"frequencySweep\\\":0,\\\"frequencyDeltaSweep\\\":0,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":15,\\\"frequencyJump1Amount\\\":25,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"whistle\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":85,\\\"squareDutySweep\\\":35,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"PickupCoin\"},\"localFilePath\":\"assets/PickupCoin.wav\"}", - "name": "PickupCoin", - "preloadAsMusic": false, - "preloadAsSound": true, - "preloadInCache": false, - "userAdded": false - }, { "file": "assets/StartingPixelPlayer.png", "kind": "image", @@ -168,9 +158,18 @@ "name": "assets\\StartingPixelCoin.png", "smoothed": false, "userAdded": false + }, + { + "file": "assets/CoinPickUp.wav", + "kind": "audio", + "metadata": "", + "name": "assets/CoinPickUp.wav", + "preloadAsMusic": false, + "preloadAsSound": false, + "preloadInCache": false, + "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -194,14 +193,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.1726229638177799, + "zoomFactor": 1.2121641972173838, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -898,10 +900,10 @@ }, "parameters": [ "", - "PickupCoin", + "assets/CoinPickUp.wav", "", "80", - "RandomFloatInRange(1,1.1)" + "RandomFloatInRange(0.75,1)" ] } ] @@ -912,6 +914,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -929,6 +932,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -957,6 +961,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1036,15 +1041,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1076,17 +1082,23 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -1115,11 +1127,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1128,11 +1139,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1166,12 +1176,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -1181,11 +1191,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -1202,12 +1213,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -1230,12 +1241,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -1245,11 +1256,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -1268,12 +1278,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -1305,11 +1315,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -1339,23 +1348,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -1371,22 +1379,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1397,11 +1403,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1416,11 +1421,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -1449,20 +1453,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1471,11 +1475,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1487,20 +1490,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1509,11 +1512,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1526,20 +1528,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1548,11 +1550,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -1564,20 +1565,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -1586,11 +1587,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1625,11 +1625,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -1641,11 +1640,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1654,11 +1652,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1671,11 +1668,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1683,11 +1679,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1696,11 +1691,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1783,22 +1777,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -1833,11 +1825,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1882,11 +1873,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1931,11 +1921,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1980,11 +1969,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2006,11 +1994,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2055,11 +2042,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2104,11 +2090,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2182,6 +2167,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2249,13 +2269,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2377,11 +2422,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -2416,11 +2460,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -2455,11 +2498,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -2553,6 +2595,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -2562,11 +2605,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", "Value" ] @@ -2634,6 +2676,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -2643,11 +2686,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", "Value" ] @@ -2715,6 +2757,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -2724,11 +2767,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", "Value" ] @@ -2752,6 +2794,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -2796,13 +2872,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3006,6 +3109,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3015,11 +3119,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", "Value" ] @@ -3087,6 +3190,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3096,11 +3200,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", "Value" ] @@ -3168,6 +3271,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3177,11 +3281,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", "Value" ] @@ -3205,6 +3308,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3249,16 +3386,43 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Smoothly change an effect on buttons according to their state.", - "fullName": "Button object effect tween", - "name": "ButtonObjectEffectTween", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", + "name": "ButtonObjectEffectTween", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", @@ -3269,11 +3433,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "IdleValue" ] @@ -3326,11 +3489,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -3339,11 +3501,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -3382,11 +3543,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -3395,11 +3555,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -3422,11 +3581,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -3435,11 +3593,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -3474,11 +3631,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -3487,11 +3643,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -3526,11 +3681,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -3556,11 +3710,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -3583,6 +3736,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -3653,44 +3903,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -3731,44 +3977,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -3808,11 +4050,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", "Duration" ] @@ -3821,22 +4062,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] @@ -3848,11 +4087,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", "Duration" ] @@ -3861,22 +4099,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "TweenTargetedValue" ] @@ -4025,24 +4261,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "Value" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "Value" + "NewPropertyName" ] } ] @@ -4062,12 +4296,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -4118,6 +4352,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4127,11 +4362,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", "Value" ] @@ -4199,6 +4433,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4208,11 +4443,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", "Value" ] @@ -4280,6 +4514,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4289,11 +4524,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", "Value" ] @@ -4362,6 +4596,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -4371,11 +4606,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -4444,6 +4678,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -4453,11 +4688,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -4525,6 +4759,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -4534,11 +4769,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -4606,6 +4840,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -4615,11 +4850,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -4643,6 +4877,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4999,6 +5312,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5070,16 +5390,92 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Smoothly resize buttons according to their state.", - "fullName": "Button scale tween", - "name": "ButtonScaleTween", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", + "name": "ButtonScaleTween", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", @@ -5147,11 +5543,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -5160,11 +5555,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -5203,11 +5597,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -5216,11 +5609,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5243,11 +5635,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5256,11 +5647,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5295,11 +5685,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -5308,11 +5697,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5494,6 +5882,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -5503,11 +5892,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", "Value" ] @@ -5575,6 +5963,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -5584,11 +5973,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", "Value" ] @@ -5656,6 +6044,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -5665,11 +6054,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", "Value" ] @@ -5737,6 +6125,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -5746,11 +6135,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -5818,6 +6206,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -5827,11 +6216,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -5900,6 +6288,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -5909,11 +6298,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -5982,6 +6370,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -5991,11 +6380,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -6019,6 +6407,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6395,13 +6847,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6471,11 +6973,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -6484,11 +6985,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6527,11 +7027,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6540,11 +7039,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6567,11 +7065,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6580,11 +7077,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6619,11 +7115,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -6632,11 +7127,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6820,6 +7314,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -6829,11 +7324,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", "Value" ] @@ -6903,6 +7397,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -6912,11 +7407,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", "Value" ] @@ -6986,6 +7480,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -6995,11 +7490,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", "Value" ] @@ -7069,6 +7563,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7078,11 +7573,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -7152,6 +7646,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7161,11 +7656,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -7236,6 +7730,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7245,11 +7740,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -7320,6 +7814,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7329,11 +7824,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -7358,6 +7852,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7721,7 +8279,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -7729,6 +8331,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -9713,33 +10316,115 @@ "objectGroups": [] } ], - "eventsBasedBehaviors": [ - { - "description": "Joystick that can be controlled by interacting with a touchscreen.", - "fullName": "Multitouch Joystick", - "name": "MultitouchJoystick", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::SetDeadZone" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JoystickIdentifier", - "DeadZoneRadius", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Joystick that can be controlled by interacting with a touchscreen.", + "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", + "name": "MultitouchJoystick", + "objectType": "", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "DeadZoneRadius", "" ] }, @@ -10617,6 +11302,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -10697,6 +11383,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -10777,6 +11464,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -10869,6 +11557,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -10918,13 +11676,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11411,6 +12197,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -11461,13 +12267,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11641,6 +12475,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11683,13 +12525,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11784,6 +12650,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11826,13 +12700,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11916,6 +12814,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11958,13 +12864,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -12205,6 +13135,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -12285,6 +13216,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -12365,6 +13297,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -12445,6 +13378,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -12525,6 +13459,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -12605,6 +13540,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -12685,6 +13621,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -12765,6 +13702,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -12845,6 +13783,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -12881,29 +13820,114 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D capability", - "extraInformation": [ - "Scene3D::Base3DBehavior" - ], - "choices": [], - "name": "Object3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Secondary", - "type": "Choice", - "label": "Camera joystick", - "group": "Controls", - "choices": [ + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ { "label": "Primary", "value": "Primary" @@ -13000,13 +14024,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13119,6 +14212,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13178,13 +14279,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13691,6 +14819,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13746,7 +14882,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -13760,8 +14917,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -13840,6 +15000,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -13866,6 +15027,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -14820,6 +15982,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -14892,6 +16055,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -14964,6 +16128,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -14997,6 +16162,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -15075,6 +16319,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -15082,15 +16355,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -15121,12 +16395,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15284,11 +16565,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -15323,11 +16603,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -15385,12 +16666,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -15484,22 +16765,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -15641,22 +16922,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -15834,46 +17115,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -15910,22 +17187,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -15980,11 +17257,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -16027,11 +17303,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16077,44 +17352,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -16280,11 +17551,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -16295,22 +17566,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -16330,7 +17603,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -16350,11 +17623,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -16365,22 +17638,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -16400,7 +17675,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -16420,13 +17695,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -16446,7 +17720,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -16466,13 +17740,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -16492,7 +17765,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -16512,13 +17785,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -16538,7 +17810,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -16558,13 +17830,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -16584,7 +17855,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -16604,13 +17875,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16629,8 +17899,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -16650,13 +17920,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16676,7 +17945,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16696,13 +17965,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16722,7 +17990,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16742,13 +18010,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16768,7 +18035,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16788,24 +18055,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -16825,7 +18090,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16845,24 +18110,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -16882,7 +18145,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16902,24 +18165,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -16939,7 +18200,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16959,24 +18220,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -16996,7 +18255,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17047,6 +18306,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -17056,11 +18316,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -17116,7 +18375,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -17137,7 +18396,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -17188,32 +18447,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -17245,6 +18492,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -17298,13 +18557,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -17324,7 +18582,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -17344,13 +18602,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -17370,7 +18627,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -17640,22 +18897,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -17861,22 +19116,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -17939,11 +19192,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -17987,22 +19239,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -18093,11 +19343,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -18139,11 +19388,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -18152,11 +19400,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -18301,11 +19548,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -18358,22 +19604,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18534,22 +19778,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -18589,22 +19831,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18629,22 +19869,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18658,22 +19896,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18686,11 +19922,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -18715,22 +19950,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18744,22 +19977,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18772,11 +20003,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -18830,44 +20060,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18881,44 +20107,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18969,22 +20191,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -19063,22 +20283,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -19165,22 +20383,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -19251,33 +20467,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -19290,33 +20503,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -19377,22 +20587,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -19472,22 +20680,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19500,22 +20706,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19601,6 +20805,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -19963,13 +21302,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -20186,6 +21697,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20307,11 +21826,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-platformer/assets/CoinPickUp.wav b/examples/starting-platformer/assets/CoinPickUp.wav new file mode 100644 index 000000000..0509182e6 Binary files /dev/null and b/examples/starting-platformer/assets/CoinPickUp.wav differ diff --git a/examples/starting-platformer/assets/PickupCoin.wav b/examples/starting-platformer/assets/PickupCoin.wav deleted file mode 100644 index baf5f0edb..000000000 Binary files a/examples/starting-platformer/assets/PickupCoin.wav and /dev/null differ diff --git a/examples/starting-platformer/starting-platformer.json b/examples/starting-platformer/starting-platformer.json index 892b367d2..b1a37bb84 100644 --- a/examples/starting-platformer/starting-platformer.json +++ b/examples/starting-platformer/starting-platformer.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -160,17 +160,16 @@ } }, { - "file": "assets/PickupCoin.wav", + "file": "assets/CoinPickUp.wav", "kind": "audio", - "metadata": "{\"extension\":\".wav\",\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.05,\\\"sustainPunch\\\":20,\\\"decay\\\":0.3,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":400,\\\"frequencySweep\\\":0,\\\"frequencyDeltaSweep\\\":0,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":15,\\\"frequencyJump1Amount\\\":25,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"whistle\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":85,\\\"squareDutySweep\\\":35,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"PickupCoin\"},\"localFilePath\":\"assets/PickupCoin.wav\"}", - "name": "PickupCoin", + "metadata": "", + "name": "assets/CoinPickUp.wav", "preloadAsMusic": false, "preloadAsSound": true, "preloadInCache": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -194,14 +193,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6040838749988914, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -865,10 +867,10 @@ }, "parameters": [ "", - "PickupCoin", + "assets/CoinPickUp.wav", "", "80", - "RandomFloatInRange(1,1.1)" + "RandomFloatInRange(0.75,1)" ] } ] @@ -879,6 +881,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -896,6 +899,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -924,6 +928,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1003,15 +1008,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1043,17 +1049,23 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -1082,11 +1094,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1095,11 +1106,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1133,12 +1143,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -1148,11 +1158,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -1169,12 +1180,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -1197,12 +1208,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -1212,11 +1223,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -1235,12 +1245,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -1272,11 +1282,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -1306,23 +1315,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -1338,22 +1346,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1364,11 +1370,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1383,11 +1388,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -1416,20 +1420,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1438,11 +1442,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1454,20 +1457,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1476,11 +1479,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1493,20 +1495,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1515,11 +1517,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -1531,20 +1532,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -1553,11 +1554,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1592,11 +1592,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -1608,11 +1607,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1621,11 +1619,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1638,11 +1635,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -1650,11 +1646,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1663,11 +1658,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1750,22 +1744,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -1800,11 +1792,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -1849,11 +1840,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -1898,11 +1888,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1947,11 +1936,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -1973,11 +1961,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2022,11 +2009,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2071,11 +2057,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2149,6 +2134,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2216,13 +2236,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2344,11 +2389,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -2383,11 +2427,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -2422,11 +2465,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -2520,6 +2562,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -2529,11 +2572,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", "Value" ] @@ -2601,6 +2643,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -2610,11 +2653,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", "Value" ] @@ -2682,6 +2724,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -2691,11 +2734,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", "Value" ] @@ -2719,6 +2761,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -2763,13 +2839,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2973,6 +3076,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -2982,11 +3086,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", "Value" ] @@ -3054,6 +3157,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3063,11 +3167,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", "Value" ] @@ -3135,6 +3238,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3144,11 +3248,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", "Value" ] @@ -3172,6 +3275,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3216,13 +3353,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3236,11 +3400,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "IdleValue" ] @@ -3293,11 +3456,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -3306,11 +3468,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -3349,11 +3510,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -3362,11 +3522,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -3389,11 +3548,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -3402,11 +3560,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -3441,11 +3598,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -3454,11 +3610,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -3493,11 +3648,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -3523,11 +3677,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -3550,6 +3703,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -3620,44 +3870,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -3698,44 +3944,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -3775,11 +4017,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", "Duration" ] @@ -3788,22 +4029,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] @@ -3815,11 +4054,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", "Duration" ] @@ -3828,22 +4066,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "TweenTargetedValue" ] @@ -3992,24 +4228,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "Value" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "Value" + "NewPropertyName" ] } ] @@ -4029,12 +4263,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -4085,6 +4319,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4094,11 +4329,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", "Value" ] @@ -4166,6 +4400,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4175,11 +4410,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", "Value" ] @@ -4247,6 +4481,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4256,11 +4491,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", "Value" ] @@ -4329,6 +4563,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -4338,11 +4573,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -4411,6 +4645,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -4420,11 +4655,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -4492,6 +4726,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -4501,11 +4736,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -4573,6 +4807,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -4582,11 +4817,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -4610,6 +4844,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4966,6 +5279,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5037,13 +5357,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5114,11 +5510,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -5127,11 +5522,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -5170,11 +5564,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -5183,11 +5576,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5210,11 +5602,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5223,11 +5614,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5262,11 +5652,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -5275,11 +5664,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5461,6 +5849,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -5470,11 +5859,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", "Value" ] @@ -5542,6 +5930,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -5551,11 +5940,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", "Value" ] @@ -5623,6 +6011,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -5632,11 +6021,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", "Value" ] @@ -5704,6 +6092,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -5713,11 +6102,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -5785,6 +6173,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -5794,11 +6183,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -5867,6 +6255,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -5876,11 +6265,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -5949,6 +6337,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -5958,11 +6347,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -5986,6 +6374,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6362,13 +6814,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6438,11 +6940,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -6451,11 +6952,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6494,11 +6994,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6507,11 +7006,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6534,11 +7032,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6547,11 +7044,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6586,11 +7082,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -6599,11 +7094,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6787,6 +7281,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -6796,11 +7291,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", "Value" ] @@ -6870,6 +7364,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -6879,11 +7374,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", "Value" ] @@ -6953,6 +7447,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -6962,11 +7457,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", "Value" ] @@ -7036,6 +7530,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7045,11 +7540,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -7119,6 +7613,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7128,11 +7623,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -7203,6 +7697,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7212,11 +7707,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -7287,6 +7781,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7296,11 +7791,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -7325,6 +7819,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7688,7 +8246,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -7696,6 +8298,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -9680,12 +10283,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -10584,6 +11269,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -10664,6 +11350,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -10744,6 +11431,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -10836,24 +11524,94 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "String", - "label": "Joystick name", - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "String", + "label": "Joystick name", + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", "name": "DeadZoneRadius" }, { @@ -10885,13 +11643,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11378,6 +12164,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -11428,13 +12234,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11608,6 +12442,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11650,13 +12492,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11751,6 +12617,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11793,13 +12667,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -11883,6 +12781,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -11925,13 +12831,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -12172,6 +13102,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -12252,6 +13183,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -12332,6 +13264,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -12412,6 +13345,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -12492,6 +13426,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -12572,6 +13507,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -12652,6 +13588,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -12732,6 +13669,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -12812,6 +13750,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -12848,6 +13787,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -12967,13 +13991,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13086,6 +14179,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13145,13 +14246,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13658,6 +14786,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13713,22 +14849,46 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -13807,6 +14967,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -13833,6 +14994,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -14787,6 +15949,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -14859,6 +16022,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -14931,6 +16095,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -14964,6 +16129,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -15042,6 +16286,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -15049,15 +16322,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -15088,12 +16362,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15251,11 +16532,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -15290,11 +16570,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -15352,12 +16633,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -15451,22 +16732,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -15608,22 +16889,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -15801,46 +17082,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -15877,22 +17154,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -15947,11 +17224,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15994,11 +17270,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16044,44 +17319,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -16247,11 +17518,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -16262,22 +17533,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -16297,7 +17570,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -16317,11 +17590,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -16332,22 +17605,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -16367,7 +17642,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -16387,13 +17662,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -16413,7 +17687,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -16433,13 +17707,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -16459,7 +17732,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -16479,13 +17752,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -16505,7 +17777,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -16525,13 +17797,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -16551,7 +17822,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -16571,13 +17842,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16596,8 +17866,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -16617,13 +17887,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16643,7 +17912,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16663,13 +17932,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16689,7 +17957,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16709,13 +17977,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -16735,7 +18002,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -16755,24 +18022,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -16792,7 +18057,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16812,24 +18077,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -16849,7 +18112,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16869,24 +18132,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -16906,7 +18167,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -16926,24 +18187,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -16963,7 +18222,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -17014,6 +18273,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -17023,11 +18283,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -17083,7 +18342,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -17104,7 +18363,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -17155,32 +18414,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -17212,6 +18459,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -17265,13 +18524,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -17291,7 +18549,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -17311,13 +18569,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -17337,7 +18594,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -17607,22 +18864,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -17828,22 +19083,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -17906,11 +19159,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -17954,22 +19206,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -18060,11 +19310,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -18106,11 +19355,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -18119,11 +19367,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -18268,11 +19515,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -18325,22 +19571,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18501,22 +19745,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -18556,22 +19798,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -18596,22 +19836,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18625,22 +19863,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18653,11 +19889,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -18682,22 +19917,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18711,22 +19944,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18739,11 +19970,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -18797,44 +20027,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18848,44 +20074,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18936,22 +20158,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -19030,22 +20250,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -19132,22 +20350,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -19218,33 +20434,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -19257,33 +20470,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -19344,22 +20554,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -19439,22 +20647,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19467,22 +20673,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -19568,6 +20772,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -19930,13 +21269,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -20153,6 +21664,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20274,11 +21793,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json index 41d67b041..3fb9774db 100644 --- a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json +++ b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -170,8 +170,7 @@ "name": "8BitOperatorPlus8Regular_Edited.fnt" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -195,14 +194,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5468750000000111, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -220,6 +222,7 @@ "variables": [ { "name": "SceneScaling", + "persistentUuid": "3c812502-8393-4d83-9ff8-57ed7c1b9330", "type": "number", "value": 0.75 } @@ -1206,6 +1209,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1223,6 +1227,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1251,6 +1256,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1310,6 +1316,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3294,12 +3301,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4198,6 +4287,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4278,6 +4368,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4358,6 +4449,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4450,6 +4542,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4499,13 +4661,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4992,6 +5182,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5042,13 +5252,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5222,6 +5460,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5264,13 +5510,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5365,6 +5635,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5407,13 +5685,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5497,6 +5799,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5539,13 +5849,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5786,6 +6120,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5866,6 +6201,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5946,6 +6282,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6026,6 +6363,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6106,6 +6444,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6186,6 +6525,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6266,6 +6606,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6346,6 +6687,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6426,6 +6768,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6462,31 +6805,116 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D capability", - "extraInformation": [ - "Scene3D::Base3DBehavior" - ], - "choices": [], - "name": "Object3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Secondary", - "type": "Choice", - "label": "Camera joystick", - "group": "Controls", - "choices": [ - { - "label": "Primary", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", "value": "Primary" }, { @@ -6581,13 +7009,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6700,6 +7197,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6759,13 +7264,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7272,6 +7804,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7327,7 +7867,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7341,8 +7902,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7421,6 +7985,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7447,6 +8012,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8401,6 +8967,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8473,6 +9040,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8545,6 +9113,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8578,6 +9147,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8656,6 +9304,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8663,6 +9340,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -8671,7 +9349,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -8703,12 +9381,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -9782,6 +10466,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -9849,13 +10568,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10150,6 +10894,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -10230,6 +10975,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -10310,6 +11056,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -10346,6 +11093,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10390,13 +11171,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -10600,6 +11408,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -10680,6 +11489,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -10760,6 +11570,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -10796,6 +11607,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10840,13 +11685,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -11163,6 +12035,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -11682,6 +12651,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -11762,6 +12732,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -11842,6 +12813,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -11923,6 +12895,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -12004,6 +12977,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -12084,6 +13058,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -12164,6 +13139,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -12200,43 +13176,122 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button states", - "extraInformation": [ - "ButtonStates::ButtonFSM" - ], - "choices": [], - "name": "ButtonFSM" - }, - { - "value": "", - "type": "Behavior", - "label": "Effect capability", - "extraInformation": [ - "EffectCapability::EffectBehavior" - ], - "choices": [], - "name": "Effect" - }, - { - "value": "Effect", - "type": "String", - "label": "Effect name", - "group": "Effect", - "name": "EffectName" - }, - { - "value": "", - "type": "String", - "label": "Effect parameter", - "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", - "group": "Effect", - "name": "EffectProperty" - }, - { + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "choices": [], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { "value": "0", "type": "Number", "label": "Idle effect parameter value", @@ -12556,6 +13611,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -12627,13 +13689,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -13043,6 +14181,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -13123,6 +14262,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -13203,6 +14343,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -13283,6 +14424,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -13363,6 +14505,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -13444,6 +14587,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -13525,6 +14669,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -13561,6 +14706,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13937,13 +15146,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -14354,6 +15613,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -14436,6 +15696,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -14518,6 +15779,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -14600,6 +15862,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -14682,6 +15945,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -14765,6 +16029,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -14848,6 +16113,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -14885,23 +16151,87 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button states", - "extraInformation": [ - "ButtonStates::ButtonFSM" - ], - "choices": [], - "name": "ButtonFSM" - }, - { - "value": "", - "type": "Behavior", - "label": "Tween", - "extraInformation": [ - "Tween::TweenBehavior" + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween", + "extraInformation": [ + "Tween::TweenBehavior" ], "choices": [], "name": "Tween" @@ -15248,14 +16578,59 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] }, { "author": "", - "category": "Input", + "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Two choices dialog boxes", "gdevelopVersion": ">=5.5.230", @@ -15263,11 +16638,13 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIxMSIgeDI9IjI5IiB5Mj0iMTEiLz4NCjxnPg0KCTxwYXRoIGQ9Ik03LDlDNi43LDksNi41LDguOSw2LjMsOC43QzYuMSw4LjUsNiw4LjMsNiw4YzAtMC4zLDAuMS0wLjUsMC4zLTAuN2MwLDAsMC4xLTAuMSwwLjEtMC4xYzAuMSwwLDAuMS0wLjEsMC4yLTAuMQ0KCQlDNi43LDcsNi43LDcsNi44LDdjMC4xLDAsMC4zLDAsMC40LDBjMC4xLDAsMC4xLDAsMC4yLDAuMWMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMCwwLDAuMSwwLjEsMC4xLDAuMWMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuMw0KCQlDOCw3LjcsOCw3LjksOCw4YzAsMC4xLDAsMC4zLTAuMSwwLjRDNy45LDguNSw3LjgsOC42LDcuNyw4LjdDNy41LDguOSw3LjMsOSw3LDl6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsOUM5LjcsOSw5LjUsOC45LDkuMyw4LjdDOS4xLDguNSw5LDguMyw5LDhjMC0wLjEsMC0wLjMsMC4xLTAuNGMwLjEtMC4xLDAuMS0wLjIsMC4yLTAuM2MwLjEtMC4xLDAuMi0wLjIsMC4zLTAuMg0KCQlDMTAsNi45LDEwLjQsNywxMC43LDcuM2MwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxMSw3LjcsMTEsNy45LDExLDhjMCwwLjMtMC4xLDAuNS0wLjMsMC43QzEwLjUsOC45LDEwLjMsOSwxMCw5eiIvPg0KPC9nPg0KPGc+DQoJPHBhdGggZD0iTTEzLDljLTAuMSwwLTAuMywwLTAuNC0wLjFjLTAuMS0wLjEtMC4yLTAuMS0wLjMtMC4yYy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM0MxMiw4LjMsMTIsOC4xLDEyLDhjMC0wLjEsMC0wLjMsMC4xLTAuNA0KCQljMC4xLTAuMSwwLjEtMC4yLDAuMi0wLjNjMC40LTAuNCwxLTAuNCwxLjQsMGMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxNCw3LjcsMTQsNy45LDE0LDhjMCwwLjEsMCwwLjMtMC4xLDAuNA0KCQljLTAuMSwwLjEtMC4xLDAuMi0wLjIsMC4zQzEzLjUsOC45LDEzLjMsOSwxMyw5eiIvPg0KPC9nPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDVINUMzLjksNSwzLDUuOSwzLDd2MThjMCwxLjEsMC45LDIsMiwyaDIyYzEuMSwwLDItMC45LDItMlY3QzI5LDUuOSwyOC4xLDUsMjcsNXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMywyM0g5Yy0xLjEsMC0yLTAuOS0yLTJ2LTRjMC0xLjEsMC45LTIsMi0yaDE0YzEuMSwwLDIsMC45LDIsMnY0QzI1LDIyLjEsMjQuMSwyMywyMywyM3oiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE1LDE5IDE2LDIwIDE4LDE4ICIvPg0KPC9zdmc+DQo=", "name": "TwoChoicesDialogBoxes", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", - "shortDescription": "A dialog box with buttons to let users make a choice.", - "version": "0.3.0", + "shortDescription": "Two-choice dialog box with keyboard, gamepad, and touch support. Customizable text.", + "version": "0.3.2", "description": [ "A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.", - "It handles keyboard, gamepad and touch controls." + "It handles keyboard, gamepad and touch controls.", + "", + "There are ready-to-use dialog boxes in the asset-store [dialog boxes pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=dialog-boxes-dialog-boxes)." ], "origin": { "identifier": "TwoChoicesDialogBoxes", @@ -15287,7 +16664,38 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -15297,13 +16705,17 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "dialog boxes", "defaultName": "", "description": "A dialog box showing two options.", "fullName": "Two choices dialog box ", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "TwoChoicesDialogBox", + "previewIconUrl": "", "objects": [ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", @@ -15495,6 +16907,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -15709,287 +17122,305 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Buttons", - "" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlaySound" + "inverted": true, + "value": "TwoChoicesDialogBoxes::IsInGameEdition" }, "parameters": [ "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - }, - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "Buttons.ID", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, "parameters": [ - "", - "NumpadLeft" + "Buttons", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" }, "parameters": [ "", - "Left" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "1", - "\"Left\"", + "Object", + "=", + "Buttons.ID", "" ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadLeft" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Left\"", + "" + ] + } + ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "-", "1", - "\"Left\"", - "\"Left\"", "" ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "-", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "", - "NumpadRight" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadRight" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } ] }, { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "", - "Right" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "+", "1", - "\"Right\"", "" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "\"Right\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "+", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "EnableEscape", - "True", - "" - ] + "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Escape" + "EnableEscape", + "True", + "" ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Escape" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "=", "1", - "\"B\"", "" ] } ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "1", - "" - ] } ] } @@ -16026,6 +17457,28 @@ "=", "TextMessage" ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "YesButton", + "=", + "LabelButtonID0", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "NoButton", + "=", + "LabelButtonID1", + "" + ] } ] } @@ -16353,6 +17806,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ActiveButtonById", + "group": "Dialog Box configuration", "name": "SetActiveButtonById", "private": true, "sentence": "", @@ -16483,6 +17937,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TextMessage", + "group": "Dialog Box configuration", "name": "SetTextMessage", "private": true, "sentence": "", @@ -16526,24 +17981,61 @@ "objectGroups": [] } ], - "propertyDescriptors": [ - { - "value": "Default message. Continue?", - "type": "MultilineString", - "label": "Message", - "name": "TextMessage" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "HighlightedButtonIndex" - }, - { - "value": "true", - "type": "Boolean", + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "IsYesClicked" + }, + { + "functionName": "IsNoClicked" + }, + { + "folderName": "Dialog Box configuration", + "children": [ + { + "functionName": "ActiveButtonById" + }, + { + "functionName": "SetActiveButtonById" + }, + { + "functionName": "TextMessage" + }, + { + "functionName": "SetTextMessage" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "Default message. Continue?", + "type": "MultilineString", + "label": "Message", + "name": "TextMessage" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "HighlightedButtonIndex" + }, + { + "value": "true", + "type": "Boolean", "label": "Cancel with Escape key", "description": "Enable or disable the escape key to close the dialog.", "name": "EnableEscape" @@ -16582,8 +18074,44 @@ ], "hidden": true, "name": "_PropertyMapping" + }, + { + "value": "", + "type": "Resource", + "label": "Sound at hovering", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "HoveredSound" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TextMessage" + }, + { + "propertyName": "HighlightedButtonIndex" + }, + { + "propertyName": "EnableEscape" + }, + { + "propertyName": "LabelButtonID0" + }, + { + "propertyName": "LabelButtonID1" + }, + { + "propertyName": "_PropertyMapping" + }, + { + "propertyName": "HoveredSound" + } + ] + }, "variants": [ { "areaMaxX": 600, @@ -16784,6 +18312,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -17075,6 +18604,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -17182,15 +18712,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", - "fullName": "Panel sprite button", + "fullName": "Labeled button", "gdevelopVersion": ">=5.5.230", "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": "2.1.1", + "shortDescription": "Resizeable button with a label.", + "version": "2.2.0", "description": [ "A button that can be used for menus and most labelled buttons of a game. 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.", "", @@ -17240,12 +18771,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -18340,6 +19882,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -18407,127 +19984,1145 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 256, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "PanelSpriteButton", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Text", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Text", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "center", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" } - }, + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" + }, + { + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "String", + "label": "Idle text", + "hidden": true, + "name": "IdleText" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverPrefix" + }, + { + "propertyName": "HoverSuffix" + }, + { + "propertyName": "IdleText" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + } + ] + } + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "menu buttons", + "defaultName": "Button", + "description": "Button with a label.", + "fullName": "Labeled button", + "helpPath": "", + "iconUrl": "", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, "type": "PanelSpriteObject::PanelSprite", "width": 32, "variables": [], @@ -18592,6 +21187,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -18659,6 +21264,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -18718,7 +21324,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -18971,6 +21593,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19118,12 +21762,34 @@ }, { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" }, - "parameters": [] - } - ], - "actions": [ + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19159,26 +21825,45 @@ "parameters": [ "Pressed" ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, + } + ], + "events": [ { - "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" - }, - "parameters": [ - "Hovered", - "Opacity", - "=", - "255" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } ] } ] @@ -19203,6 +21888,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19261,6 +21968,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -19841,6 +22570,56 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -19869,6 +22648,7 @@ "type": "Number", "unit": "Pixel", "label": "", + "group": "States", "hidden": true, "name": "LabelOffset" }, @@ -19890,6 +22670,31 @@ "name": "_PropertyMapping" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "LabelText" + }, + { + "propertyName": "_PropertyMapping" + }, + { + "folderName": "States", + "children": [ + { + "propertyName": "HoveredFadeOutDuration" + }, + { + "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" + } + ] + } + ] + }, "variants": [ { "areaMaxX": 256, @@ -19920,6 +22725,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -20067,6 +22883,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -20134,6 +22960,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20226,6 +23053,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -20373,6 +23211,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -20440,6 +23288,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20508,6 +23357,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -20515,8 +23365,8 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", - "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.8.1", + "shortDescription": "Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.", + "version": "0.9.1", "description": [ "Add support for gamepads (or other physical controllers).", "", @@ -20548,7 +23398,8 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], @@ -20607,83 +23458,343 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", + " }\r", + "\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", + " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", + "\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function addFrameBeginningTaskIfNeeded(runtimeScene) {\r", + " const taskManager = runtimeScene.getAsyncTasksManager();\r", + " for (const taskWithCallback of taskManager.tasksWithCallback) {\r", + " if (taskWithCallback.asyncTask === frameBeginningTask) {\r", + " return;\r", + " }\r", + " }\r", + " // Async tasks are run before everything.\r", + " // This is a hack to make sure that button states are updated\r", + " // before mapping behavior events.\r", + " taskManager.addTask(frameBeginningTask);\r", + "}\r", + "\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function onScenePostEvents(runtimeScene) {\r", + " addFrameBeginningTaskIfNeeded(runtimeScene);\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", + "}\r", + "\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", " }\r", + "}\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -20692,44 +23803,53 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " v = v - Math.sign(v) * DEADZONE;\r", - "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + " addFrameBeginningTaskIfNeeded,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -20742,59 +23862,30 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "inlineCode": "gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "gdjs._extensionController.onScenePostEvents(runtimeScene);", "" ], "parameterObjects": "", @@ -21232,27 +24323,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -21280,12 +24364,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -21302,43 +24386,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", - "\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -21351,12 +24420,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -21380,7 +24449,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -21392,12 +24461,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -21414,40 +24483,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -21460,12 +24516,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -21483,18 +24539,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -21503,11 +24552,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -21604,7 +24654,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -21632,26 +24682,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -21689,26 +24733,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 3 : 1;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -21746,136 +24784,57 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed 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 just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -21885,12 +24844,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -21907,17 +24866,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -21930,7 +24881,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -21946,46 +24897,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -21996,7 +24911,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22012,35 +24927,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -22053,7 +24951,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22062,176 +24960,61 @@ "supplementaryInformation": "[\"Xbox\",\"PS4\"]", "type": "stringWithSelector" } - ], - "objectGroups": [] - }, - { - "description": "Return the number of gamepads.", - "fullName": "Gamepad count", - "functionType": "Expression", - "name": "GamepadCount", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", - "}\r", - "" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": true - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [], - "objectGroups": [] - }, - { - "description": "Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", - "fullName": "Gamepad button pressed", - "functionType": "Condition", - "name": "C_Button_pressed", - "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", + ], + "objectGroups": [] + }, + { + "description": "Return the number of gamepads.", + "fullName": "Gamepad count", + "functionType": "Expression", + "name": "GamepadCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button pressed", + "functionType": "Condition", + "name": "C_Button_pressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -22242,7 +25025,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22269,15 +25052,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -22290,7 +25067,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22306,18 +25083,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -22328,7 +25099,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22349,141 +25120,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -22494,7 +25152,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22514,24 +25172,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -22555,22 +25213,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -22585,7 +25234,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22601,28 +25250,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -22637,7 +25272,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22658,17 +25293,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -22681,7 +25308,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22697,25 +25324,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -22732,7 +25350,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22753,35 +25371,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -22789,11 +25391,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -22803,7 +25405,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22834,39 +25436,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -22875,8 +25460,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -22886,7 +25471,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -22917,54 +25502,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", - "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -22974,7 +25515,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -22990,8 +25531,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23004,7 +25545,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -23020,8 +25561,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -23031,22 +25572,123 @@ "expressionType": { "type": "expression" }, - "parameters": [ - { - "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", - "type": "expression" - } - ], - "objectGroups": [] - } - ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23530,6 +26172,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23610,13 +26260,43 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23729,6 +26409,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23805,13 +26493,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23913,6 +26625,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24006,13 +26726,40 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "WalkStick" + }, + { + "propertyName": "CameraStick" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -24253,6 +27000,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -24333,6 +27081,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -24413,6 +27162,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -24493,6 +27243,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -24573,6 +27324,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -24653,6 +27405,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -24733,6 +27486,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -24813,6 +27567,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -24893,6 +27648,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -24929,6 +27685,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25047,13 +27888,77 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "propertyName": "CameraStick" + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -25337,6 +28242,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25417,13 +28330,43 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26001,6 +28944,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -26061,11 +29012,38 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json b/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json index ac0995db4..22c71c6f2 100644 --- a/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json +++ b/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -123,8 +123,7 @@ "smoothed": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -148,14 +147,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.4, "snap": false, - "zoomFactor": 1.0615714305220039, + "zoomFactor": 1.1726229638177708, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -271,6 +273,7 @@ { "assetStoreId": "", "name": "Ground_Tilemap", + "persistentUuid": "a22b4d9c-555c-428f-aace-67da8acce220", "type": "TileMap::SimpleTileMap", "variables": [], "effects": [], @@ -535,6 +538,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -599,4 +603,4 @@ "externalEvents": [], "eventsFunctionsExtensions": [], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-point-and-click/starting-point-and-click.json b/examples/starting-point-and-click/starting-point-and-click.json index 3e413a57d..8ce06067b 100644 --- a/examples/starting-point-and-click/starting-point-and-click.json +++ b/examples/starting-point-and-click/starting-point-and-click.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -123,8 +123,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -148,14 +147,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.4, "snap": false, - "zoomFactor": 0.5653158055126322, + "zoomFactor": 0.5843784410740942, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -509,6 +511,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -573,4 +576,4 @@ "externalEvents": [], "eventsFunctionsExtensions": [], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-quiz/starting-quiz.json b/examples/starting-quiz/starting-quiz.json index 1d1e51ab4..58c3ea867 100644 --- a/examples/starting-quiz/starting-quiz.json +++ b/examples/starting-quiz/starting-quiz.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -138,8 +138,7 @@ "preloadInCache": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -163,14 +162,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5468750000000044, + "zoomFactor": 0.5843784410740974, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -194,83 +196,100 @@ "variables": [ { "name": "NextQuestion", + "persistentUuid": "15cbb681-cefa-4438-97a0-c897bdf9b858", "type": "boolean", "value": true }, { "name": "QuestionNumber", + "persistentUuid": "2d6e4028-e1e0-4c0e-b38f-a7246036f3bc", "type": "number", "value": 0 }, { "name": "QuestionList", + "persistentUuid": "56d38f61-5423-45eb-a868-44befe09bdd1", "type": "array", "children": [ { + "persistentUuid": "2b5f2a47-3dcd-40b8-bc2c-c2bea3094fad", "type": "structure", "children": [ { "name": "Answer1", + "persistentUuid": "0f9e5073-efb0-4cb1-b985-51315644ed5d", "type": "string", "value": "Yes!" }, { "name": "Answer2", + "persistentUuid": "d2db57c2-a9b8-4fbd-b301-6aaca078a1f8", "type": "string", "value": "No" }, { "name": "Answer3", + "persistentUuid": "b96aada7-a992-494d-ab0e-2d54ac009f58", "type": "string", "value": "Maybe" }, { "name": "Answer4", + "persistentUuid": "22b36bc9-9feb-45b3-be2c-6f5e587b1957", "type": "string", "value": "Almost" }, { "name": "CorrectAnswer", + "persistentUuid": "f4d02f87-53d4-4fe0-86cf-0347e7aedba5", "type": "string", "value": "Answer1" }, { "name": "Question", + "persistentUuid": "48994b87-77fd-4c2b-ac2f-93a3b7a5ca42", "type": "string", "value": "Are you ready?" } ] }, { + "persistentUuid": "f0c9cc18-73a2-4d6a-b5e8-fbb6b42089b0", "type": "structure", "children": [ { "name": "Answer1", + "persistentUuid": "08d13fd1-559c-4657-96b4-bd9d4946c609", "type": "string", "value": "Wrong" }, { "name": "Answer2", + "persistentUuid": "9a30d980-bea6-4db2-97ab-267dc72a7430", "type": "string", "value": "Wrong" }, { "name": "Answer3", + "persistentUuid": "24dba176-2212-479d-92fc-f5e52396d654", "type": "string", "value": "Wrong" }, { "name": "Answer4", + "persistentUuid": "e6a7e89a-cbc8-450d-802a-c49c1aaebcc8", "type": "string", "value": "Right" }, { "name": "CorrectAnswer", + "persistentUuid": "6b716a1c-9ab4-4111-a42f-982e9165dfec", "type": "string", "value": "Answer4" }, { "name": "Question", + "persistentUuid": "ed593966-534e-4fb1-93c4-5ddcaf324ec8", "type": "string", "value": "Insert question here" } @@ -1145,6 +1164,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1162,6 +1182,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1228,6 +1249,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1236,7 +1258,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1268,12 +1290,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2347,6 +2375,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2414,13 +2477,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2715,6 +2803,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -2795,6 +2884,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -2875,6 +2965,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -2911,6 +3002,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -2955,13 +3080,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3165,6 +3317,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3245,6 +3398,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3325,6 +3479,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3361,6 +3516,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3405,13 +3594,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3728,6 +3944,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -4247,6 +4560,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4327,6 +4641,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4407,6 +4722,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4488,6 +4804,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -4569,6 +4886,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -4649,6 +4967,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -4729,6 +5048,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -4765,6 +5085,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5121,6 +5520,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5192,13 +5598,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5608,6 +6090,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -5688,6 +6171,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -5768,6 +6252,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -5848,6 +6333,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -5928,6 +6414,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6009,6 +6496,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6090,6 +6578,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6126,6 +6615,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6502,13 +7055,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6919,6 +7522,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -7001,6 +7605,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -7083,6 +7688,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -7165,6 +7771,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7247,6 +7854,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7330,6 +7938,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7413,6 +8022,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7450,6 +8060,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7813,11 +8487,55 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-rts-unit-selection/starting-rts-unit-selection.json b/examples/starting-rts-unit-selection/starting-rts-unit-selection.json index 0b531934a..56e645f87 100644 --- a/examples/starting-rts-unit-selection/starting-rts-unit-selection.json +++ b/examples/starting-rts-unit-selection/starting-rts-unit-selection.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -131,8 +131,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -156,14 +155,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6244537826600122, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -1046,6 +1048,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1112,6 +1115,7 @@ { "author": "Slash, Tristan Rhodes, @VictrisGames", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "RTS-like unit selection", "gdevelopVersion": ">=5.5.222", @@ -5537,9 +5541,50 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "RTSUnitSelection" + }, + { + "functionName": "IsPreSelected" + }, + { + "functionName": "IsSelected" + }, + { + "functionName": "SetPreSelected" + }, + { + "functionName": "SetSelected" + }, + { + "functionName": "AssignUnitID" + }, + { + "functionName": "TotalSelectedUnits" + }, + { + "functionName": "RTSControlGroups" + }, + { + "functionName": "ControlGroupID" + }, + { + "functionName": "IsAssignedToControlGroup" + }, + { + "functionName": "AssignControlGroup" + }, + { + "functionName": "SelectedUnitID" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-shootemup/starting-shootemup.json b/examples/starting-shootemup/starting-shootemup.json index 06b2922f9..da50d5aef 100644 --- a/examples/starting-shootemup/starting-shootemup.json +++ b/examples/starting-shootemup/starting-shootemup.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -163,8 +163,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -188,14 +187,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.4950840073748919, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -1057,6 +1059,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1074,6 +1077,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1102,6 +1106,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1161,6 +1166,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3145,12 +3151,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4049,6 +4137,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4129,6 +4218,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4209,6 +4299,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4301,6 +4392,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4350,13 +4511,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4843,6 +5032,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4893,13 +5102,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5073,6 +5310,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5115,13 +5360,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5216,6 +5485,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5258,13 +5535,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5348,6 +5649,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5390,13 +5699,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5637,6 +5970,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5717,6 +6051,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5797,6 +6132,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5877,6 +6213,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -5957,6 +6294,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6037,6 +6375,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6117,6 +6456,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6197,6 +6537,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6277,6 +6618,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6313,6 +6655,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6432,27 +6859,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -6551,6 +7047,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6610,13 +7114,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7123,6 +7654,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7178,7 +7717,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7192,8 +7752,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7272,6 +7835,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7298,6 +7862,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8252,6 +8817,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8324,6 +8890,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8396,6 +8963,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8429,6 +8997,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8507,6 +9154,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8514,15 +9190,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -8565,13 +9242,124 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -9943,6 +10731,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -10076,6 +10865,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -10209,6 +10999,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -10342,6 +11133,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -10692,6 +11484,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -10825,6 +11618,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -10958,6 +11752,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -11091,6 +11886,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -11224,6 +12020,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -11357,6 +12154,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -11637,6 +12435,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -11871,6 +12670,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -12004,6 +12804,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -13241,55 +14042,348 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0.1", - "type": "Number", - "unit": "Second", - "label": "Firing cooldown", - "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], - "name": "FireCooldown" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HasJustFired" - }, - { - "value": "true", - "type": "Boolean", - "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "name": "RotateBullet" - }, - { - "value": "45", - "type": "Number", - "unit": "DegreeAngle", - "label": "Firing arc", - "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", - "group": "Multi-Fire", - "extraInformation": [], - "name": "FiringArc" }, { - "value": "1", - "type": "Number", + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Firing cooldown", + "description": "Objects cannot shoot while firing cooldown is active.", + "name": "FireCooldown" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasJustFired" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "name": "RotateBullet" + }, + { + "value": "45", + "type": "Number", + "unit": "DegreeAngle", + "label": "Firing arc", + "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", + "group": "Multi-Fire", + "name": "FiringArc" + }, + { + "value": "1", + "type": "Number", "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -13299,7 +14393,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -13310,7 +14403,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -13318,9 +14410,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -13330,7 +14419,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -13341,7 +14429,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -13349,9 +14436,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -13359,9 +14444,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -13370,8 +14452,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -13379,9 +14459,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -13389,9 +14466,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -13399,9 +14474,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -13409,9 +14481,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -13419,9 +14489,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -13431,7 +14498,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -13439,9 +14505,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -13449,9 +14512,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -13462,7 +14523,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -13470,9 +14530,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -13486,6 +14544,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -13495,7 +14554,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -13503,18 +14561,681 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "", + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-tile-placement/starting-tile-placement.json b/examples/starting-tile-placement/starting-tile-placement.json index 814d7322f..c0e78ce97 100644 --- a/examples/starting-tile-placement/starting-tile-placement.json +++ b/examples/starting-tile-placement/starting-tile-placement.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -147,8 +147,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -172,14 +171,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5468750000000044, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -1215,6 +1217,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1243,6 +1246,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1302,6 +1306,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -1310,7 +1315,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -1342,12 +1347,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2421,6 +2432,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -2488,13 +2534,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -2789,6 +2860,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -2869,6 +2941,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -2949,6 +3022,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -2985,6 +3059,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3029,13 +3137,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3239,6 +3374,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -3319,6 +3455,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -3399,6 +3536,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -3435,6 +3573,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3479,13 +3651,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3802,6 +4001,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -4321,6 +4617,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -4401,6 +4698,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -4481,6 +4779,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -4562,6 +4861,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -4643,6 +4943,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -4723,6 +5024,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -4803,6 +5105,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -4839,6 +5142,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5195,6 +5577,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5266,13 +5655,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5682,6 +6147,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -5762,6 +6228,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -5842,6 +6309,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -5922,6 +6390,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -6002,6 +6471,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -6083,6 +6553,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -6164,6 +6635,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -6200,6 +6672,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6576,13 +7112,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -6993,6 +7579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -7075,6 +7662,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -7157,6 +7745,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -7239,6 +7828,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -7321,6 +7911,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -7404,6 +7995,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -7487,6 +8079,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -7524,6 +8117,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7887,7 +8544,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -7895,6 +8596,7 @@ { "author": "@Lizard-13", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Rectangular 2D grid", "gdevelopVersion": ">=5.5.222", @@ -7996,9 +8698,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SnapObjectToVirtualGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-top-down-farming/starting-top-down-farming.json b/examples/starting-top-down-farming/starting-top-down-farming.json index 4ec6848bc..557aa8533 100644 --- a/examples/starting-top-down-farming/starting-top-down-farming.json +++ b/examples/starting-top-down-farming/starting-top-down-farming.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -240,7 +240,7 @@ "metadata": "", "name": "assets\\Placement thud.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -250,7 +250,7 @@ "metadata": "", "name": "assets\\Digging.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -294,8 +294,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -319,14 +318,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.40575189059438727, + "zoomFactor": 0.43357743047024244, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -375,16 +377,19 @@ "variables": [ { "name": "Inventory", + "persistentUuid": "6f69c938-f2cb-4afb-89df-ad58b87e9ed4", "type": "array", "children": [] }, { "name": "UpdateInventoryDisplay", + "persistentUuid": "e442846c-077c-499c-83b3-19ba44bf8fc1", "type": "boolean", "value": false }, { "name": "SelectedSlot", + "persistentUuid": "698c0c40-d6b2-4c47-9d98-f72ab5f81651", "type": "number", "value": 0 } @@ -4659,6 +4664,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -4687,6 +4693,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -4704,6 +4711,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -4785,6 +4793,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -6769,12 +6778,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -7673,6 +7764,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -7753,6 +7845,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -7833,6 +7926,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -7925,6 +8019,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -7974,13 +8138,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -8467,6 +8659,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8517,13 +8729,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8697,6 +8937,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8739,13 +8987,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8840,6 +9112,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8882,13 +9162,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8972,6 +9276,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9014,13 +9326,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9261,6 +9597,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -9341,6 +9678,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -9421,6 +9759,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -9501,6 +9840,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -9581,6 +9921,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -9661,6 +10002,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -9741,6 +10083,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -9821,6 +10164,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -9901,6 +10245,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -9937,6 +10282,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10056,27 +10486,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -10175,6 +10674,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10234,13 +10741,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -10747,6 +11281,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10802,7 +11344,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -10816,8 +11379,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -10896,6 +11462,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -10922,6 +11489,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -11876,6 +12444,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -11948,6 +12517,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -12020,6 +12590,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -12053,6 +12624,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -12131,6 +12781,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -12138,15 +12817,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -12177,12 +12857,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -12340,11 +13027,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -12379,11 +13065,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -12441,12 +13128,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -12540,22 +13227,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -12697,22 +13384,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -12890,46 +13577,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -12966,22 +13649,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -13036,11 +13719,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -13083,11 +13765,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -13133,44 +13814,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -13336,11 +14013,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -13351,22 +14028,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -13386,7 +14065,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -13406,11 +14085,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -13421,22 +14100,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -13456,7 +14137,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -13476,13 +14157,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -13502,7 +14182,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -13522,13 +14202,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -13548,7 +14227,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -13568,13 +14247,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -13594,7 +14272,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -13614,13 +14292,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -13640,7 +14317,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -13660,13 +14337,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13685,8 +14361,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -13706,13 +14382,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13732,7 +14407,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -13752,13 +14427,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13778,7 +14452,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -13798,13 +14472,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13824,7 +14497,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -13844,24 +14517,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -13881,7 +14552,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13901,24 +14572,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -13938,7 +14607,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13958,24 +14627,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -13995,7 +14662,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -14015,24 +14682,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -14052,7 +14717,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -14103,6 +14768,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -14112,11 +14778,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -14172,7 +14837,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -14193,7 +14858,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -14244,32 +14909,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -14301,6 +14954,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -14354,13 +15019,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -14380,7 +15044,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -14400,13 +15064,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -14426,7 +15089,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -14696,22 +15359,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -14917,22 +15578,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -14995,11 +15654,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -15043,22 +15701,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -15149,11 +15805,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -15195,11 +15850,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -15208,11 +15862,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -15357,11 +16010,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -15414,22 +16066,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -15590,22 +16240,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -15645,22 +16293,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -15685,22 +16331,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15714,22 +16358,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -15742,11 +16384,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -15771,22 +16412,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15800,22 +16439,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -15828,11 +16465,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -15886,44 +16522,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15937,44 +16569,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16025,22 +16653,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -16119,22 +16745,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -16221,22 +16845,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -16307,33 +16929,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -16346,33 +16965,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -16433,22 +17049,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -16528,22 +17142,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -16556,22 +17168,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -16657,6 +17267,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -17019,13 +17764,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -17242,6 +18159,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -17363,7 +18288,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -17371,6 +18360,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Top-down movement animator", "gdevelopVersion": ">=5.5.222", @@ -17397,12 +18387,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Change the animation according to the movement direction.", "fullName": "Top-down movement animator", + "helpPath": "", + "iconUrl": "", "name": "TopDownMovementAnimator", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -18596,6 +19592,59 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onActivate" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "UpdateAnimation" + }, + { + "functionName": "AnimationName" + }, + { + "functionName": "SetAnimationName" + }, + { + "functionName": "IsPausingAnimation" + }, + { + "functionName": "SetIsPausingAnimation" + }, + { + "functionName": "IsScalingAnimation" + }, + { + "functionName": "SetIsScalingAnimation" + }, + { + "functionName": "UpdateAnimationSpeedScale" + }, + { + "functionName": "UpdateAnimationPause" + }, + { + "functionName": "Direction" + }, + { + "functionName": "DirectionDifference" + }, + { + "functionName": "UpdateAnimationDirection" + }, + { + "functionName": "UpdateAnimationName" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -18665,6 +19714,45 @@ "name": "AnimationDirection" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "TopDownMovement" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IsScalingAnimation" + }, + { + "propertyName": "IsPausingAnimation" + }, + { + "propertyName": "AnimationName" + } + ] + }, + { + "folderName": "Direction", + "children": [ + { + "propertyName": "DirectionCount" + }, + { + "propertyName": "AngleOffset" + } + ] + }, + { + "propertyName": "AnimationDirection" + } + ] + }, "sharedPropertyDescriptors": [ { "value": "0", @@ -18680,7 +19768,18 @@ "hidden": true, "name": "AnimationFrame" } - ] + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "NewAnimationDirection" + }, + { + "propertyName": "AnimationFrame" + } + ] + } } ], "eventsBasedObjects": [] @@ -18688,6 +19787,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -18696,7 +19796,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -18728,12 +19828,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -19807,6 +20913,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -19874,13 +21015,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -20175,6 +21341,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -20255,6 +21422,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -20335,6 +21503,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -20371,6 +21540,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20415,13 +21618,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -20625,6 +21855,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -20705,6 +21936,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -20785,6 +22017,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -20821,6 +22054,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20865,13 +22132,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -21173,15 +22467,112 @@ ], "actions": [ { - "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" - }, - "parameters": [ - "Object", - "Behavior", - "FadeOutDuration", - "FadeOutEasing", - "" + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } ] } ] @@ -21707,6 +23098,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -21787,6 +23179,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -21867,6 +23260,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -21948,6 +23342,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -22029,6 +23424,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -22109,6 +23505,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -22189,6 +23586,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -22225,6 +23623,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22581,6 +24058,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -22652,13 +24136,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -23068,6 +24628,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -23148,6 +24709,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -23228,6 +24790,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -23308,6 +24871,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -23388,6 +24952,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -23469,6 +25034,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -23550,6 +25116,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -23586,6 +25153,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23962,13 +25593,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -24379,6 +26060,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -24461,6 +26143,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -24543,6 +26226,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -24625,6 +26309,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -24707,6 +26392,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -24790,6 +26476,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -24873,6 +26560,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -24910,6 +26598,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25273,7 +27025,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -25281,6 +27077,7 @@ { "author": "@Lizard-13", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Rectangular 2D grid", "gdevelopVersion": ">=5.5.222", @@ -25382,12 +27179,21 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SnapObjectToVirtualGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "Tristan Rhodes (https://victrisgames.itch.io/)", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "Shake object", "gdevelopVersion": ">=5.5.222", @@ -25428,12 +27234,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Shake objects with translation and rotation.", "fullName": "Shake object (position, angle)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngle", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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. ", @@ -27414,14 +29226,36 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngle" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT" + } }, { "description": "Shake objects with translation, rotation and scale.", "fullName": "Shake object (position, angle, scale)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngleScale", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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.", @@ -29788,6 +31622,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngleScale" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -29800,11 +31651,18 @@ "name": "Scale" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-top-down-pixel/starting-top-down-pixel.json b/examples/starting-top-down-pixel/starting-top-down-pixel.json index 8bf929c0c..22b6e257a 100644 --- a/examples/starting-top-down-pixel/starting-top-down-pixel.json +++ b/examples/starting-top-down-pixel/starting-top-down-pixel.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -147,8 +147,7 @@ "smoothed": false, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -172,14 +171,17 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.1726229638177712, + "zoomFactor": 1.1343715797161023, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -836,6 +838,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -864,6 +867,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -923,6 +927,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -2907,12 +2912,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -3811,6 +3898,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -3891,6 +3979,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -3971,6 +4060,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4063,6 +4153,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4112,13 +4272,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4605,6 +4793,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4655,13 +4863,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4835,6 +5071,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4877,13 +5121,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4978,6 +5246,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5020,13 +5296,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5110,6 +5410,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5152,13 +5460,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5399,6 +5731,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5479,6 +5812,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5559,6 +5893,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5639,6 +5974,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -5719,6 +6055,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -5799,6 +6136,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -5879,6 +6217,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -5959,6 +6298,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6039,6 +6379,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6075,6 +6416,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6194,27 +6620,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -6313,6 +6808,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6372,13 +6875,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6885,6 +7415,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6940,7 +7478,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -6954,8 +7513,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7034,6 +7596,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7060,6 +7623,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8014,6 +8578,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8086,6 +8651,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8158,6 +8724,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8191,6 +8758,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8269,6 +8915,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8276,15 +8951,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8315,12 +8991,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8478,11 +9161,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -8517,11 +9199,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -8579,12 +9262,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -8678,22 +9361,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -8835,22 +9518,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9028,46 +9711,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9104,22 +9783,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9174,11 +9853,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9221,11 +9899,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9271,44 +9948,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -9474,11 +10147,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -9489,22 +10162,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -9524,7 +10199,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -9544,11 +10219,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -9559,22 +10234,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -9594,7 +10271,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -9614,13 +10291,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -9640,7 +10316,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -9660,13 +10336,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -9686,7 +10361,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -9706,13 +10381,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -9732,7 +10406,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -9752,13 +10426,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -9778,7 +10451,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -9798,13 +10471,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9823,8 +10495,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -9844,13 +10516,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9870,7 +10541,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9890,13 +10561,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9916,7 +10586,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9936,13 +10606,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9962,7 +10631,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9982,24 +10651,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10019,7 +10686,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10039,24 +10706,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10076,7 +10741,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10096,24 +10761,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10133,7 +10796,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10153,24 +10816,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10190,7 +10851,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10241,6 +10902,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10250,11 +10912,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10310,7 +10971,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10331,7 +10992,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10382,32 +11043,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -10439,6 +11088,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10492,13 +11153,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -10518,7 +11178,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -10538,13 +11198,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -10564,7 +11223,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -10834,22 +11493,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11055,22 +11712,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11133,11 +11788,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11181,22 +11835,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11287,11 +11939,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11333,11 +11984,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11346,11 +11996,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -11495,11 +12144,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -11552,22 +12200,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11728,22 +12374,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -11783,22 +12427,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11823,22 +12465,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11852,22 +12492,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -11880,11 +12518,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -11909,22 +12546,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11938,22 +12573,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -11966,11 +12599,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12024,44 +12656,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12075,44 +12703,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12163,22 +12787,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12257,22 +12879,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12359,22 +12979,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -12445,33 +13063,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -12484,33 +13099,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -12571,22 +13183,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -12666,22 +13276,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12694,22 +13302,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12795,6 +13401,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13157,13 +13898,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13380,6 +14293,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13501,11 +14422,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-top-down-rpg/starting-top-down-rpg.json b/examples/starting-top-down-rpg/starting-top-down-rpg.json index 54200f180..bffcc49c4 100644 --- a/examples/starting-top-down-rpg/starting-top-down-rpg.json +++ b/examples/starting-top-down-rpg/starting-top-down-rpg.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -210,8 +210,7 @@ "name": "assets\\8BitOperatorPlus8Regular_Edited.fnt", "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -235,14 +234,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5117784035210207, + "zoomFactor": 0.4950840073748919, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -1401,6 +1403,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1429,6 +1432,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1446,6 +1450,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1519,6 +1524,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3503,12 +3509,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4407,6 +4495,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4487,6 +4576,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4567,6 +4657,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4659,6 +4750,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4708,13 +4869,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -5201,6 +5390,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -5251,13 +5460,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5431,6 +5668,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5473,13 +5718,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5574,6 +5843,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5616,13 +5893,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5706,6 +6007,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5748,13 +6057,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5995,6 +6328,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -6075,6 +6409,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -6155,6 +6490,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -6235,6 +6571,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6315,6 +6652,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6395,6 +6733,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6475,6 +6814,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6555,6 +6895,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6635,6 +6976,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6671,6 +7013,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6790,13 +7217,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6909,6 +7405,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6968,13 +7472,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7481,6 +8012,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7536,7 +8075,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7550,8 +8110,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7630,6 +8193,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7656,6 +8220,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8610,6 +9175,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8682,6 +9248,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8754,6 +9321,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8787,6 +9355,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8865,6 +9512,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8872,15 +9548,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8911,12 +9588,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -9074,11 +9758,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -9113,11 +9796,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -9175,12 +9859,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -9274,22 +9958,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -9431,22 +10115,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9624,46 +10308,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9700,22 +10380,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9770,11 +10450,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9817,11 +10496,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9867,44 +10545,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -10070,11 +10744,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -10085,22 +10759,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -10120,7 +10796,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -10140,11 +10816,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -10155,22 +10831,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -10190,7 +10868,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -10210,13 +10888,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -10236,7 +10913,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -10256,13 +10933,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -10282,7 +10958,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -10302,13 +10978,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -10328,7 +11003,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -10348,13 +11023,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -10374,7 +11048,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -10394,13 +11068,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10419,8 +11092,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -10440,13 +11113,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10466,7 +11138,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10486,13 +11158,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10512,7 +11183,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10532,13 +11203,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10558,7 +11228,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10578,24 +11248,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10615,7 +11283,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10635,24 +11303,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10672,7 +11338,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10692,24 +11358,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10729,7 +11393,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10749,24 +11413,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10786,7 +11448,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10837,6 +11499,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10846,11 +11509,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10906,7 +11568,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10927,7 +11589,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10978,32 +11640,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -11035,6 +11685,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -11088,13 +11750,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -11114,7 +11775,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -11134,13 +11795,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -11160,7 +11820,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -11430,22 +12090,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11651,22 +12309,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11729,11 +12385,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11777,22 +12432,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11883,11 +12536,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11929,11 +12581,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11942,11 +12593,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -12091,11 +12741,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -12148,22 +12797,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12324,22 +12971,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12379,22 +13024,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12419,22 +13062,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12448,22 +13089,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12476,11 +13115,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -12505,22 +13143,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12534,22 +13170,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12562,11 +13196,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12620,44 +13253,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12671,44 +13300,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12759,22 +13384,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12853,22 +13476,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12955,22 +13576,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -13041,33 +13660,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -13080,33 +13696,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -13167,22 +13780,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -13262,22 +13873,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13290,22 +13899,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13391,6 +13998,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13753,13 +14495,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13976,6 +14890,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -14097,7 +15019,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -14105,6 +15091,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Top-down movement animator", "gdevelopVersion": ">=5.5.222", @@ -14131,12 +15118,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Change the animation according to the movement direction.", "fullName": "Top-down movement animator", + "helpPath": "", + "iconUrl": "", "name": "TopDownMovementAnimator", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15330,6 +16323,59 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onActivate" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "UpdateAnimation" + }, + { + "functionName": "AnimationName" + }, + { + "functionName": "SetAnimationName" + }, + { + "functionName": "IsPausingAnimation" + }, + { + "functionName": "SetIsPausingAnimation" + }, + { + "functionName": "IsScalingAnimation" + }, + { + "functionName": "SetIsScalingAnimation" + }, + { + "functionName": "UpdateAnimationSpeedScale" + }, + { + "functionName": "UpdateAnimationPause" + }, + { + "functionName": "Direction" + }, + { + "functionName": "DirectionDifference" + }, + { + "functionName": "UpdateAnimationDirection" + }, + { + "functionName": "UpdateAnimationName" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15399,6 +16445,45 @@ "name": "AnimationDirection" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "TopDownMovement" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IsScalingAnimation" + }, + { + "propertyName": "IsPausingAnimation" + }, + { + "propertyName": "AnimationName" + } + ] + }, + { + "folderName": "Direction", + "children": [ + { + "propertyName": "DirectionCount" + }, + { + "propertyName": "AngleOffset" + } + ] + }, + { + "propertyName": "AnimationDirection" + } + ] + }, "sharedPropertyDescriptors": [ { "value": "0", @@ -15414,7 +16499,18 @@ "hidden": true, "name": "AnimationFrame" } - ] + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "NewAnimationDirection" + }, + { + "propertyName": "AnimationFrame" + } + ] + } } ], "eventsBasedObjects": [] @@ -15422,15 +16518,16 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", - "fullName": "Panel sprite button", + "fullName": "Labeled button", "gdevelopVersion": ">=5.5.230", "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": "2.1.1", + "shortDescription": "Resizeable button with a label.", + "version": "2.2.0", "description": [ "A button that can be used for menus and most labelled buttons of a game. 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.", "", @@ -15480,12 +16577,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -16580,6 +17688,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -16647,7 +17790,1010 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" + }, + { + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "String", + "label": "Idle text", + "hidden": true, + "name": "IdleText" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverPrefix" + }, + { + "propertyName": "HoverSuffix" + }, + { + "propertyName": "IdleText" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + } + ] + } } ], "eventsBasedObjects": [ @@ -16658,12 +18804,16 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "menu buttons", "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", + "description": "Button with a label.", + "fullName": "Labeled button", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -16685,6 +18835,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Text", @@ -16832,6 +18993,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -16899,6 +19070,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -16958,7 +19130,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -17211,6 +19399,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -17366,29 +19576,34 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" }, "parameters": [ - "Object", - "=", - "0", + "Label", + "TextStyleState", + "", "" ] }, { "type": { - "value": "Cache" + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" }, "parameters": [ - "Idle" + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" ] }, { "type": { - "value": "Montre" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Hovered", + "Object", + "=", + "0", "" ] }, @@ -17397,28 +19612,64 @@ "value": "Cache" }, "parameters": [ - "Pressed" + "Idle" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "Montre" }, "parameters": [ "Hovered", - "Tween", - "\"Fadeout\"" + "" ] }, { "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" + "value": "Cache" }, "parameters": [ - "Hovered", - "Opacity", - "=", - "255" + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } ] } ] @@ -17443,6 +19694,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -17501,6 +19774,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -18081,6 +20376,56 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -18109,6 +20454,7 @@ "type": "Number", "unit": "Pixel", "label": "", + "group": "States", "hidden": true, "name": "LabelOffset" }, @@ -18130,6 +20476,31 @@ "name": "_PropertyMapping" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "LabelText" + }, + { + "propertyName": "_PropertyMapping" + }, + { + "folderName": "States", + "children": [ + { + "propertyName": "HoveredFadeOutDuration" + }, + { + "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" + } + ] + } + ] + }, "variants": [ { "areaMaxX": 256, @@ -18160,312 +20531,345 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Button", - "font": "", - "textAlignment": "center", - "characterSize": 26, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "center", - "characterSize": 26, - "lineHeight": 0, - "color": "255;255;255" - } - }, - { - "assetStoreId": "", - "bottomMargin": 11, - "height": 106, - "leftMargin": 11, - "name": "Idle", - "rightMargin": 11, - "texture": "assets\\Border.png", - "tiled": false, - "topMargin": 11, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [ - { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } - ], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "name": "Hovered", - "rightMargin": 8, - "texture": "assets\\Border2.png", - "tiled": false, - "topMargin": 8, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "name": "Pressed", - "rightMargin": 8, - "texture": "assets\\Border2.png", - "tiled": false, - "topMargin": 8, - "type": "PanelSpriteObject::PanelSprite", - "width": 256, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ] - }, - { - "assetStoreId": "", - "name": "BitmapLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - }, - { - "objectName": "BitmapLabel" - } - ] - }, - "objectsGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - }, - { - "name": "Labels", - "objects": [ - { - "name": "Label" - }, - { - "name": "BitmapLabel" - } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 64, - "layer": "", - "name": "Idle", - "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", - "width": 256, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 64, - "layer": "", - "name": "Label", - "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", - "width": 256, - "x": 0, - "y": 32, - "zOrder": 2, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "editionSettings": {} - }, - { - "areaMaxX": 256, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "assetStoreAssetId": "9d5de415b6e469c681701ea42d3b1c486fee31d6ef591a2d3e226f639ab486ff", - "assetStoreOriginalName": "Semi-transparent black and white", - "name": "Semi-transparent black and white", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "topEdgeAnchor": 4, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 26, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 26, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 106, + "leftMargin": 11, + "name": "Idle", + "rightMargin": 11, + "texture": "assets\\Border.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 106, + "leftMargin": 8, + "name": "Hovered", + "rightMargin": 8, + "texture": "assets\\Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 106, + "leftMargin": 8, + "name": "Pressed", + "rightMargin": 8, + "texture": "assets\\Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} + }, + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "9d5de415b6e469c681701ea42d3b1c486fee31d6ef591a2d3e226f639ab486ff", + "assetStoreOriginalName": "Semi-transparent black and white", + "name": "Semi-transparent black and white", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Button", @@ -18613,6 +21017,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -18680,6 +21094,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -18747,7 +21162,8 @@ }, { "author": "", - "category": "Input", + "category": "User interface", + "dimension": "", "extensionNamespace": "", "fullName": "Two choices dialog boxes", "gdevelopVersion": ">=5.5.230", @@ -18755,11 +21171,13 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIxMSIgeDI9IjI5IiB5Mj0iMTEiLz4NCjxnPg0KCTxwYXRoIGQ9Ik03LDlDNi43LDksNi41LDguOSw2LjMsOC43QzYuMSw4LjUsNiw4LjMsNiw4YzAtMC4zLDAuMS0wLjUsMC4zLTAuN2MwLDAsMC4xLTAuMSwwLjEtMC4xYzAuMSwwLDAuMS0wLjEsMC4yLTAuMQ0KCQlDNi43LDcsNi43LDcsNi44LDdjMC4xLDAsMC4zLDAsMC40LDBjMC4xLDAsMC4xLDAsMC4yLDAuMWMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMCwwLDAuMSwwLjEsMC4xLDAuMWMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuMw0KCQlDOCw3LjcsOCw3LjksOCw4YzAsMC4xLDAsMC4zLTAuMSwwLjRDNy45LDguNSw3LjgsOC42LDcuNyw4LjdDNy41LDguOSw3LjMsOSw3LDl6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsOUM5LjcsOSw5LjUsOC45LDkuMyw4LjdDOS4xLDguNSw5LDguMyw5LDhjMC0wLjEsMC0wLjMsMC4xLTAuNGMwLjEtMC4xLDAuMS0wLjIsMC4yLTAuM2MwLjEtMC4xLDAuMi0wLjIsMC4zLTAuMg0KCQlDMTAsNi45LDEwLjQsNywxMC43LDcuM2MwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxMSw3LjcsMTEsNy45LDExLDhjMCwwLjMtMC4xLDAuNS0wLjMsMC43QzEwLjUsOC45LDEwLjMsOSwxMCw5eiIvPg0KPC9nPg0KPGc+DQoJPHBhdGggZD0iTTEzLDljLTAuMSwwLTAuMywwLTAuNC0wLjFjLTAuMS0wLjEtMC4yLTAuMS0wLjMtMC4yYy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM0MxMiw4LjMsMTIsOC4xLDEyLDhjMC0wLjEsMC0wLjMsMC4xLTAuNA0KCQljMC4xLTAuMSwwLjEtMC4yLDAuMi0wLjNjMC40LTAuNCwxLTAuNCwxLjQsMGMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxNCw3LjcsMTQsNy45LDE0LDhjMCwwLjEsMCwwLjMtMC4xLDAuNA0KCQljLTAuMSwwLjEtMC4xLDAuMi0wLjIsMC4zQzEzLjUsOC45LDEzLjMsOSwxMyw5eiIvPg0KPC9nPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDVINUMzLjksNSwzLDUuOSwzLDd2MThjMCwxLjEsMC45LDIsMiwyaDIyYzEuMSwwLDItMC45LDItMlY3QzI5LDUuOSwyOC4xLDUsMjcsNXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMywyM0g5Yy0xLjEsMC0yLTAuOS0yLTJ2LTRjMC0xLjEsMC45LTIsMi0yaDE0YzEuMSwwLDIsMC45LDIsMnY0QzI1LDIyLjEsMjQuMSwyMywyMywyM3oiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE1LDE5IDE2LDIwIDE4LDE4ICIvPg0KPC9zdmc+DQo=", "name": "TwoChoicesDialogBoxes", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", - "shortDescription": "A dialog box with buttons to let users make a choice.", - "version": "0.3.0", + "shortDescription": "Two-choice dialog box with keyboard, gamepad, and touch support. Customizable text.", + "version": "0.3.2", "description": [ "A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.", - "It handles keyboard, gamepad and touch controls." + "It handles keyboard, gamepad and touch controls.", + "", + "There are ready-to-use dialog boxes in the asset-store [dialog boxes pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=dialog-boxes-dialog-boxes)." ], "origin": { "identifier": "TwoChoicesDialogBoxes", @@ -18779,7 +21197,38 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -18789,19 +21238,23 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "dialog boxes", "defaultName": "", "description": "A dialog box showing two options.", "fullName": "Two choices dialog box ", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "TwoChoicesDialogBox", + "previewIconUrl": "", "objects": [ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "NoButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Semi-transparent black and white", "variables": [ { "name": "ID", @@ -18835,13 +21288,21 @@ "useLegacyBottomAndRightAnchors": false } ], - "content": {} + "content": { + "LeftPadding": 8, + "RightPadding": 8, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 8, + "TopPadding": 8, + "MinimalWidth": 300 + } }, { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "YesButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Semi-transparent black and white", "variables": [ { "name": "ID", @@ -18875,7 +21336,15 @@ "useLegacyBottomAndRightAnchors": false } ], - "content": {} + "content": { + "LeftPadding": 8, + "RightPadding": 8, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 8, + "TopPadding": 8, + "MinimalWidth": 300 + } }, { "assetStoreId": "", @@ -18971,6 +21440,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -19185,287 +21655,305 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Buttons", - "" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlaySound" + "inverted": true, + "value": "TwoChoicesDialogBoxes::IsInGameEdition" }, "parameters": [ "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - }, - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "Buttons.ID", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, "parameters": [ - "", - "NumpadLeft" + "Buttons", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "", - "Left" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "1", - "\"Left\"", - "\"Left\"", + "Object", + "=", + "Buttons.ID", "" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "-", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadLeft" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Left\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "KeyPressed" + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", - "NumpadRight" + "Object", + "-", + "1", + "" ] }, { "type": { - "value": "KeyPressed" + "value": "PlaySound" }, "parameters": [ "", - "Right" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "NumpadRight" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Right\"", + "" + ] + } ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "+", "1", - "\"Right\"", "" ] }, { "type": { - "value": "Gamepads::C_Axis_pushed" + "value": "PlaySound" }, "parameters": [ "", - "1", - "\"Left\"", - "\"Right\"", - "" + "HoveredSound", + "", + "20", + "RandomFloatInRange(0.8,0.9)" ] } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "+", - "1", - "" - ] - }, - { - "type": { - "value": "PlaySound" - }, - "parameters": [ - "", - "HoverSound.wav", - "", - "20", - "RandomFloatInRange(0.8,0.9)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "EnableEscape", - "True", - "" - ] + "comment": "To escape the dialog we can focus the button with the identifier 1 which is usually the button to cancel/deny by pressing one of the key or buttons" }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Escape" + "EnableEscape", + "True", + "" ] }, { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Escape" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" }, "parameters": [ - "", + "Object", + "=", "1", - "\"B\"", "" ] } ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TwoChoicesDialogBoxes::TwoChoicesDialogBox::SetActiveButtonById" - }, - "parameters": [ - "Object", - "=", - "1", - "" - ] } ] } @@ -19502,6 +21990,28 @@ "=", "TextMessage" ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "YesButton", + "=", + "LabelButtonID0", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelTextOp" + }, + "parameters": [ + "NoButton", + "=", + "LabelButtonID1", + "" + ] } ] } @@ -19829,6 +22339,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ActiveButtonById", + "group": "Dialog Box configuration", "name": "SetActiveButtonById", "private": true, "sentence": "", @@ -19959,6 +22470,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TextMessage", + "group": "Dialog Box configuration", "name": "SetTextMessage", "private": true, "sentence": "", @@ -20002,6 +22514,43 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "IsYesClicked" + }, + { + "functionName": "IsNoClicked" + }, + { + "folderName": "Dialog Box configuration", + "children": [ + { + "functionName": "ActiveButtonById" + }, + { + "functionName": "SetActiveButtonById" + }, + { + "functionName": "TextMessage" + }, + { + "functionName": "SetTextMessage" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "Default message. Continue?", @@ -20058,8 +22607,44 @@ ], "hidden": true, "name": "_PropertyMapping" + }, + { + "value": "", + "type": "Resource", + "label": "Sound at hovering", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "HoveredSound" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TextMessage" + }, + { + "propertyName": "HighlightedButtonIndex" + }, + { + "propertyName": "EnableEscape" + }, + { + "propertyName": "LabelButtonID0" + }, + { + "propertyName": "LabelButtonID1" + }, + { + "propertyName": "_PropertyMapping" + }, + { + "propertyName": "HoveredSound" + } + ] + }, "variants": [ { "areaMaxX": 600, @@ -20244,6 +22829,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20529,6 +23115,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20636,6 +23223,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -20644,7 +23232,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -20676,12 +23264,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -21755,6 +24349,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -21822,13 +24451,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -22123,6 +24777,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -22203,6 +24858,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -22283,6 +24939,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -22319,6 +24976,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22363,13 +25054,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -22573,6 +25291,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -22653,6 +25372,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -22733,6 +25453,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -22769,6 +25490,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22813,13 +25568,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -23136,6 +25918,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -23655,6 +26534,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -23735,6 +26615,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -23815,6 +26696,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -23896,6 +26778,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -23977,6 +26860,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -24057,6 +26941,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -24137,6 +27022,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -24173,6 +27059,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24529,6 +27494,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -24600,13 +27572,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -25016,6 +28064,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -25096,6 +28145,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -25176,6 +28226,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -25256,6 +28307,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -25336,6 +28388,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -25417,6 +28470,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -25498,6 +28552,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -25534,6 +28589,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -25910,13 +29029,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -26327,6 +29496,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -26409,6 +29579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -26491,6 +29662,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -26573,6 +29745,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -26655,6 +29828,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -26738,6 +29912,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -26821,6 +29996,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -26858,6 +30034,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -27221,7 +30461,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -27229,6 +30513,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -27236,8 +30521,8 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", - "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.8.1", + "shortDescription": "Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.", + "version": "0.9.1", "description": [ "Add support for gamepads (or other physical controllers).", "", @@ -27269,7 +30554,8 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], @@ -27328,83 +30614,343 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", + " }\r", + "\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function addFrameBeginningTaskIfNeeded(runtimeScene) {\r", + " const taskManager = runtimeScene.getAsyncTasksManager();\r", + " for (const taskWithCallback of taskManager.tasksWithCallback) {\r", + " if (taskWithCallback.asyncTask === frameBeginningTask) {\r", + " return;\r", + " }\r", + " }\r", + " // Async tasks are run before everything.\r", + " // This is a hack to make sure that button states are updated\r", + " // before mapping behavior events.\r", + " taskManager.addTask(frameBeginningTask);\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "/**\r", + " * @param {gdjs.RuntimeScene} runtimeScene\r", + " */\r", + "function onScenePostEvents(runtimeScene) {\r", + " addFrameBeginningTaskIfNeeded(runtimeScene);\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", + "}\r", + "\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -27413,44 +30959,53 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", - "\r", - " v = v - Math.sign(v) * DEADZONE;\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + " addFrameBeginningTaskIfNeeded,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -27463,59 +31018,30 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "gdjs._extensionController.onScenePostEvents(runtimeScene);", "" ], "parameterObjects": "", @@ -27953,27 +31479,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -28001,12 +31520,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -28023,43 +31542,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", - "\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -28072,12 +31576,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -28101,7 +31605,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -28113,12 +31617,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -28135,40 +31639,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -28181,12 +31672,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -28204,18 +31695,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -28224,11 +31708,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -28325,7 +31810,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -28353,26 +31838,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -28410,26 +31889,20 @@ { "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", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 3 : 1;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -28467,136 +31940,57 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed 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 just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -28606,12 +32000,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -28628,17 +32022,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -28651,7 +32037,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -28667,46 +32053,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -28717,7 +32067,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -28733,35 +32083,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -28774,7 +32107,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -28796,20 +32129,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", - "" + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" ], "parameterObjects": "", "useStrict": true, @@ -28832,127 +32161,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -28963,7 +32181,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -28990,15 +32208,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -29011,7 +32223,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -29027,18 +32239,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -29049,7 +32255,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29070,141 +32276,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -29215,7 +32308,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29235,24 +32328,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -29276,22 +32369,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -29306,7 +32390,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -29322,28 +32406,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -29358,7 +32428,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29379,17 +32449,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -29402,7 +32464,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -29418,25 +32480,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -29453,7 +32506,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29474,35 +32527,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -29510,11 +32547,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -29524,7 +32561,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29555,39 +32592,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -29596,8 +32616,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -29607,7 +32627,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -29638,54 +32658,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", - "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", - "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -29695,7 +32671,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -29711,8 +32687,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -29725,7 +32701,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -29741,8 +32717,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -29755,19 +32731,120 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -30251,6 +33328,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -30331,13 +33416,43 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -30450,6 +33565,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -30526,13 +33649,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -30634,6 +33781,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -30727,13 +33882,40 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "WalkStick" + }, + { + "propertyName": "CameraStick" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -30974,6 +34156,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -31054,6 +34237,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -31134,6 +34318,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -31214,6 +34399,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -31294,6 +34480,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -31374,6 +34561,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -31454,6 +34642,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -31534,6 +34723,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -31614,6 +34804,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -31650,6 +34841,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -31768,13 +35044,77 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "propertyName": "CameraStick" + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -32058,6 +35398,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -32138,13 +35486,43 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -32722,6 +36100,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -32782,11 +36168,38 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "UseArrows" + }, + { + "propertyName": "UseLeftStick" + }, + { + "propertyName": "UseRightStick" + }, + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json b/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json index defb19595..75c8ec0e9 100644 --- a/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json +++ b/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -208,7 +208,7 @@ "metadata": "", "name": "assets\\Placement thud.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, @@ -244,8 +244,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -269,14 +268,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.4335774304702432, + "zoomFactor": 0.44819780454104163, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -319,16 +321,19 @@ "variables": [ { "name": "Inventory", + "persistentUuid": "bc0bc188-8992-49e8-a772-870382156bc6", "type": "array", "children": [] }, { "name": "UpdateInventoryDisplay", + "persistentUuid": "8f24d730-253b-4d86-a78e-8d1b0225caac", "type": "boolean", "value": false }, { "name": "SelectedSlot", + "persistentUuid": "ab436638-56a9-4ecf-b290-95e84573bfb3", "type": "number", "value": 0 } @@ -3897,6 +3902,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3925,6 +3931,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3942,6 +3949,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -4023,6 +4031,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -6007,12 +6016,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -6911,6 +7002,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -6991,6 +7083,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -7071,6 +7164,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -7163,6 +7257,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -7212,13 +7376,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -7705,6 +7897,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -7755,13 +7967,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7935,6 +8175,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7977,13 +8225,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8078,6 +8350,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8120,13 +8400,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8210,6 +8514,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -8252,13 +8564,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -8499,6 +8835,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -8579,6 +8916,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -8659,6 +8997,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -8739,6 +9078,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -8819,6 +9159,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -8899,6 +9240,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -8979,6 +9321,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -9059,6 +9402,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -9139,6 +9483,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -9175,6 +9520,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9294,27 +9724,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -9413,6 +9912,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -9472,13 +9979,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -9985,6 +10519,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10040,7 +10582,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -10054,8 +10617,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -10134,6 +10700,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -10160,6 +10727,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -11114,6 +11682,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -11186,6 +11755,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -11258,6 +11828,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -11291,6 +11862,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -11369,6 +12019,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -11376,15 +12055,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -11415,12 +12095,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -11578,11 +12265,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -11617,11 +12303,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -11679,12 +12366,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -11778,22 +12465,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -11935,22 +12622,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -12128,46 +12815,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -12204,22 +12887,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -12274,11 +12957,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12321,11 +13003,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12371,44 +13052,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -12574,11 +13251,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -12589,22 +13266,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -12624,7 +13303,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -12644,11 +13323,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -12659,22 +13338,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -12694,7 +13375,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -12714,13 +13395,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -12740,7 +13420,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -12760,13 +13440,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -12786,7 +13465,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -12806,13 +13485,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -12832,7 +13510,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -12852,13 +13530,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -12878,7 +13555,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -12898,13 +13575,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -12923,8 +13599,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -12944,13 +13620,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -12970,7 +13645,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -12990,13 +13665,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13016,7 +13690,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -13036,13 +13710,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -13062,7 +13735,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -13082,24 +13755,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -13119,7 +13790,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13139,24 +13810,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -13176,7 +13845,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13196,24 +13865,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -13233,7 +13900,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13253,24 +13920,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -13290,7 +13955,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -13341,6 +14006,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -13350,11 +14016,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -13410,7 +14075,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -13431,7 +14096,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -13482,32 +14147,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -13539,6 +14192,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -13592,13 +14257,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -13618,7 +14282,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -13638,13 +14302,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -13664,7 +14327,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -13934,22 +14597,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -14155,22 +14816,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -14233,11 +14892,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -14281,22 +14939,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -14387,11 +15043,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -14433,11 +15088,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -14446,11 +15100,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -14595,11 +15248,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -14652,22 +15304,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -14828,22 +15478,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -14883,22 +15531,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -14923,22 +15569,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -14952,22 +15596,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -14980,11 +15622,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -15009,22 +15650,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15038,22 +15677,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -15066,11 +15703,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -15124,44 +15760,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15175,44 +15807,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -15263,22 +15891,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -15357,22 +15983,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -15459,22 +16083,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -15545,33 +16167,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -15584,33 +16203,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -15671,22 +16287,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -15766,22 +16380,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -15794,22 +16406,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -15895,6 +16505,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -16257,13 +17002,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -16480,6 +17397,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16601,7 +17526,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -16609,6 +17598,7 @@ { "author": "", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Top-down movement animator", "gdevelopVersion": ">=5.5.222", @@ -16635,12 +17625,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Change the animation according to the movement direction.", "fullName": "Top-down movement animator", + "helpPath": "", + "iconUrl": "", "name": "TopDownMovementAnimator", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -17834,6 +18830,59 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onActivate" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "UpdateAnimation" + }, + { + "functionName": "AnimationName" + }, + { + "functionName": "SetAnimationName" + }, + { + "functionName": "IsPausingAnimation" + }, + { + "functionName": "SetIsPausingAnimation" + }, + { + "functionName": "IsScalingAnimation" + }, + { + "functionName": "SetIsScalingAnimation" + }, + { + "functionName": "UpdateAnimationSpeedScale" + }, + { + "functionName": "UpdateAnimationPause" + }, + { + "functionName": "Direction" + }, + { + "functionName": "DirectionDifference" + }, + { + "functionName": "UpdateAnimationDirection" + }, + { + "functionName": "UpdateAnimationName" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -17903,6 +18952,45 @@ "name": "AnimationDirection" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "TopDownMovement" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IsScalingAnimation" + }, + { + "propertyName": "IsPausingAnimation" + }, + { + "propertyName": "AnimationName" + } + ] + }, + { + "folderName": "Direction", + "children": [ + { + "propertyName": "DirectionCount" + }, + { + "propertyName": "AngleOffset" + } + ] + }, + { + "propertyName": "AnimationDirection" + } + ] + }, "sharedPropertyDescriptors": [ { "value": "0", @@ -17918,7 +19006,18 @@ "hidden": true, "name": "AnimationFrame" } - ] + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "NewAnimationDirection" + }, + { + "propertyName": "AnimationFrame" + } + ] + } } ], "eventsBasedObjects": [] @@ -17926,6 +19025,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -17934,7 +19034,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -17966,12 +19066,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", + "helpPath": "", + "iconUrl": "", "name": "ButtonFSM", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -19045,6 +20151,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -19112,13 +20253,38 @@ "name": "Index" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffects", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -19413,6 +20579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", + "group": "Button object effects configuration", "name": "SetIdleEffect", "sentence": "", "events": [ @@ -19493,6 +20660,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", + "group": "Button object effects configuration", "name": "SetFocusedEffect", "sentence": "", "events": [ @@ -19573,6 +20741,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", + "group": "Button object effects configuration", "name": "SetPressedEffect", "sentence": "", "events": [ @@ -19609,6 +20778,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button object effects configuration", + "children": [ + { + "functionName": "IdleEffect" + }, + { + "functionName": "SetIdleEffect" + }, + { + "functionName": "FocusedEffect" + }, + { + "functionName": "SetFocusedEffect" + }, + { + "functionName": "PressedEffect" + }, + { + "functionName": "SetPressedEffect" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -19653,13 +20856,40 @@ "name": "PressedEffect" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effects", + "children": [ + { + "propertyName": "IdleEffect" + }, + { + "propertyName": "FocusedEffect" + }, + { + "propertyName": "PressedEffect" + } + ] + } + ] + } }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", + "helpPath": "", + "iconUrl": "", "name": "ButtonAnimationName", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -19863,6 +21093,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", + "group": "Button animation configuration", "name": "SetIdleAnimationName", "sentence": "", "events": [ @@ -19943,6 +21174,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", + "group": "Button animation configuration", "name": "SetFocusedAnimationName", "sentence": "", "events": [ @@ -20023,6 +21255,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", + "group": "Button animation configuration", "name": "SetPressedAnimationName", "sentence": "", "events": [ @@ -20059,6 +21292,40 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Button animation configuration", + "children": [ + { + "functionName": "IdleAnimationName" + }, + { + "functionName": "SetIdleAnimationName" + }, + { + "functionName": "FocusedAnimationName" + }, + { + "functionName": "SetFocusedAnimationName" + }, + { + "functionName": "PressedAnimationName" + }, + { + "functionName": "SetPressedAnimationName" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20103,13 +21370,40 @@ "name": "PressedAnimationName" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Animation" + }, + { + "propertyName": "ButtonFSM" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "IdleAnimationName" + }, + { + "propertyName": "FocusedAnimationName" + }, + { + "propertyName": "PressedAnimationName" + } + ] + } + ] + } }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonObjectEffectTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -20411,15 +21705,112 @@ ], "actions": [ { - "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" - }, - "parameters": [ - "Object", - "Behavior", - "FadeOutDuration", - "FadeOutEasing", - "" + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } ] } ] @@ -20945,6 +22336,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", + "group": "Button effect tween configuration", "name": "SetIdleValue", "sentence": "", "events": [ @@ -21025,6 +22417,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", + "group": "Button effect tween configuration", "name": "SetFocusedValue", "sentence": "", "events": [ @@ -21105,6 +22498,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", + "group": "Button effect tween configuration", "name": "SetPressedValue", "sentence": "", "events": [ @@ -21186,6 +22580,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button effect tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -21267,6 +22662,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button effect tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -21347,6 +22743,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button effect tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -21427,6 +22824,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button effect tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -21463,6 +22861,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "TimeDelta" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "functionName": "PlayTween" + }, + { + "folderName": "Button effect tween configuration", + "children": [ + { + "functionName": "EffectName" + }, + { + "functionName": "EffectProperty" + }, + { + "functionName": "SetEffectProperty" + }, + { + "functionName": "IdleValue" + }, + { + "functionName": "SetIdleValue" + }, + { + "functionName": "FocusedValue" + }, + { + "functionName": "SetFocusedValue" + }, + { + "functionName": "PressedValue" + }, + { + "functionName": "SetPressedValue" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -21819,6 +23296,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -21890,13 +23374,89 @@ "name": "EffectValue" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Effect" + }, + { + "folderName": "Effect", + "children": [ + { + "propertyName": "EffectName" + }, + { + "propertyName": "EffectProperty" + } + ] + }, + { + "folderName": "Value", + "children": [ + { + "propertyName": "IdleValue" + }, + { + "propertyName": "FocusedValue" + }, + { + "propertyName": "PressedValue" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + }, + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + } + ] + }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, + { + "propertyName": "PreviousState" + }, + { + "propertyName": "TweenInitialValue" + }, + { + "propertyName": "TweenTargetedValue" + }, + { + "propertyName": "TweenTime" + }, + { + "propertyName": "TweenState" + }, + { + "propertyName": "EffectValue" + } + ] + } }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonScaleTween", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -22306,6 +23866,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", + "group": "Button scale tween configuration", "name": "SetIdleScale", "sentence": "", "events": [ @@ -22386,6 +23947,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", + "group": "Button scale tween configuration", "name": "SetFocusedScale", "sentence": "", "events": [ @@ -22466,6 +24028,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", + "group": "Button scale tween configuration", "name": "SetPressedScale", "sentence": "", "events": [ @@ -22546,6 +24109,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button scale tween configuration", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -22626,6 +24190,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button scale tween configuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -22707,6 +24272,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button scale tween configuration", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -22788,6 +24354,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button scale tween configuration", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -22824,6 +24391,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button scale tween configuration", + "children": [ + { + "functionName": "IdleScale" + }, + { + "functionName": "SetIdleScale" + }, + { + "functionName": "FocusedScale" + }, + { + "functionName": "SetFocusedScale" + }, + { + "functionName": "PressedScale" + }, + { + "functionName": "SetPressedScale" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -23200,13 +24831,63 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + }, + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Size", + "children": [ + { + "propertyName": "IdleScale" + }, + { + "propertyName": "FocusedScale" + }, + { + "propertyName": "PressedScale" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", + "helpPath": "", + "iconUrl": "", "name": "ButtonColorTintTween", "objectType": "Sprite", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -23617,6 +25298,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", + "group": "Button color tint tween", "name": "SetIdleColorTint", "sentence": "", "events": [ @@ -23699,6 +25381,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", + "group": "Button color tint tween", "name": "SetFocusedColorTint", "sentence": "", "events": [ @@ -23781,6 +25464,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", + "group": "Button color tint tween", "name": "SetPressedColorTint", "sentence": "", "events": [ @@ -23863,6 +25547,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", + "group": "Button color tint tween", "name": "SetFadeInDuration", "sentence": "", "events": [ @@ -23945,6 +25630,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", + "group": "Button color tint tween", "name": "SetFadeOutDuration", "sentence": "", "events": [ @@ -24028,6 +25714,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", + "group": "Button color tint tween", "name": "SetFadeInEasing", "sentence": "", "events": [ @@ -24111,6 +25798,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", + "group": "Button color tint tween", "name": "SetFadeOutEasing", "sentence": "", "events": [ @@ -24148,6 +25836,70 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FadeIn" + }, + { + "functionName": "FadeOut" + }, + { + "folderName": "Button color tint tween", + "children": [ + { + "functionName": "IdleColorTint" + }, + { + "functionName": "SetIdleColorTint" + }, + { + "functionName": "FocusedColorTint" + }, + { + "functionName": "SetFocusedColorTint" + }, + { + "functionName": "PressedColorTint" + }, + { + "functionName": "SetPressedColorTint" + }, + { + "functionName": "FadeInDuration" + }, + { + "functionName": "SetFadeInDuration" + }, + { + "functionName": "FadeOutDuration" + }, + { + "functionName": "SetFadeOutDuration" + }, + { + "functionName": "FadeInEasing" + }, + { + "functionName": "SetFadeInEasing" + }, + { + "functionName": "FadeOutEasing" + }, + { + "functionName": "SetFadeOutEasing" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24511,7 +26263,51 @@ "name": "PreviousState" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ButtonFSM" + }, + { + "propertyName": "Tween" + }, + { + "folderName": "Color", + "children": [ + { + "propertyName": "IdleColorTint" + }, + { + "propertyName": "FocusedColorTint" + }, + { + "propertyName": "PressedColorTint" + } + ] + }, + { + "folderName": "Speed", + "children": [ + { + "propertyName": "FadeInDuration" + }, + { + "propertyName": "FadeOutDuration" + }, + { + "propertyName": "FadeInEasing" + }, + { + "propertyName": "FadeOutEasing" + } + ] + }, + { + "propertyName": "PreviousState" + } + ] + } } ], "eventsBasedObjects": [] @@ -24519,6 +26315,7 @@ { "author": "@Lizard-13", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Rectangular 2D grid", "gdevelopVersion": ">=5.5.222", @@ -24620,12 +26417,21 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SnapObjectToVirtualGrid" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "Tristan Rhodes (https://victrisgames.itch.io/)", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "Shake object", "gdevelopVersion": ">=5.5.222", @@ -24666,12 +26472,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Shake objects with translation and rotation.", "fullName": "Shake object (position, angle)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngle", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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. ", @@ -26652,14 +28464,36 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngle" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT" + } }, { "description": "Shake objects with translation, rotation and scale.", "fullName": "Shake object (position, angle, scale)", + "helpPath": "", + "iconUrl": "", "name": "ShakeObject_PositionAngleScale", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "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.", @@ -29026,6 +30860,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngleScale" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -29038,11 +30889,18 @@ "name": "Scale" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-top-down/starting-top-down.json b/examples/starting-top-down/starting-top-down.json index 445c1cbb7..face8f883 100644 --- a/examples/starting-top-down/starting-top-down.json +++ b/examples/starting-top-down/starting-top-down.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -147,8 +147,7 @@ "name": "Flat dark joystick thumb.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -172,14 +171,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5653158055126329, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -830,6 +832,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -858,6 +861,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -917,6 +921,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -2901,12 +2906,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -3805,6 +3892,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -3885,6 +3973,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -3965,6 +4054,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4057,6 +4147,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4106,13 +4266,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4599,6 +4787,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4649,13 +4857,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4829,6 +5065,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4871,13 +5115,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4972,6 +5240,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5014,13 +5290,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5104,6 +5404,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5146,13 +5454,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5393,6 +5725,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5473,6 +5806,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5553,6 +5887,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5633,6 +5968,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -5713,6 +6049,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -5793,6 +6130,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -5873,6 +6211,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -5953,6 +6292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6033,6 +6373,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6069,6 +6410,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6188,27 +6614,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -6307,6 +6802,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6366,13 +6869,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -6879,6 +7409,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6934,7 +7472,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -6948,8 +7507,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7028,6 +7590,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7054,6 +7617,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8008,6 +8572,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8080,6 +8645,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8152,6 +8718,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8185,6 +8752,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8263,6 +8909,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8270,15 +8945,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8309,12 +8985,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8472,11 +9155,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -8511,11 +9193,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -8573,12 +9256,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -8672,22 +9355,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -8829,22 +9512,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9022,46 +9705,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9098,22 +9777,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9168,11 +9847,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9215,11 +9893,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9265,44 +9942,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -9468,11 +10141,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -9483,22 +10156,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -9518,7 +10193,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -9538,11 +10213,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -9553,22 +10228,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -9588,7 +10265,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -9608,13 +10285,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -9634,7 +10310,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -9654,13 +10330,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -9680,7 +10355,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -9700,13 +10375,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -9726,7 +10400,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -9746,13 +10420,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -9772,7 +10445,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -9792,13 +10465,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9817,8 +10489,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -9838,13 +10510,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9864,7 +10535,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9884,13 +10555,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9910,7 +10580,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9930,13 +10600,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9956,7 +10625,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -9976,24 +10645,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10013,7 +10680,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10033,24 +10700,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10070,7 +10735,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10090,24 +10755,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10127,7 +10790,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10147,24 +10810,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10184,7 +10845,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10235,6 +10896,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10244,11 +10906,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10304,7 +10965,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10325,7 +10986,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10376,32 +11037,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -10433,6 +11082,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10486,13 +11147,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -10512,7 +11172,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -10532,13 +11192,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -10558,7 +11217,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -10828,22 +11487,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11049,22 +11706,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11127,11 +11782,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11175,22 +11829,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11281,11 +11933,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11327,11 +11978,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11340,11 +11990,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -11489,11 +12138,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -11546,22 +12194,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11722,22 +12368,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -11777,22 +12421,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11817,22 +12459,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11846,22 +12486,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -11874,11 +12512,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -11903,22 +12540,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11932,22 +12567,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -11960,11 +12593,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12018,44 +12650,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12069,44 +12697,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12157,22 +12781,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12251,22 +12873,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12353,22 +12973,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -12439,33 +13057,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -12478,33 +13093,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -12565,22 +13177,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -12660,22 +13270,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12688,22 +13296,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12789,6 +13395,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13151,13 +13892,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13374,6 +14287,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13495,11 +14416,75 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json b/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json index 95d7ae3ea..c4c8b690f 100644 --- a/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json +++ b/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -147,8 +147,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -172,14 +171,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.5653158055126329, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [ { @@ -1132,6 +1134,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1149,6 +1152,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1177,6 +1181,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1240,6 +1245,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3224,12 +3230,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -4128,6 +4216,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4208,6 +4297,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4288,6 +4378,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4380,6 +4471,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4429,13 +4590,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4922,6 +5111,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4972,13 +5181,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5152,6 +5389,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5194,13 +5439,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5295,6 +5564,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5337,13 +5614,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5427,6 +5728,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5469,13 +5778,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5716,6 +6049,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5796,6 +6130,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5876,6 +6211,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5956,6 +6292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -6036,6 +6373,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -6116,6 +6454,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6196,6 +6535,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6276,6 +6616,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6356,6 +6697,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6392,6 +6734,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6511,27 +6938,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -6630,6 +7126,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6689,13 +7193,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7202,6 +7733,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7257,7 +7796,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7271,8 +7831,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7351,6 +7914,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7377,6 +7941,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8331,6 +8896,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8403,6 +8969,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8475,6 +9042,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8508,6 +9076,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8586,6 +9233,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8593,15 +9269,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8632,12 +9309,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8795,11 +9479,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -8834,11 +9517,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -8896,12 +9580,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -8995,22 +9679,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -9152,22 +9836,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9345,46 +10029,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9421,22 +10101,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9491,11 +10171,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9538,11 +10217,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9588,44 +10266,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -9791,11 +10465,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -9806,22 +10480,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -9841,7 +10517,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -9861,11 +10537,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -9876,22 +10552,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -9911,7 +10589,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -9931,13 +10609,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -9957,7 +10634,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -9977,13 +10654,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -10003,7 +10679,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -10023,13 +10699,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -10049,7 +10724,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -10069,13 +10744,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -10095,7 +10769,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -10115,13 +10789,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10140,8 +10813,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -10161,13 +10834,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10187,7 +10859,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10207,13 +10879,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10233,7 +10904,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10253,13 +10924,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10279,7 +10949,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10299,24 +10969,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10336,7 +11004,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10356,24 +11024,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10393,7 +11059,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10413,24 +11079,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10450,7 +11114,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10470,24 +11134,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10507,7 +11169,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10558,6 +11220,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10567,11 +11230,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10627,7 +11289,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10648,7 +11310,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10699,32 +11361,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -10756,6 +11406,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10809,13 +11471,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -10835,7 +11496,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -10855,13 +11516,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -10881,7 +11541,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -11151,22 +11811,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11372,22 +12030,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11450,11 +12106,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11498,22 +12153,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11604,11 +12257,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11650,11 +12302,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11663,11 +12314,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -11812,11 +12462,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -11869,22 +12518,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12045,22 +12692,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12100,22 +12745,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -12140,22 +12783,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12169,22 +12810,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12197,11 +12836,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -12226,22 +12864,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12255,22 +12891,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12283,11 +12917,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12341,44 +12974,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12392,44 +13021,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12480,22 +13105,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12574,22 +13197,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12676,22 +13297,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -12762,33 +13381,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -12801,33 +13417,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -12888,22 +13501,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -12983,22 +13594,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13011,22 +13620,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -13112,6 +13719,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13474,13 +14216,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13697,6 +14611,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13818,7 +14740,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -13826,15 +14812,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -13877,13 +14864,124 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15255,6 +16353,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -15388,6 +16487,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -15521,6 +16621,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -15654,6 +16755,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -16004,6 +17106,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -16137,6 +17240,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -16270,6 +17374,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -16403,6 +17508,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -16536,6 +17642,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -16669,6 +17776,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -16949,6 +18057,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -17183,6 +18292,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -17316,6 +18426,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -18553,26 +19664,324 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ + }, { - "value": "0.1", - "type": "Number", + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -18580,9 +19989,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -18592,7 +19998,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -18601,7 +20006,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -18611,7 +20015,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -18622,7 +20025,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -18630,9 +20032,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -18642,7 +20041,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -18653,7 +20051,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -18661,9 +20058,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -18671,9 +20066,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -18682,8 +20074,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -18691,9 +20081,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -18701,9 +20088,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -18711,9 +20096,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -18721,9 +20103,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -18731,9 +20111,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -18743,7 +20120,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -18751,9 +20127,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -18761,9 +20134,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -18774,7 +20145,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -18782,9 +20152,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -18798,6 +20166,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -18807,7 +20176,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -18815,18 +20183,681 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "", + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-vampire-survivor/starting-vampire-survivor.json b/examples/starting-vampire-survivor/starting-vampire-survivor.json index 5afda07fc..451e5e54d 100644 --- a/examples/starting-vampire-survivor/starting-vampire-survivor.json +++ b/examples/starting-vampire-survivor/starting-vampire-survivor.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 245, + "build": 272, "major": 5, - "minor": 5, + "minor": 6, "revision": 0 }, "properties": { @@ -147,8 +147,7 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -172,14 +171,17 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 64, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5468750000000022, + "zoomFactor": 0.5843784410740951, "windowMask": false, - "selectedLayer": "" + "selectedLayer": "", + "gameEditorMode": "instances-editor" }, "objectsGroups": [], "variables": [], @@ -945,6 +947,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -962,6 +965,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -990,6 +994,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1053,6 +1058,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -3037,12 +3043,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -3941,6 +4029,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -4021,6 +4110,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -4101,6 +4191,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -4193,6 +4284,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4242,13 +4403,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -4735,6 +4924,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -4785,13 +4994,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4965,6 +5202,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5007,13 +5252,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5108,6 +5377,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5150,13 +5427,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5240,6 +5541,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5282,13 +5591,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5529,6 +5862,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -5609,6 +5943,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -5689,6 +6024,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -5769,6 +6105,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -5849,6 +6186,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -5929,6 +6267,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -6009,6 +6348,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -6089,6 +6429,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -6169,6 +6510,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -6205,6 +6547,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6324,27 +6751,96 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics car with a multitouch controller.", - "fullName": "3D car multitouch controller mapper", - "name": "PhysicsCar3DMultitouchMapper", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } + }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", @@ -6443,6 +6939,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6502,13 +7006,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -7015,6 +7546,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -7070,7 +7609,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -7084,8 +7644,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -7164,6 +7727,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7190,6 +7754,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8144,6 +8709,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -8216,6 +8782,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -8288,6 +8855,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -8321,6 +8889,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -8399,6 +9046,35 @@ "name": "ShouldBeHiddenWhenReleased" } ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + }, "variants": [] } ] @@ -8406,15 +9082,16 @@ { "author": "", "category": "Camera", + "dimension": "2D", "extensionNamespace": "", "fullName": "Smooth Camera", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.2", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -8445,12 +9122,19 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8608,11 +9292,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -8647,11 +9330,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -8709,12 +9393,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -8808,22 +9492,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -8965,22 +9649,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -9158,46 +9842,42 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", - "TimeFromStart() + WaitingDuration" + "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", - "WaitingSpeedXMax" + "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", - "WaitingSpeedYMax" + "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", - "CatchUpDuration" + "NewCatchUpDuration" ] } ] @@ -9234,22 +9914,22 @@ }, { "description": "Waiting duration (in seconds)", - "name": "WaitingDuration", + "name": "NewWaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", - "name": "WaitingSpeedXMax", + "name": "NewWaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", - "name": "WaitingSpeedYMax", + "name": "NewWaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", - "name": "CatchUpDuration", + "name": "NewCatchUpDuration", "type": "expression" } ], @@ -9304,11 +9984,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -9351,11 +10030,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -9401,44 +10079,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -9604,11 +10278,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -9619,22 +10293,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnX\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -9654,7 +10330,7 @@ }, { "description": "Follow on X axis", - "name": "FollowOnX", + "name": "Value", "type": "yesorno" } ], @@ -9674,11 +10350,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -9689,22 +10365,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FollowOnY\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -9724,7 +10402,7 @@ }, { "description": "Follow on Y axis", - "name": "FollowOnY", + "name": "Value", "type": "yesorno" } ], @@ -9744,13 +10422,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", - "max(0, SetFollowFreeAreaRight)" + "max(0, Value)" ] } ] @@ -9770,7 +10447,7 @@ }, { "description": "Follow free area right border", - "name": "SetFollowFreeAreaRight", + "name": "Value", "type": "expression" } ], @@ -9790,13 +10467,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", - "max(0, SetFollowFreeAreaLeft)" + "max(0, Value)" ] } ] @@ -9816,7 +10492,7 @@ }, { "description": "Follow free area left border", - "name": "SetFollowFreeAreaLeft", + "name": "Value", "type": "expression" } ], @@ -9836,13 +10512,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", - "max(0, FollowFreeAreaTop)" + "max(0, Value)" ] } ] @@ -9862,7 +10537,7 @@ }, { "description": "Follow free area top border", - "name": "FollowFreeAreaTop", + "name": "Value", "type": "expression" } ], @@ -9882,13 +10557,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", - "max(0, SetFollowFreeAreaBottom)" + "max(0, Value)" ] } ] @@ -9908,7 +10582,7 @@ }, { "description": "Follow free area bottom border", - "name": "SetFollowFreeAreaBottom", + "name": "Value", "type": "expression" } ], @@ -9928,13 +10602,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -9953,8 +10626,8 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", - "name": "Speed", + "description": "Leftward maximum speed (in pixels per second)", + "name": "Value", "type": "expression" } ], @@ -9974,13 +10647,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10000,7 +10672,7 @@ }, { "description": "Rightward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10020,13 +10692,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10046,7 +10717,7 @@ }, { "description": "Upward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10066,13 +10737,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", - "max(0, Speed)" + "max(0, Value)" ] } ] @@ -10092,7 +10762,7 @@ }, { "description": "Downward maximum speed (in pixels per second)", - "name": "Speed", + "name": "Value", "type": "expression" } ], @@ -10112,24 +10782,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", - "clamp(0, 1, LeftwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", - "log(1 - LeftwardSpeed)" + "log(1 - Value)" ] } ] @@ -10149,7 +10817,7 @@ }, { "description": "Leftward catch-up speed (in ratio per second)", - "name": "LeftwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10169,24 +10837,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", - "clamp(0, 1, RightwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", - "log(1 - RightwardSpeed)" + "log(1 - Value)" ] } ] @@ -10206,7 +10872,7 @@ }, { "description": "Rightward catch-up speed (in ratio per second)", - "name": "RightwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10226,24 +10892,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", - "clamp(0, 1, DownwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", - "log(1 - DownwardSpeed)" + "log(1 - Value)" ] } ] @@ -10263,7 +10927,7 @@ }, { "description": "Downward catch-up speed (in ratio per second)", - "name": "DownwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10283,24 +10947,22 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", - "clamp(0, 1, UpwardSpeed)" + "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", - "log(1 - UpwardSpeed)" + "log(1 - Value)" ] } ] @@ -10320,7 +10982,7 @@ }, { "description": "Upward catch-up speed (in ratio per second)", - "name": "UpwardSpeed", + "name": "Value", "type": "expression" } ], @@ -10371,6 +11033,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Camera configuration", "name": "SetOffsetXOp", "sentence": "", "events": [ @@ -10380,11 +11043,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -10440,7 +11102,7 @@ "Object", "Behavior", "=", - "CameraOffsetX", + "Value", "" ] } @@ -10461,7 +11123,7 @@ }, { "description": "Camera offset X", - "name": "CameraOffsetX", + "name": "Value", "type": "expression" } ], @@ -10512,32 +11174,20 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Camera configuration", "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -10569,6 +11219,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10622,13 +11284,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", - "min(0, ForecastTime)" + "min(0, Value)" ] } ] @@ -10648,7 +11309,7 @@ }, { "description": "Forecast time", - "name": "ForecastTime", + "name": "Value", "type": "expression" } ], @@ -10668,13 +11329,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, CameraDelay)" + "max(0, Value)" ] } ] @@ -10694,7 +11354,7 @@ }, { "description": "Camera delay", - "name": "CameraDelay", + "name": "Value", "type": "expression" } ], @@ -10964,22 +11624,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -11185,22 +11843,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -11263,11 +11919,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -11311,22 +11966,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -11417,11 +12070,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -11463,11 +12115,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -11476,11 +12127,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -11625,11 +12275,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -11682,22 +12331,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11858,22 +12505,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -11913,22 +12558,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -11953,22 +12596,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11982,22 +12623,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12010,11 +12649,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -12039,22 +12677,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12068,22 +12704,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12096,11 +12730,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -12154,44 +12787,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -12205,44 +12834,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -12293,22 +12918,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -12387,22 +13010,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -12489,22 +13110,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -12575,33 +13194,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -12614,33 +13230,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -12701,22 +13314,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -12796,22 +13407,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12824,22 +13433,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -12925,6 +13532,141 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "WaitAndCatchUp" + }, + { + "functionName": "DrawDebug" + }, + { + "folderName": "Camera configuration", + "children": [ + { + "functionName": "SetFollowOnX" + }, + { + "functionName": "SetFollowOnY" + }, + { + "functionName": "SetFollowFreeAreaRight" + }, + { + "functionName": "SetFollowFreeAreaLeft" + }, + { + "functionName": "SetFollowFreeAreaTop" + }, + { + "functionName": "SetFollowFreeAreaBottom" + }, + { + "functionName": "SetLeftwardSpeedMax" + }, + { + "functionName": "SetRightwardSpeedMax" + }, + { + "functionName": "SetUpwardSpeedMax" + }, + { + "functionName": "SetDownwardSpeedMax" + }, + { + "functionName": "SetLeftwardSpeed" + }, + { + "functionName": "SetRightwardSpeed" + }, + { + "functionName": "SetDownwardSpeed" + }, + { + "functionName": "SetUpwardSpeed" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetXOp" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetYOp" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "SetForecastTime" + }, + { + "functionName": "SetCameraDelay" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaLeft" + }, + { + "functionName": "FreeAreaRight" + }, + { + "functionName": "FreeAreaBottom" + }, + { + "functionName": "FreeAreaTop" + }, + { + "functionName": "UpdateDelayedPosition" + }, + { + "functionName": "AddForecastHistoryPosition" + }, + { + "functionName": "UpdateForecastedPosition" + }, + { + "functionName": "ProjectHistoryEnds" + }, + { + "functionName": "ForecastTimeRatio" + } + ] + }, + { + "functionName": "IsDelayed" + }, + { + "functionName": "CurrentDelay" + }, + { + "functionName": "IsWaiting" + } + ] + }, "propertyDescriptors": [ { "value": "0.9", @@ -13287,13 +14029,185 @@ "name": "IsCalledManually" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "LeftwardSpeed" + }, + { + "propertyName": "RightwardSpeed" + }, + { + "propertyName": "UpwardSpeed" + }, + { + "propertyName": "DownwardSpeed" + } + ] + }, + { + "propertyName": "FollowOnX" + }, + { + "propertyName": "FollowOnY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "FollowFreeAreaLeft" + }, + { + "propertyName": "FollowFreeAreaRight" + }, + { + "propertyName": "FollowFreeAreaTop" + }, + { + "propertyName": "FollowFreeAreaBottom" + }, + { + "propertyName": "CameraOffsetX" + }, + { + "propertyName": "CameraOffsetY" + } + ] + }, + { + "folderName": "Timing", + "children": [ + { + "propertyName": "CameraDelay" + }, + { + "propertyName": "ForecastTime" + }, + { + "propertyName": "ForecastHistoryDuration" + } + ] + }, + { + "propertyName": "LogLeftwardSpeed" + }, + { + "propertyName": "LogRightwardSpeed" + }, + { + "propertyName": "LogDownwardSpeed" + }, + { + "propertyName": "LogUpwardSpeed" + }, + { + "propertyName": "DelayedCenterX" + }, + { + "propertyName": "DelayedCenterY" + }, + { + "propertyName": "ForecastHistoryMeanX" + }, + { + "propertyName": "ForecastHistoryMeanY" + }, + { + "propertyName": "ForecastHistoryVarianceX" + }, + { + "propertyName": "ForecastHistoryCovariance" + }, + { + "propertyName": "ForecastHistoryLinearA" + }, + { + "propertyName": "ForecastHistoryLinearB" + }, + { + "propertyName": "ForecastedX" + }, + { + "propertyName": "ForecastedY" + }, + { + "propertyName": "ProjectedNewestX" + }, + { + "propertyName": "ProjectedNewestY" + }, + { + "propertyName": "ProjectedOldestX" + }, + { + "propertyName": "ProjectedOldestY" + }, + { + "propertyName": "ForecastHistoryVarianceY" + }, + { + "propertyName": "Index" + }, + { + "propertyName": "CameraDelayCatchUpSpeed" + }, + { + "propertyName": "CameraExtraDelay" + }, + { + "propertyName": "WaitingSpeedXMax" + }, + { + "propertyName": "WaitingSpeedYMax" + }, + { + "propertyName": "WaitingEnd" + }, + { + "propertyName": "CameraDelayCatchUpDuration" + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "LeftwardSpeedMax" + }, + { + "propertyName": "RightwardSpeedMax" + }, + { + "propertyName": "UpwardSpeedMax" + }, + { + "propertyName": "DownwardSpeedMax" + } + ] + }, + { + "propertyName": "OldX" + }, + { + "propertyName": "OldY" + }, + { + "propertyName": "IsCalledManually" + } + ] + } }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", + "helpPath": "", + "iconUrl": "", "name": "SmoothPlatformerCamera", "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -13510,6 +14424,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13631,7 +14553,71 @@ "name": "FloorDownwardSpeedMax" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PlatformerCharacter" + }, + { + "propertyName": "SmoothCamera" + }, + { + "propertyName": "JumpOriginY" + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "AirFollowFreeAreaTop" + }, + { + "propertyName": "AirFollowFreeAreaBottom" + }, + { + "propertyName": "FloorFollowFreeAreaTop" + }, + { + "propertyName": "FloorFollowFreeAreaBottom" + } + ] + }, + { + "folderName": "Catch-up speed", + "children": [ + { + "propertyName": "AirUpwardSpeed" + }, + { + "propertyName": "AirDownwardSpeed" + }, + { + "propertyName": "FloorUpwardSpeed" + }, + { + "propertyName": "FloorDownwardSpeed" + } + ] + }, + { + "folderName": "Maximum speed", + "children": [ + { + "propertyName": "AirUpwardSpeedMax" + }, + { + "propertyName": "AirDownwardSpeedMax" + }, + { + "propertyName": "FloorUpwardSpeedMax" + }, + { + "propertyName": "FloorDownwardSpeedMax" + } + ] + } + ] + } } ], "eventsBasedObjects": [] @@ -13639,15 +14625,16 @@ { "author": "@4ian", "category": "Game mechanic", + "dimension": "2D/3D", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.9.2", + "shortDescription": "Fire bullets with ammo count, reload timer, and overheat management.", + "version": "0.11.0", "description": [ "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", @@ -13690,13 +14677,124 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//@ts-ignore", + "if (gdjs.__fireBulletExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * It can be built the follow:", + " * ", + " * `objectDefaultRotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2);`", + " * ", + " * `objectDefaultRotation.multiply(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), -Math.PI/2));`", + " * ", + " */", + "const objectDefaultRotation = new THREE.Quaternion(0.5, 0.5, -0.5, 0.5);", + "", + "/**", + " * @param {gdjs.RuntimeObject3D} object", + " */", + "function rotateObjectToFaceSameWayAsCamera(object) {", + " const layer = object.getInstanceContainer().getLayer(object.getLayer());", + " const threeCamera = layer.getRenderer().getThreeCamera();", + " const threeObject = object.get3DRendererObject();", + "", + " threeObject.rotation.copy(threeCamera.rotation);", + " threeObject.rotation.z = -threeObject.rotation.z;", + " threeObject.rotation.x = -threeObject.rotation.x;", + " threeObject.quaternion.multiply(objectDefaultRotation);", + "", + " const {x, y, z } = threeObject.rotation;", + " object.setAngle(gdjs.toDegrees(z));", + " object.setRotationY(gdjs.toDegrees(y));", + " object.setRotationX(gdjs.toDegrees(x));", + "}", + "", + "//@ts-ignore", + "gdjs.__fireBulletExtension = {", + " rotateObjectToFaceSameWayAsCamera", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Rotate the same way as camera", + "functionType": "Action", + "name": "RotateObjectToFaceSameWayAsCamera", + "private": true, + "sentence": "Rotate _PARAM1_ to look the same way as the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "", + "const { rotateObjectToFaceSameWayAsCamera } = gdjs.__fireBulletExtension;", + "", + "rotateObjectToFaceSameWayAsCamera(object);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "RotateObjectToFaceSameWayAsCamera" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Fire bullets with built-in cooldown, ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior actions to fire another object as a bullet. These actions check all constraints internally (can be called without conditions, they will only fire when ready) and will make the bullet move (using a permanent force).", "fullName": "Fire bullets", + "helpPath": "", + "iconUrl": "", "name": "FireBullet", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -15068,6 +16166,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FiringArc", + "group": "Multi-Fire", "name": "SetFiringArcOp", "sentence": "", "events": [ @@ -15201,6 +16300,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AngleVariance", + "group": "Firing variance", "name": "SetAngleVarianceOp", "sentence": "", "events": [ @@ -15334,6 +16434,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletSpeedVariance", + "group": "Firing variance", "name": "SetBulletSpeedVarianceOp", "sentence": "", "events": [ @@ -15467,6 +16568,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "BulletQuantity", + "group": "Multi-Fire", "name": "SetBulletQuantityOp", "sentence": "", "events": [ @@ -15817,6 +16919,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Cooldown", + "group": "Firing", "name": "SetCooldownOp", "sentence": "", "events": [ @@ -15950,6 +17053,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ReloadDuration", + "group": "Reload", "name": "SetReloadDurationOp", "sentence": "", "events": [ @@ -16083,6 +17187,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OverheatDuration", + "group": "Overheat", "name": "SetOverheatDurationOp", "sentence": "", "events": [ @@ -16216,6 +17321,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "AmmoQuantity", + "group": "Ammo", "name": "SetAmmoQuantityOp", "sentence": "", "events": [ @@ -16349,6 +17455,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HeatIncreasePerShot", + "group": "Overheat", "name": "SetHeatPerShotOp", "sentence": "", "events": [ @@ -16482,6 +17589,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxAmmo", + "group": "Ammo", "name": "SetMaxAmmoOp", "sentence": "", "events": [ @@ -16762,6 +17870,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ShotsPerReload", + "group": "Reload", "name": "SetShotsPerReloadOp", "sentence": "", "events": [ @@ -16996,6 +18105,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LinearCoolingRate", + "group": "Overheat", "name": "SetLinearCoolingRateOp", "sentence": "", "events": [ @@ -17129,6 +18239,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ExponentialCoolingRate", + "group": "Overheat", "name": "SetExponentialCoolingRateOp", "sentence": "", "events": [ @@ -18366,26 +19477,324 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ + }, { - "value": "0.1", - "type": "Number", + "description": "Notify that the object has just fired something. This is used by the 3D fire actions.", + "fullName": "Notify has just fired", + "functionType": "Action", + "group": "Firing", + "name": "NotifyHasJustFired", + "private": true, + "sentence": "Notify _PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "FireTowardObject" + }, + { + "functionName": "FireTowardPosition" + }, + { + "functionName": "Fire" + }, + { + "folderName": "Firing", + "children": [ + { + "functionName": "FireSingleBullet" + }, + { + "functionName": "HasJustFired" + }, + { + "functionName": "NotifyHasJustFired" + }, + { + "functionName": "BulletRotationEnabled" + }, + { + "functionName": "SetAngleVariance" + }, + { + "functionName": "SetBulletLayer" + }, + { + "functionName": "SetRotateBullet" + }, + { + "functionName": "Cooldown" + }, + { + "functionName": "SetCooldownOp" + }, + { + "functionName": "SetCooldown" + }, + { + "functionName": "CooldownTimeLeft" + }, + { + "functionName": "IsReadyToShoot" + }, + { + "functionName": "IsFiringCooldownActive" + } + ] + }, + { + "functionName": "ReloadAmmo" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "functionName": "FiringArc" + }, + { + "functionName": "SetFiringArcOp" + }, + { + "functionName": "SetFiringArc" + }, + { + "functionName": "SetBulletSpeedVariance" + }, + { + "functionName": "BulletQuantity" + }, + { + "functionName": "SetBulletQuantityOp" + }, + { + "functionName": "SetBulletQuantity" + }, + { + "functionName": "BulletLayer" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "functionName": "AngleVariance" + }, + { + "functionName": "SetAngleVarianceOp" + }, + { + "functionName": "BulletSpeedVariance" + }, + { + "functionName": "SetBulletSpeedVarianceOp" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "functionName": "SetUnlimitedAmmo" + }, + { + "functionName": "AmmoQuantity" + }, + { + "functionName": "SetAmmoQuantityOp" + }, + { + "functionName": "SetAmmoQuantity" + }, + { + "functionName": "MaxAmmo" + }, + { + "functionName": "SetMaxAmmoOp" + }, + { + "functionName": "SetMaxAmmo" + }, + { + "functionName": "IsUnlimitedAmmo" + }, + { + "functionName": "IsOutOfAmmo" + } + ] + }, + { + "folderName": "Reload", + "children": [ + { + "functionName": "ReloadDuration" + }, + { + "functionName": "SetReloadDurationOp" + }, + { + "functionName": "SetReloadDuration" + }, + { + "functionName": "ShotsPerReload" + }, + { + "functionName": "SetShotsPerReloadOp" + }, + { + "functionName": "SetShotsPerReload" + }, + { + "functionName": "SetAutomaticReload" + }, + { + "functionName": "ShotsBeforeNextReload" + }, + { + "functionName": "ReloadTimeLeft" + }, + { + "functionName": "IsReloadInProgress" + }, + { + "functionName": "IsAutomaticReloadingEnabled" + }, + { + "functionName": "IsReloadNeeded" + } + ] + }, + { + "folderName": "Overheat", + "children": [ + { + "functionName": "OverheatDuration" + }, + { + "functionName": "SetOverheatDurationOp" + }, + { + "functionName": "SetOverheatDuration" + }, + { + "functionName": "HeatIncreasePerShot" + }, + { + "functionName": "SetHeatPerShotOp" + }, + { + "functionName": "SetHeatPerShot" + }, + { + "functionName": "LinearCoolingRate" + }, + { + "functionName": "SetLinearCoolingRateOp" + }, + { + "functionName": "SetLinearCoolingRate" + }, + { + "functionName": "ExponentialCoolingRate" + }, + { + "functionName": "SetExponentialCoolingRateOp" + }, + { + "functionName": "SetExponentialCoolingRate" + }, + { + "functionName": "HeatLevel" + }, + { + "functionName": "OverheatTimeLeft" + }, + { + "functionName": "IsOverheated" + } + ] + }, + { + "folderName": "Stats", + "children": [ + { + "functionName": "ResetTotalShotsFired" + }, + { + "functionName": "ResetTotalBulletsCreated" + }, + { + "functionName": "ResetTotalReloadsCompleted" + }, + { + "functionName": "TotalShotsFired" + }, + { + "functionName": "TotalBulletsCreated" + }, + { + "functionName": "TotalReloadsCompleted" + } + ] + }, + { + "functionName": "IncreaseAmmo" + } + ] + }, + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -18393,9 +19802,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -18405,7 +19811,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -18414,7 +19819,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -18424,7 +19828,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -18435,7 +19838,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -18443,9 +19845,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -18455,7 +19854,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -18466,7 +19864,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -18474,9 +19871,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -18484,9 +19879,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -18495,8 +19887,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -18504,9 +19894,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -18514,9 +19901,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -18524,9 +19909,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -18534,9 +19916,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -18544,9 +19924,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -18556,7 +19933,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -18564,9 +19940,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -18574,9 +19947,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -18587,7 +19958,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -18595,9 +19965,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -18611,6 +19979,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -18620,7 +19989,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -18628,18 +19996,681 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireCooldown" + }, + { + "propertyName": "HasJustFired" + }, + { + "propertyName": "RotateBullet" + }, + { + "folderName": "Multi-Fire", + "children": [ + { + "propertyName": "FiringArc" + }, + { + "propertyName": "BulletQuantity" + } + ] + }, + { + "folderName": "Firing variance", + "children": [ + { + "propertyName": "AngleVariance" + }, + { + "propertyName": "BulletSpeedVariance" + } + ] + }, + { + "propertyName": "AmmoQuantity" + }, + { + "folderName": "Reload", + "children": [ + { + "propertyName": "ShotsPerReload" + }, + { + "propertyName": "ReloadDuration" + }, + { + "propertyName": "AutomaticReloading" + } + ] + }, + { + "folderName": "Ammo", + "children": [ + { + "propertyName": "MaxAmmo" + }, + { + "propertyName": "StartingAmmo" + }, + { + "propertyName": "UnlimitedAmmo" + } + ] + }, + { + "propertyName": "ShotsBeforeNextReload" + }, + { + "propertyName": "TotalShotsFired" + }, + { + "propertyName": "TotalBulletsCreated" + }, + { + "propertyName": "TotalReloadsCompleted" + }, + { + "propertyName": "ReloadInProgress" + }, + { + "folderName": "Overheat", + "children": [ + { + "propertyName": "HeatIncreasePerShot" + }, + { + "propertyName": "OverheatDuration" + }, + { + "propertyName": "LinearCoolingRate" + }, + { + "propertyName": "ExponentialCoolingRate" + } + ] + }, + { + "propertyName": "HeatLevel" + }, + { + "folderName": "Shooting configuration", + "children": [ + { + "propertyName": "BulletLayer" + } + ] + }, + { + "propertyName": "RandomizedAngle" + } + ] + } + }, + { + "description": "Fire bullets using 3D physics.", + "fullName": "3D fire bullet", + "helpPath": "", + "iconUrl": "", + "name": "FireBullet3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Fire bullets from the object at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D object", + "functionType": "Action", + "name": "FireForwardObject3D", + "sentence": "Fire _PARAM5_ from _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "Object.CenterX()", + "=", + "Object.CenterY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::CenterZ()" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardX() + OffsetY * Object.Object3D::RightX() + OffsetZ * Object.Object3D::UpX()" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Object.Object3D::ForwardY() + OffsetY * Object.Object3D::RightY() + OffsetZ * Object.Object3D::UpY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Object.Object3D::ForwardZ() + OffsetY * Object.Object3D::RightZ() + OffsetZ * Object.Object3D::UpZ()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Object.Object3D::ForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Angle()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationY()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Object.Object3D::RotationX()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the object.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the object.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the object.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets from the camera at a specified speed. Call this continuously, the action checks readiness internally — no extra timer or check needed.", + "fullName": "Fire bullets from 3D camera", + "functionType": "Action", + "name": "FireForwardCamera3D", + "sentence": "Fire _PARAM5_ from the camera of _PARAM0_ (if ready) with offset _PARAM2_ ; _PARAM3_ ; _PARAM4_ at speed _PARAM8_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::NotifyHasJustFired" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "0", + "0", + "Object.Layer()" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Bullet", + "=", + "CameraCenterX(Object.Layer())", + "=", + "CameraCenterY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetCenterZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "=", + "Scene3D::CameraZ(Object.Layer())" + ] + }, + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardX(Object.Layer()) + OffsetY * Scene3D::CameraRightX(Object.Layer()) + OffsetZ * Scene3D::CameraUpX(Object.Layer())" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Bullet", + "+", + "OffsetX * Scene3D::CameraForwardY(Object.Layer()) + OffsetY * Scene3D::CameraRightY(Object.Layer()) + OffsetZ * Scene3D::CameraUpY(Object.Layer())" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "Bullet", + "Object3D", + "+", + "OffsetX * Scene3D::CameraForwardZ(Object.Layer()) + OffsetY * Scene3D::CameraRightZ(Object.Layer()) + OffsetZ * Scene3D::CameraUpZ(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Bullet", + "Physics3D", + "=", + "Speed * Scene3D::CameraForwardZ()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::BulletRotationEnabled" + }, + "parameters": [ + "Object", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::RotateObjectToFaceSameWayAsCamera" + }, + "parameters": [ + "", + "Bullet", + "Object3D", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + }, + { + "description": "Forward offset", + "longDescription": "Offset on local X axis of the camera.", + "name": "OffsetX", + "type": "expression" + }, + { + "description": "Offset to the right", + "longDescription": "Offset on local Y axis of the camera.", + "name": "OffsetY", + "type": "expression" + }, + { + "description": "Upward offset", + "longDescription": "Offset on local Z axis of the camera.", + "name": "OffsetZ", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "3D physics engine", + "name": "Physics3D", + "supplementaryInformation": "Physics3D::Physics3DBehavior", + "type": "behavior" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "FireForwardObject3D" + }, + { + "functionName": "FireForwardCamera3D" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "", + "type": "Behavior", + "label": "Fire bullets", + "extraInformation": [ + "FireBullet::FireBullet" + ], + "choices": [], + "name": "FireBullet" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "FireBullet" + }, + { + "propertyName": "Object3D" + } + ] + } } ], "eventsBasedObjects": [] } ], "externalLayouts": [] -} \ No newline at end of file +}