diff --git a/examples/conviction-of-gun-dude-mobile/assets/Round joystick (outer).png b/examples/conviction-of-gun-dude-mobile/assets/Round joystick (outer).png deleted file mode 100644 index a795a9e84..000000000 Binary files a/examples/conviction-of-gun-dude-mobile/assets/Round joystick (outer).png and /dev/null differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/Round joystick.png b/examples/conviction-of-gun-dude-mobile/assets/Round joystick.png deleted file mode 100644 index e91064672..000000000 Binary files a/examples/conviction-of-gun-dude-mobile/assets/Round joystick.png and /dev/null differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Border.png b/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Border.png new file mode 100644 index 000000000..ea28b1934 Binary files /dev/null and b/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Border.png differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Thumb.png b/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Thumb.png new file mode 100644 index 000000000..ba763b4ea Binary files /dev/null and b/examples/conviction-of-gun-dude-mobile/assets/Round_Joystick_Thumb.png differ diff --git a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json index 6ccdc46d0..88ca4aa0c 100644 --- a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json +++ b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json @@ -15,6 +15,7 @@ "projectUuid": "9cac95b9-57f9-404a-9f03-b578b3cb5085", "scaleMode": "nearest", "sizeOnStartupMode": "adaptWidth", + "templateSlug": "", "useExternalSourceFiles": false, "version": "1.0.0", "name": "Conviction of gun dude mobile", @@ -71,10 +72,15 @@ "showGDevelopSplash": true, "showProgressBar": true }, + "watermark": { + "placement": "bottom-left", + "showWatermark": true + }, "authorIds": [ "9MGDlUQAh8QUilno4JPycekjRCJ3", "R0F5QGNCzgOY5w2cxGeKJOq2UaD2" ], + "authorUsernames": [], "categories": [ "action", "shooter", @@ -215,6 +221,7 @@ "name": "PlayerHurt.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -278,6 +285,7 @@ "name": "Dash.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -287,6 +295,7 @@ "name": "Shoot.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -602,6 +611,7 @@ "name": "PickUp.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -620,6 +630,7 @@ "name": "ResetTimer.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -629,6 +640,7 @@ "name": "SceneStartSound.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -638,6 +650,7 @@ "name": "MenuButtomPress.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -647,6 +660,7 @@ "name": "DeathSound.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -656,6 +670,7 @@ "name": "Upgrade.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -665,6 +680,7 @@ "name": "BulletHit.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -674,6 +690,7 @@ "name": "GhostFire.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -683,6 +700,7 @@ "name": "SpiderNoise.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -692,6 +710,7 @@ "name": "ImpStomp.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -701,6 +720,7 @@ "name": "ImpHop.wav", "preloadAsMusic": false, "preloadAsSound": true, + "preloadInCache": false, "userAdded": true }, { @@ -1245,21 +1265,39 @@ }, { "alwaysLoaded": false, - "file": "assets/Round joystick (outer).png", + "file": "assets/Round_Joystick_Thumb.png", "kind": "image", "metadata": "", - "name": "assets\\Round joystick (outer).png", + "name": "assets\\Round_Joystick_Thumb.png", "smoothed": false, - "userAdded": false + "userAdded": true }, { "alwaysLoaded": false, - "file": "assets/Round joystick.png", + "file": "assets/Round_Joystick_Border.png", "kind": "image", "metadata": "", - "name": "assets\\Round joystick.png", + "name": "assets\\Round_Joystick_Border.png", "smoothed": false, - "userAdded": false + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Healthbar.png", + "kind": "image", + "metadata": "", + "name": "assets\\Healthbar.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/HealthbarBorder.png", + "kind": "image", + "metadata": "", + "name": "assets\\HealthbarBorder.png", + "smoothed": false, + "userAdded": true } ], "resourceFolders": [] @@ -1273,9 +1311,6 @@ "disableInputWhenNotFocused": true, "mangledName": "StartMenu", "name": "StartMenu", - "oglFOV": 90, - "oglZFar": 500, - "oglZNear": 1, "r": 5, "standardSortMethod": true, "stopSoundsOnStartup": true, @@ -1349,7 +1384,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "Reset_Button", "persistentUuid": "fa335b84-c239-43bf-adb6-dd7fa7ee2411", "width": 0, @@ -1365,7 +1399,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "Reset_Timer", "persistentUuid": "e1652d74-e4b0-4e75-83e4-154f3dfaff61", "width": 0, @@ -1379,6 +1412,7 @@ ], "objects": [ { + "assetStoreId": "", "bold": false, "italic": false, "name": "Reset_Timer", @@ -1409,6 +1443,7 @@ ], "string": "3", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 100, "color": { "b": 255, @@ -1417,6 +1452,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Reset_Button", @@ -1447,6 +1483,7 @@ ], "string": "Tap To Begin", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 40, "color": { "b": 255, @@ -1470,31 +1507,26 @@ "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Button", "=", "(SceneWindowWidth()/2)-(Reset_Button.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -1507,21 +1539,17 @@ "0.3", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Cache" }, "parameters": [ "Reset_Timer" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -1553,62 +1581,51 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Reset_Button", ">", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MouseButtonReleased" }, "parameters": [ "", "Left" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Reset_Button", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"Start\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -1617,11 +1634,9 @@ "", "30", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -1641,64 +1656,53 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Reset_Button", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "Montre" }, "parameters": [ "Reset_Timer", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Reset_Timer", "=", "\"3\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Timer", "=", "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -1707,12 +1711,10 @@ "", "30", "0.8" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -1725,46 +1727,38 @@ "0.08", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Wait" }, "parameters": [ "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Reset_Timer", "=", "\"2\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Timer", "=", "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -1773,12 +1767,10 @@ "", "40", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -1791,46 +1783,38 @@ "0.08", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Wait" }, "parameters": [ "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Reset_Timer", "=", "\"1\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Timer", "=", "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -1839,12 +1823,10 @@ "", "50", "1.2" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -1857,33 +1839,27 @@ "0.08", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Wait" }, "parameters": [ "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Scene" }, "parameters": [ "", "\"MainGame\"", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -1925,9 +1901,6 @@ "disableInputWhenNotFocused": true, "mangledName": "MainGame", "name": "MainGame", - "oglFOV": 90, - "oglZFar": 500, - "oglZNear": 1, "r": 209, "standardSortMethod": true, "stopSoundsOnStartup": true, @@ -1943,7 +1916,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.5849999999999964, + "zoomFactor": 1.169999999999991, "windowMask": false }, "objectsGroups": [ @@ -2172,7 +2145,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "Room", "persistentUuid": "0b9fe34e-ab91-4412-8e66-72298d075b06", "width": 0, @@ -2194,7 +2166,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "Wesley", "persistentUuid": "f53df694-7155-4623-a2b9-163fbeee3443", "width": 0, @@ -2210,7 +2181,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "Gun", "persistentUuid": "56154a5a-8df4-4aa3-8710-ae73cecb39a7", "width": 0, @@ -2226,7 +2196,6 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, "name": "RoomFloor", "persistentUuid": "8956de32-a61a-497c-adf9-91b24a68f473", "width": 0, @@ -2237,44 +2206,11 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "UI", - "locked": false, - "name": "HealthBarBorder", - "persistentUuid": "3c102326-6892-444f-ae81-a1ff478c4f6b", - "width": 0, - "x": 16, - "y": 14, - "zOrder": 5, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "UI", - "locked": false, - "name": "HealthBar", - "persistentUuid": "2d2b8d3a-41f3-48cb-9a4c-6d6d004af32c", - "width": 0, - "x": 20, - "y": 20, - "zOrder": 6, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": true, "height": 24, "layer": "UI", - "locked": false, "name": "DangerLevel", "persistentUuid": "11fcaf83-fa8d-4cae-83e1-e7038189ba72", "width": 576, @@ -2290,7 +2226,6 @@ "customSize": true, "height": 24, "layer": "UI", - "locked": false, "name": "TotalPoints", "persistentUuid": "28a5f0a9-ccd9-48b5-a306-6f84224e286e", "width": 432, @@ -2306,7 +2241,6 @@ "customSize": true, "height": 24, "layer": "UI", - "locked": false, "name": "DangerLevelCount", "persistentUuid": "b41f42da-cd80-4bda-b62d-2779e343d17d", "width": 352, @@ -2322,7 +2256,6 @@ "customSize": true, "height": 24, "layer": "UI", - "locked": false, "name": "TotalPointsCount", "persistentUuid": "bcc1d70d-6814-4717-bb7e-b6c45d17583b", "width": 256, @@ -2333,28 +2266,11 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "UI", - "locked": false, - "name": "HealthText", - "persistentUuid": "550a8b3b-971c-4fc1-bb4a-00c1a363e738", - "width": 0, - "x": 96, - "y": 18, - "zOrder": 34, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, "height": 0, "layer": "Reset", - "locked": false, "name": "Reset_Button", "persistentUuid": "fa335b84-c239-43bf-adb6-dd7fa7ee2411", "width": 0, @@ -2370,7 +2286,6 @@ "customSize": false, "height": 0, "layer": "Reset", - "locked": false, "name": "Reset_Leaderboard", "persistentUuid": "8f6b7562-87ea-470f-95cb-9a44481cb0dd", "width": 0, @@ -2386,7 +2301,6 @@ "customSize": true, "height": 458, "layer": "Reset", - "locked": false, "name": "Darkening", "persistentUuid": "58a8fb2d-962a-436f-8699-d0cc79b4d5d8", "width": 832, @@ -2402,7 +2316,6 @@ "customSize": false, "height": 0, "layer": "Reset", - "locked": false, "name": "Reset_Timer", "persistentUuid": "e1652d74-e4b0-4e75-83e4-154f3dfaff61", "width": 0, @@ -2418,7 +2331,6 @@ "customSize": true, "height": 64, "layer": "Leaderboard", - "locked": false, "name": "LeaderboardName_Input", "persistentUuid": "27116521-c548-46a5-bb3b-bdab97eda937", "width": 448, @@ -2434,7 +2346,6 @@ "customSize": false, "height": 0, "layer": "Leaderboard", - "locked": false, "name": "Leaderboard_Submit", "persistentUuid": "9ee9148e-2b2f-4305-9a8b-9aa125924718", "width": 0, @@ -2450,7 +2361,6 @@ "customSize": true, "height": 458, "layer": "PauseLayer", - "locked": false, "name": "Darkening", "persistentUuid": "39d024ce-ec08-452b-9dff-42acdb2aa15a", "width": 1200, @@ -2466,7 +2376,6 @@ "customSize": false, "height": 0, "layer": "PauseLayer", - "locked": false, "name": "Pause_Text", "persistentUuid": "81f62272-d8cd-48e7-8abf-742cb31979d0", "width": 0, @@ -2482,7 +2391,6 @@ "customSize": true, "height": 28, "layer": "PauseLayer", - "locked": false, "name": "Upgrade_Text", "persistentUuid": "7f0d45ed-2e59-4d17-b2de-7266630ac643", "width": 384, @@ -2498,7 +2406,6 @@ "customSize": false, "height": 0, "layer": "UI", - "locked": false, "name": "HelpIcon", "persistentUuid": "7163d9a4-e47a-4e40-a425-6c4072908f4d", "width": 0, @@ -2514,7 +2421,6 @@ "customSize": false, "height": 0, "layer": "MobileCovering", - "locked": false, "name": "MobileCovering", "persistentUuid": "3d7ea299-0ede-459b-9f10-7f8b4832458f", "width": 0, @@ -2527,32 +2433,45 @@ }, { "angle": 0, - "customSize": true, - "height": 120, - "layer": "MobileControls", - "locked": false, - "name": "RoundJoystickOuter_RIGHT", - "persistentUuid": "45789476-108e-46bb-995b-51e757547725", - "width": 120, - "x": 668, - "y": 316, - "zOrder": 52, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthBar", + "persistentUuid": "a3b491bb-fcf8-4a89-b854-ec53fdb4f112", + "width": 0, + "x": 16, + "y": 14, + "zOrder": 54, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": true, - "height": 120, - "layer": "MobileControls", - "locked": false, - "name": "RoundJoystickOuter_LEFT", - "persistentUuid": "f9e4405e-44fd-4010-8bed-9ad8d65c8da6", - "width": 120, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MovementJoystick", + "persistentUuid": "16f76df3-5035-4b87-950d-5128c3f6e49b", + "width": 0, "x": 100, "y": 316, - "zOrder": 53, + "zOrder": 55, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "AimingJoystick", + "persistentUuid": "c56669b1-4a73-40bd-836e-16852193c57a", + "width": 0, + "x": 668, + "y": 316, + "zOrder": 56, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -2560,6 +2479,7 @@ ], "objects": [ { + "assetStoreId": "", "name": "RoomTraps", "tags": "", "type": "Sprite", @@ -2907,6 +2827,7 @@ ] }, { + "assetStoreId": "", "name": "RoomDoors", "tags": "", "type": "Sprite", @@ -3980,6 +3901,7 @@ ] }, { + "assetStoreId": "", "name": "RoomFloor", "tags": "", "type": "Sprite", @@ -4857,6 +4779,7 @@ ] }, { + "assetStoreId": "", "name": "Room", "tags": "", "type": "Sprite", @@ -5680,6 +5603,7 @@ ] }, { + "assetStoreId": "", "name": "Wesley", "tags": "", "type": "Sprite", @@ -6067,6 +5991,7 @@ ] }, { + "assetStoreId": "", "name": "Gun", "tags": "", "type": "Sprite", @@ -6148,6 +6073,7 @@ ] }, { + "assetStoreId": "", "name": "Imp", "tags": "", "type": "Sprite", @@ -7220,6 +7146,7 @@ ] }, { + "assetStoreId": "", "name": "Spider", "tags": "", "type": "Sprite", @@ -8144,6 +8071,7 @@ ] }, { + "assetStoreId": "", "name": "Ghost", "tags": "", "type": "Sprite", @@ -8942,6 +8870,7 @@ ] }, { + "assetStoreId": "", "name": "GhostOrb", "tags": "", "type": "Sprite", @@ -9027,6 +8956,7 @@ ] }, { + "assetStoreId": "", "name": "Bullet", "tags": "", "type": "Sprite", @@ -9099,6 +9029,7 @@ ] }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "UpgradeText", @@ -9111,6 +9042,7 @@ "behaviors": [], "string": "Text", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 10, "color": { "b": 255, @@ -9119,6 +9051,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "EnemyDamageText", @@ -9131,6 +9064,7 @@ "behaviors": [], "string": "Text", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 10, "color": { "b": 4, @@ -9140,6 +9074,7 @@ }, { "additive": false, + "assetStoreId": "", "destroyWhenNoParticles": false, "emitterAngleA": 0, "emitterAngleB": 0, @@ -9184,6 +9119,7 @@ }, { "additive": false, + "assetStoreId": "", "destroyWhenNoParticles": false, "emitterAngleA": 0, "emitterAngleB": 0, @@ -9228,6 +9164,7 @@ }, { "additive": false, + "assetStoreId": "", "destroyWhenNoParticles": true, "emitterAngleA": 0, "emitterAngleB": 0, @@ -9271,86 +9208,73 @@ "behaviors": [] }, { - "name": "HealthBarBorder", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "HealthbarBorder.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - { + "assetStoreId": "3d6c54e76a9a06cbd7629c1e78388d4ab808bbf36d644c61d6a14c9ad34d4f89", "name": "HealthBar", "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, + "type": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", "variables": [], "effects": [], "behaviors": [], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Healthbar.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] + "content": { + "PreviousHighValueDuration": 0, + "ShowLabel": true, + "BarTopPadding": 4, + "BarBottomPadding": 6, + "BarLeftPadding": 4, + "BarRightPadding": 4, + "MaxValue": 6, + "InitialValue": 6 + }, + "childrenContent": { + "Background": { + "bottomMargin": 6, + "height": 34, + "leftMargin": 4, + "rightMargin": 4, + "texture": "assets\\HealthbarBorder.png", + "tiled": true, + "topMargin": 6, + "width": 224 + }, + "Buffer": { + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\Healthbar.png", + "tiled": true, + "topMargin": 0, + "width": 24 + }, + "FillBar": { + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\Healthbar.png", + "tiled": true, + "topMargin": 0, + "width": 24 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "6 / 6", + "font": "PTSans-Bold.ttf", + "textAlignment": "center", + "characterSize": 22, + "color": { + "b": 255, + "g": 255, + "r": 255 + } } - ] + } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Debug", @@ -9363,6 +9287,7 @@ "behaviors": [], "string": "Text", "font": "", + "textAlignment": "", "characterSize": 20, "color": { "b": 255, @@ -9371,6 +9296,7 @@ } }, { + "assetStoreId": "", "name": "UpgradeIcons", "tags": "", "type": "Sprite", @@ -9640,6 +9566,7 @@ ] }, { + "assetStoreId": "", "name": "Upgrades", "tags": "", "type": "Sprite", @@ -9918,6 +9845,7 @@ ] }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "TotalPointsCount", @@ -9935,6 +9863,7 @@ ], "string": "0", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 22, "color": { "b": 255, @@ -9943,6 +9872,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "TotalPoints", @@ -9960,6 +9890,7 @@ ], "string": "Total Points:", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 22, "color": { "b": 255, @@ -9968,6 +9899,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "DangerLevelCount", @@ -9985,6 +9917,7 @@ ], "string": "0", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 22, "color": { "b": 255, @@ -9993,6 +9926,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "DangerLevel", @@ -10010,6 +9944,7 @@ ], "string": "Danger Level:", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 22, "color": { "b": 255, @@ -10018,31 +9953,7 @@ } }, { - "bold": false, - "italic": false, - "name": "HealthText", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" - } - ], - "string": "6/6", - "font": "PTSans-Bold.ttf", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - { + "assetStoreId": "", "name": "Pick_Ups", "tags": "", "type": "Sprite", @@ -10127,6 +10038,7 @@ ] }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Reset_Timer", @@ -10157,6 +10069,7 @@ ], "string": "3", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 100, "color": { "b": 255, @@ -10165,6 +10078,7 @@ } }, { + "assetStoreId": "", "bold": true, "italic": true, "name": "Leaderboard_Submit", @@ -10195,6 +10109,7 @@ ], "string": "Submit Score", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 40, "color": { "b": 255, @@ -10203,6 +10118,7 @@ } }, { + "assetStoreId": "", "bold": true, "italic": true, "name": "Reset_Leaderboard", @@ -10233,6 +10149,7 @@ ], "string": "Submit Score?", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 40, "color": { "b": 255, @@ -10241,6 +10158,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Reset_Button", @@ -10271,6 +10189,7 @@ ], "string": "Reset?", "font": "PTSans-Bold.ttf", + "textAlignment": "", "characterSize": 40, "color": { "b": 255, @@ -10279,6 +10198,7 @@ } }, { + "assetStoreId": "", "name": "Darkening", "tags": "", "type": "Sprite", @@ -10319,6 +10239,7 @@ ] }, { + "assetStoreId": "", "name": "LeaderboardName_Input", "tags": "", "type": "TextInput::TextInputObject", @@ -10342,6 +10263,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Pause_Text", @@ -10354,6 +10276,7 @@ "behaviors": [], "string": "Touch upgrade to see it's effect.\n", "font": "", + "textAlignment": "", "characterSize": 25, "color": { "b": 255, @@ -10362,6 +10285,7 @@ } }, { + "assetStoreId": "", "bold": false, "italic": false, "name": "Upgrade_Text", @@ -10374,6 +10298,7 @@ "behaviors": [], "string": " ", "font": "", + "textAlignment": "", "characterSize": 25, "color": { "b": 255, @@ -10382,6 +10307,7 @@ } }, { + "assetStoreId": "", "name": "HelpIcon", "tags": "", "type": "Sprite", @@ -10433,6 +10359,7 @@ ] }, { + "assetStoreId": "", "name": "MobileCovering", "tags": "", "type": "Sprite", @@ -10473,170 +10400,177 @@ ] }, { - "name": "RoundJoystickOuter_RIGHT", + "assetStoreId": "", + "name": "MovementJoystick", "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, + "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variables": [], "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "behaviors": [], + "content": {}, + "childrenContent": { + "Border": { + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Round_Joystick_Border.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, - { - "name": "MultitouchJoystick", - "type": "MultitouchJoystick::MultitouchJoystick", - "JoystickAngle": 0, - "JoystickForce": 0, - "IsPressed": false, - "TouchID": 0, - "TouchDistance": 0, - "FloatingEnabled": false, - "ButtonReleased": false, - "TouchCounter": 0 - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\Round joystick (outer).png", - "points": [], - "originPoint": { - "name": "origine", - "x": 80, - "y": 80 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] + "Thumb": { + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Round_Joystick_Thumb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] } ] } ] } - ] + } }, { - "name": "RoundJoystickOuter_LEFT", + "assetStoreId": "", + "name": "AimingJoystick", "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, + "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variables": [], "effects": [], "behaviors": [ { - "name": "MultitouchJoystick", - "type": "MultitouchJoystick::MultitouchJoystick", - "JoystickAngle": 0, - "JoystickForce": 0, - "IsPressed": false, - "TouchID": 0, - "TouchDistance": 0, - "FloatingEnabled": false, - "ButtonReleased": false, - "TouchCounter": 0 + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\Round joystick (outer).png", - "points": [], - "originPoint": { - "name": "origine", - "x": 80, - "y": 80 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] + "content": { + "JoystickIdentifier": "Secondary" + }, + "childrenContent": { + "Border": { + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Round_Joystick_Border.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] } ] } ] - } - ] - }, - { - "name": "RoundJoystick", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchButton", - "type": "MultitouchJoystick::MultitouchButton", - "IsPressed": false, - "TouchID": 0, - "TouchDistance": 0, - "TouchCounter": 0, - "IsReleased": false - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\Round joystick.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] + }, + "Thumb": { + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Round_Joystick_Thumb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] } ] } ] } - ] + } } ], "events": [ @@ -10649,37 +10583,21 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "When level starts, create 3 upgrade objects and apply effects.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -10688,18 +10606,40 @@ "", "30", "1" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetMaxValue" + }, + "parameters": [ + "HealthBar", + "=", + "Variable(CharacterStats.Health)", + "" + ] } ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When level starts, create 3 upgrade objects.", + "comment2": "" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -10708,12 +10648,10 @@ "RoomFloor.X()-64", "RoomFloor.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -10722,12 +10660,10 @@ "RoomFloor.X()+64", "RoomFloor.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -10736,11 +10672,9 @@ "RoomFloor.X()", "RoomFloor.Y()", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -10762,19 +10696,16 @@ "actions": [ { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "Upgrades", "=", "RandomInRange(0,4)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -10788,35 +10719,29 @@ "1", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Upgrades", "=", "200" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Upgrades", "=", "Upgrades.Y()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -10838,31 +10763,26 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Upgrades", "=", "2" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Upgrades", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -10894,19 +10814,16 @@ "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -10914,12 +10831,10 @@ "1.5", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -10927,23 +10842,19 @@ "1.5", "\"MobileCovering\"", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SceneBackground" }, "parameters": [ "", "\"24;20;37\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCameraY" }, "parameters": [ @@ -10952,12 +10863,10 @@ "RoomFloor.Y()", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCameraX" }, "parameters": [ @@ -10966,34 +10875,18 @@ "RoomFloor.X()", "", "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "HealthText", - "=", - "HealthBarBorder.X()+(HealthBarBorder.Width()/2)-(HealthText.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TouchSimulateMouse" }, "parameters": [ "", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11014,7 +10907,6 @@ "actions": [ { "type": { - "inverted": false, "value": "CentreCamera" }, "parameters": [ @@ -11023,11 +10915,9 @@ "", "\"MobileCovering\"", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11047,7 +10937,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "PickNearest" }, "parameters": [ @@ -11055,26 +10944,22 @@ "Wesley.X()", "Wesley.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetCameraX" }, "parameters": [ @@ -11083,12 +10968,10 @@ "lerp(CameraX(),RoomFloor.X(),0.05)", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCameraY" }, "parameters": [ @@ -11097,8 +10980,7 @@ "lerp(CameraY(),RoomFloor.Y(),0.05)", "", "" - ], - "subInstructions": [] + ] } ], "events": [ @@ -11120,44 +11002,37 @@ "conditions": [ { "type": { - "inverted": false, "value": "TimeScale" }, "parameters": [ "", "=", "0.05" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ "DistanceBetweenPositions(CameraX(), CameraY(), RoomFloor.X(), RoomFloor.Y())", "<", "5" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeTimeScale" }, "parameters": [ "", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -11165,11 +11040,9 @@ "WalkInDirection", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -11191,15 +11064,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ "DistanceBetweenPositions(CameraX(), CameraY(), RoomFloor.X(), RoomFloor.Y())", ">=", "5" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -11222,7 +11093,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -11230,14 +11100,12 @@ "WalkInDirection", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -11245,18 +11113,15 @@ "0", "-500", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -11264,14 +11129,12 @@ "WalkInDirection", "=", "2" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -11279,18 +11142,15 @@ "0", "500", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -11298,14 +11158,12 @@ "WalkInDirection", "=", "3" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -11313,18 +11171,15 @@ "-400", "0", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -11332,14 +11187,12 @@ "WalkInDirection", "=", "4" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -11347,11 +11200,9 @@ "400", "0", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -11385,7 +11236,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "PickNearest" }, "parameters": [ @@ -11393,8 +11243,7 @@ "Wesley.X()", "Wesley.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { @@ -11405,54 +11254,45 @@ "RoomFloor", "Wesley.X()", "Wesley.Y()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "DangerLevel", "+", "0.5" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "DangerLevelRounded", "=", "floor(Variable(DangerLevel))" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "DangerLevelCount", "=", "VariableString(DangerLevelRounded)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -11474,57 +11314,48 @@ "conditions": [ { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "Wesley", "<=", "RoomFloor.Y() - 50" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaY", "=", "-RoomFloor.Height()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomAnimation", "=", "Random(1)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -11532,11 +11363,9 @@ "WalkInDirection", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11556,57 +11385,48 @@ "conditions": [ { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "Wesley", ">=", "RoomFloor.Y() + 50" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaY", "=", "RoomFloor.Height()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomAnimation", "=", "RandomWithStep(0,2,2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -11614,11 +11434,9 @@ "WalkInDirection", "=", "2" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11638,57 +11456,48 @@ "conditions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Wesley", "<=", "RoomFloor.X() - 50" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaX", "=", "-RoomFloor.Width()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomAnimation", "=", "RandomWithStep(0,3,3)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -11696,11 +11505,9 @@ "WalkInDirection", "=", "3" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11720,57 +11527,48 @@ "conditions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Wesley", ">=", "RoomFloor.X() + 50" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaX", "=", "RoomFloor.Width()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomDeltaY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "NewRoomAnimation", "=", "RandomWithStep(0,3,3)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -11778,11 +11576,9 @@ "WalkInDirection", "=", "4" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11803,7 +11599,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -11812,12 +11607,10 @@ "RoomFloor.X() + Variable(NewRoomDeltaX)", "RoomFloor.Y() + Variable(NewRoomDeltaY)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -11826,12 +11619,10 @@ "Room.X()", "Room.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -11840,12 +11631,10 @@ "Room.X()", "Room.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -11854,44 +11643,37 @@ "Room.X()", "Room.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Room", "=", "Room.Y() - 100" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "RoomDoors", "=", "Room.Y() - 99" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "RoomTraps", "=", "RandomInRange(0,4)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -11913,7 +11695,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "PickNearest" }, "parameters": [ @@ -11921,49 +11702,41 @@ "Wesley.X()", "Wesley.Y()", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "Room", "=", "Variable(NewRoomAnimation)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "RoomDoors", "=", "Room.Animation()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "RoomFloor", "=", "Room.Animation()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -11983,33 +11756,28 @@ "conditions": [ { "type": { - "inverted": false, "value": "Animation" }, "parameters": [ "RoomTraps", ">=", "3" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Animation" }, "parameters": [ "RoomTraps", "<=", "4" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12018,24 +11786,20 @@ "RoomTraps.X()", "RoomTraps.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeAnimation" }, "parameters": [ "Upgrades", "=", "RandomInRange(0,4)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -12049,35 +11813,29 @@ "1", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Upgrades", "=", "200" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Upgrades", "=", "Upgrades.Y()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -12098,28 +11856,23 @@ "actions": [ { "type": { - "inverted": false, "value": "Arreter" }, "parameters": [ "Wesley" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ActivateBehavior" }, "parameters": [ "Wesley", "TopDownMovement", "yes" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -12141,18 +11894,15 @@ "conditions": [ { "type": { - "inverted": false, "value": "AjoutObjConcern" }, "parameters": [ "", "RoomFloor" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PickNearest" }, "parameters": [ @@ -12160,20 +11910,17 @@ "Wesley.X()", "Wesley.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -12196,15 +11943,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", "<", "3" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -12214,21 +11959,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12237,32 +11979,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12271,32 +12008,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "2" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12305,12 +12037,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12319,11 +12049,9 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -12345,15 +12073,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", "<", "7" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -12363,21 +12089,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "3" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12386,12 +12109,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12400,12 +12121,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12414,32 +12133,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "4" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12448,12 +12162,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12462,32 +12174,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "5" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12496,32 +12203,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "6" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12530,12 +12232,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12544,11 +12244,9 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -12570,21 +12268,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "7" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12593,12 +12288,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12607,12 +12300,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12621,32 +12312,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "8" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12655,12 +12341,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12669,32 +12353,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "9" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12703,32 +12382,27 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarScene" }, "parameters": [ "DangerLevel", ">=", "10" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12737,12 +12411,10 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -12751,11 +12423,9 @@ "RandomWithStep((RoomFloor.X()-120),(RoomFloor.X()+120),60)", "RandomWithStep((RoomFloor.Y()-50),(RoomFloor.Y()+50),22)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -12777,7 +12447,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Health::Health::SetHealth" }, "parameters": [ @@ -12785,11 +12454,9 @@ "Health", "Enemies.Health::Health()*Variable(DangerLevelRounded)", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -12811,31 +12478,26 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeTimeScale" }, "parameters": [ "", "0.05" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -12857,15 +12519,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -12881,58 +12541,49 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "RoomTraps", ">", "Wesley.X()+260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "RoomTraps", "<", "Wesley.X()-260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "RoomTraps", "<", "Wesley.Y()-167" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "RoomTraps", ">", "Wesley.Y()+167" - ], - "subInstructions": [] + ] } ] } @@ -12940,75 +12591,63 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "RoomTraps", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Room", ">", "Wesley.X()+260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Room", "<", "Wesley.X()-260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "Room", "<", "Wesley.Y()-167" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "Room", ">", "Wesley.Y()+167" - ], - "subInstructions": [] + ] } ] } @@ -13016,75 +12655,63 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Room", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "RoomFloor", ">", "Wesley.X()+260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "RoomFloor", "<", "Wesley.X()-260" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "RoomFloor", "<", "Wesley.Y()-167" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PosY" }, "parameters": [ "RoomFloor", ">", "Wesley.Y()+167" - ], - "subInstructions": [] + ] } ] } @@ -13092,17 +12719,14 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "RoomFloor", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -13124,15 +12748,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Enemies", "<=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -13143,49 +12765,41 @@ "actions": [ { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "RoomDoors", "-", "300*TimeDelta()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "RoomDoors", "<=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "RoomDoors", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -13223,18 +12837,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Entities", "=", "Entities.Y()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -13255,18 +12866,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Gun", "=", "Wesley.Y()+1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -13288,18 +12896,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "RoomFloor", "=", "RoomFloor.Y()-3000" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -13321,18 +12926,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "RoomTraps", "=", "RoomFloor.Y()-2000" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -13365,30 +12967,25 @@ "actions": [ { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Wesley", "Room", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Wesley", "RoomDoors", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -13409,7 +13006,6 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreXY" }, "parameters": [ @@ -13418,11 +13014,9 @@ "Wesley.PointX(\"GunSpot\")", "=", "Wesley.PointY(\"GunSpot\")" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -13451,7 +13045,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "Distance" }, "parameters": [ @@ -13459,14 +13052,12 @@ "Pick_Ups", "80", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceVersPos" }, "parameters": [ @@ -13475,8 +13066,7 @@ "Wesley.Y()", "100", "" - ], - "subInstructions": [] + ] } ], "events": [ @@ -13498,7 +13088,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "Distance" }, "parameters": [ @@ -13506,14 +13095,12 @@ "Pick_Ups", "10", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -13522,12 +13109,10 @@ "", "10", "Wesley.Variable(PickUpPitch)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -13535,8 +13120,7 @@ "PickUpPitch", "+", "0.05" - ], - "subInstructions": [] + ] } ], "events": [ @@ -13558,38 +13142,32 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Pick_Ups", "\"HealthOrb\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Pick_Ups", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Wesley", "\"PickUpPitch\"" - ], - "subInstructions": [] + ] } ], "events": [ @@ -13598,22 +13176,20 @@ "conditions": [ { "type": { - "inverted": false, - "value": "VarObjet" + "value": "Health::Health::Health" }, "parameters": [ "Wesley", "Health", "<", - "Variable(CharacterStats.Health)" - ], - "subInstructions": [] + "Variable(CharacterStats.Health)", + "" + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Health::Health::Heal" }, "parameters": [ @@ -13621,16 +13197,14 @@ "Health", "ceil(Variable(CharacterStats.Health)/10)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ - "HealthText", + "HealthBar", "ShakeObject_PositionAngle", "0.5", "8", @@ -13639,31 +13213,20 @@ "0.1", "", "" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + }, + "parameters": [ + "HealthBar", + "=", + "Wesley.Health::Health()", + "" + ] } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 5, - "g": 117, - "r": 65, - "textB": 255, - "textG": 255, - "textR": 255 - }, - "comment": "Change the width of the HealthBar, and the text of the HealthText by using the health variable in the \"Health\" behavior applied to the player object divided by the scene variable CharacterStats.Health which are acting as the current and maximum health for this game.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Healthbar_Changing" + ] } ] }, @@ -13685,55 +13248,46 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Pick_Ups", "\"PointOrb\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Pick_Ups", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "PointCount", "+", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "TotalPointsCount", "=", "ToString(Variable(PointCount))" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -13746,11 +13300,9 @@ "0.1", "", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -13774,7 +13326,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -13782,14 +13333,12 @@ "\"PickUpPitch\"", ">", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -13797,22 +13346,18 @@ "PickUpPitch", "=", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "RemoveObjectTimer" }, "parameters": [ "Wesley", "\"PickUpPitch\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -13844,7 +13389,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -13853,22 +13397,12 @@ "", "", "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -13877,8 +13411,7 @@ "", "35", "0.8" - ], - "subInstructions": [] + ] } ], "events": [ @@ -13900,50 +13433,35 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Upgrades", "\"HealthUp\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.Health", "+", "3" - ], - "subInstructions": [] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 5, - "g": 117, - "r": 65, - "textB": 255, - "textG": 255, - "textR": 255 - }, - "comment": "Change the width of the HealthBar, and the text of the HealthText by using the health variable in the \"Health\" behavior applied to the player object divided by the scene variable CharacterStats.Health which are acting as the current and maximum health for this game.", - "comment2": "" + ] }, { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetMaxValue" }, - "target": "Healthbar_Changing" + "parameters": [ + "HealthBar", + "=", + "Variable(CharacterStats.Health)", + "" + ] } ] }, @@ -13965,31 +13483,26 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Upgrades", "\"Armor\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.Defense", "+", "2" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14009,43 +13522,36 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Upgrades", "\"FireRate\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.FireRate", "*", "0.85" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Wesley", "UpgradeToggle", "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14065,43 +13571,36 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Upgrades", "\"Power\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.Power", "+", "2" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Wesley", "UpgradeToggle", "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14121,43 +13620,36 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Upgrades", "\"Speed\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.Speedcap", "+", "0.5" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "CharacterStats.SpeedMax", "+", "12/Variable(CharacterStats.Speedcap)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14178,7 +13670,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -14187,23 +13678,19 @@ "16+(32*(SceneInstancesCount(UpgradeIcons)))", "64", "\"UI\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "UpgradeIcons", "Upgrades.AnimationName()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -14217,11 +13704,9 @@ "0.1", "", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14242,17 +13727,14 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Upgrades", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -14269,179 +13751,41 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Multitouch Joystick", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the player is not in the middle of a force movement between rooms (during camera movement) allow player movement and gun control.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "VarObjet" }, - "comment": "Run the Multitouch Joystick extension every frame", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::ActivateJoystick" - }, - "parameters": [ - "RoundJoystickOuter_RIGHT", - "MultitouchJoystick", - "RoundJoystick", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::ActivateJoystick" - }, - "parameters": [ - "RoundJoystickOuter_LEFT", - "MultitouchJoystick", - "RoundJoystick", - "" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Wesley", + "WalkInDirection", + "=", + "0" + ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Modify size of joystick objects", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeScale" - }, - "parameters": [ - "RoundJoystick", - "=", - "0.9" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeScale" - }, - "parameters": [ - "RoundJoystickOuter_RIGHT", - "=", - "0.8" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeScale" - }, - "parameters": [ - "RoundJoystickOuter_LEFT", - "=", - "0.8" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Opacity" - }, - "parameters": [ - "RoundJoystick", - "=", - "200" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If the player is not in the middle of a force movement between rooms (during camera movement) allow player movement and gun control.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarObjet" - }, - "parameters": [ - "Wesley", - "WalkInDirection", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": true, - "value": "LayerVisible" + "type": { + "inverted": true, + "value": "LayerVisible" }, "parameters": [ "", "\"PauseLayer\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -14482,33 +13826,27 @@ "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" }, "parameters": [ - "RoundJoystickOuter_LEFT", - "MultitouchJoystick", + "MovementJoystick", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ "Wesley", - "RoundJoystickOuter_LEFT.MultitouchJoystick::JoystickAngle()", - "Variable(CharacterStats.SpeedMax)* RoundJoystickOuter_LEFT.MultitouchJoystick::JoystickForce()", + "MovementJoystick.JoystickAngle()", + "Variable(CharacterStats.SpeedMax)* MovementJoystick.JoystickForce()", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -14545,69 +13883,56 @@ }, "parameters": [ "Wesley" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Wesley", "\"Run\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "Arret" }, "parameters": [ "Wesley" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Wesley", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -14642,29 +13967,24 @@ "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"FireRate\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -14694,18 +14014,15 @@ "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Gun", "=", - "RoundJoystickOuter_RIGHT.MultitouchJoystick::JoystickAngle()" - ], - "subInstructions": [] + "AimingJoystick.JoystickAngle()" + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -14725,86 +14042,70 @@ "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::DirectionPushed" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "RoundJoystickOuter_RIGHT", - "MultitouchJoystick", - "\"Left\"", - "" - ], - "subInstructions": [] + "abs(AngleDifference(180, AimingJoystick.JoystickAngle()))", + "<", + "90" + ] } ], "actions": [ { "type": { - "inverted": false, "value": "FlipY" }, "parameters": [ "Gun", "yes" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "FlipX" }, "parameters": [ "Wesley", "yes" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::DirectionPushed" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "RoundJoystickOuter_RIGHT", - "MultitouchJoystick", - "\"Right\"", - "" - ], - "subInstructions": [] + "abs(AngleDifference(0, AimingJoystick.JoystickAngle()))", + "<", + "90" + ] } ], "actions": [ { "type": { - "inverted": false, "value": "FlipY" }, "parameters": [ "Gun", "no" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "FlipX" }, "parameters": [ "Wesley", "no" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -14836,15 +14137,12 @@ "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" }, "parameters": [ - "RoundJoystickOuter_RIGHT", - "MultitouchJoystick", - "" - ], - "subInstructions": [] + "AimingJoystick", + "MultitouchJoystick" + ] } ], "actions": [], @@ -14867,7 +14165,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareTimer" }, "parameters": [ @@ -14875,33 +14172,21 @@ "\"FireRate\"", ">", "Variable(CharacterStats.FireRate)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"FireRate\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -14910,12 +14195,10 @@ "Gun.PointX(\"BulletSpawn\")", "Gun.PointY(\"BulletSpawn\")", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -14923,48 +14206,40 @@ "Gun.Angle()", "240", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Bullet", "=", "Gun.Angle()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Bullet", "=", "Gun.ZOrder()-1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeSprite" }, "parameters": [ "Gun", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -14978,12 +14253,10 @@ "0.08", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -14992,12 +14265,10 @@ "", "30", "RandomFloatInRange(0.8,1.2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CameraShake::CameraShake" }, "parameters": [ @@ -15012,23 +14283,19 @@ "0.1", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Wesley", "\"Recoil\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -15036,12 +14303,10 @@ "RecoilAngle", "=", "Gun.Angle()+180" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -15050,23 +14315,19 @@ "Gun.PointX(\"BulletSpawn\")", "Gun.PointY(\"BulletSpawn\")", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Particle_RecoilDust", "=", "Gun.ZOrder()+100" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -15091,7 +14352,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -15099,14 +14359,12 @@ "\"Recoil\"", "<=", "0.1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -15114,11 +14372,9 @@ "Wesley.Variable(RecoilAngle)", "25", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15138,14 +14394,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -15154,12 +14408,10 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -15168,8 +14420,7 @@ "", "", "" - ], - "subInstructions": [] + ] } ] } @@ -15177,17 +14428,14 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Bullet", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -15224,14 +14472,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -15240,12 +14486,10 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -15254,8 +14498,7 @@ "", "", "" - ], - "subInstructions": [] + ] } ] }, @@ -15268,14 +14511,12 @@ "Wesley", "Flash", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -15284,12 +14525,10 @@ "", "50", "RandomFloatInRange(0.9,1)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Flash::Flash::Flash" }, "parameters": [ @@ -15297,29 +14536,25 @@ "Flash", "1", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Health::Health::Hit" }, "parameters": [ "Wesley", "Health", - "max(0,floor(Variable(DangerLevelRounded)-Variable(CharacterStats.Defense))+1)", + "max(1, ceil(Variable(DangerLevelRounded) - Variable(CharacterStats.Defense)))", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ - "HealthText", + "HealthBar", "ShakeObject_PositionAngle", "0.5", "8", @@ -15328,8 +14563,18 @@ "0.1", "", "" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + }, + "parameters": [ + "HealthBar", + "=", + "Wesley.Health::Health()", + "" + ] } ], "events": [ @@ -15338,7 +14583,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -15347,44 +14591,20 @@ "", "", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "GhostOrb", "" - ], - "subInstructions": [] + ] } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 5, - "g": 117, - "r": 65, - "textB": 255, - "textG": 255, - "textR": 255 - }, - "comment": "Change the width of the HealthBar, and the text of the HealthText by using the health variable in the \"Health\" behavior applied to the player object divided by the scene variable CharacterStats.Health which are acting as the current and maximum health for this game.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Healthbar_Changing" + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15404,21 +14624,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Health::Health::IsDead" }, "parameters": [ "Wesley", "Health", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -15427,46 +14644,38 @@ "Wesley.X()", "Wesley.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Particle_Death", "=", "Wesley.Y()+10000" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Wesley", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Gun", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -15475,11 +14684,9 @@ "", "50", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -15516,62 +14723,52 @@ "conditions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Enemies", "<", "Wesley.X()" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "FlipX" }, "parameters": [ "Enemies", "no" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "PosX" }, "parameters": [ "Enemies", ">", "Wesley.X()" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "FlipX" }, "parameters": [ "Enemies", "yes" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15592,42 +14789,35 @@ "actions": [ { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Enemies", "Room", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Imp", "RoomTraps", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Spider", "RoomTraps", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15648,42 +14838,35 @@ "actions": [ { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Ghost", "Enemies", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Spider", "Enemies", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SeparateFromObjects" }, "parameters": [ "Imp", "Enemies", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -15712,20 +14895,17 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Ghost", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceVers" }, "parameters": [ @@ -15733,23 +14913,19 @@ "Wesley", "10", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Ghost", "=", "100" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15769,40 +14945,33 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Ghost", "\"Hurt\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Ghost" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Ghost", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15822,7 +14991,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "Distance" }, "parameters": [ @@ -15830,47 +14998,39 @@ "Wesley", "120", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Ghost", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Ghost", "\"Charging\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Ghost", "=", "255" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15890,41 +15050,34 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Ghost", "\"Charging\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Ghost" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Ghost", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -15933,12 +15086,10 @@ "Ghost.PointX(\"GhostOrbSpawn\")", "Ghost.PointY(\"GhostOrbSpawn\")", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceVersPos" }, "parameters": [ @@ -15947,24 +15098,20 @@ "Wesley.Y()+5", "80", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "GhostOrb", "=", "Ghost.ZOrder()-1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -15973,11 +15120,9 @@ "", "10", "RandomFloatInRange(0.7,0.9)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -15997,40 +15142,33 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Ghost", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Ghost" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Ghost", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16050,7 +15188,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -16059,37 +15196,31 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Ghost", "=", "255" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Ghost", "\"Hurt\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -16098,12 +15229,10 @@ "", "60", "RandomFloatInRange(0.9,1)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -16117,12 +15246,10 @@ "0.08", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Health::Health::Hit" }, "parameters": [ @@ -16130,12 +15257,10 @@ "Health", "Variable(CharacterStats.Power)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -16144,24 +15269,20 @@ "Bullet.X()", "Bullet.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "EnemyDamageText", "=", "VariableString(CharacterStats.Power)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -16169,35 +15290,29 @@ "0", "-25", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "EnemyDamageText", "=", "Ghost.ZOrder()+1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Ghost", "\"Knockback\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -16205,22 +15320,18 @@ "KnockBackAngle", "=", "Bullet.Angle()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Bullet", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16240,7 +15351,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -16248,14 +15358,12 @@ "\"Knockback\"", "<=", "0.1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -16263,11 +15371,9 @@ "Ghost.Variable(KnockBackAngle)", "50", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -16299,20 +15405,17 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Spider", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceVers" }, "parameters": [ @@ -16320,11 +15423,9 @@ "Wesley", "55", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16344,40 +15445,33 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Spider", "\"Hurt\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Spider" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Spider", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16397,7 +15491,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "Distance" }, "parameters": [ @@ -16405,35 +15498,29 @@ "Wesley", "15", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Spider", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Spider", "\"Charging\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16453,41 +15540,34 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Spider", "\"Charging\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Spider" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Spider", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -16496,20 +15576,17 @@ "", "10", "RandomFloatInRange(1,1.2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "i", "=", "0" - ], - "subInstructions": [] + ] } ], "events": [ @@ -16520,7 +15597,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -16529,12 +15605,10 @@ "Spider.PointX(\"GhostOrbSpawn\") + Variable(ElipsePattern[Variable(i)].X)", "Spider.PointY(\"GhostOrbSpawn\") + Variable(ElipsePattern[Variable(i)].Y)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceVersPos" }, "parameters": [ @@ -16543,35 +15617,29 @@ "Wesley.Y() + 5 + Variable(ElipsePattern[Variable(i)].Y)", "20", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "GhostOrb", "=", "Spider.ZOrder() - 1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "i", "+", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -16593,40 +15661,33 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Spider", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Spider" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Spider", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16646,7 +15707,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -16655,25 +15715,21 @@ "", "", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Spider", "\"Hurt\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -16682,12 +15738,10 @@ "", "60", "RandomFloatInRange(0.9,1)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -16701,12 +15755,10 @@ "0.08", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Health::Health::Hit" }, "parameters": [ @@ -16714,12 +15766,10 @@ "Health", "Variable(CharacterStats.Power)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -16728,24 +15778,20 @@ "Bullet.X()", "Bullet.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "EnemyDamageText", "=", "VariableString(CharacterStats.Power)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -16753,35 +15799,29 @@ "0", "-25", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "EnemyDamageText", "=", "Spider.ZOrder()+1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Spider", "\"Knockback\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -16789,22 +15829,18 @@ "KnockBackAngle", "=", "Bullet.Angle()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Bullet", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16824,7 +15860,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -16832,14 +15867,12 @@ "\"Knockback\"", "<=", "0.1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -16847,11 +15880,9 @@ "Spider.Variable(KnockBackAngle)", "40", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -16883,20 +15914,17 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Imp", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceVers" }, "parameters": [ @@ -16904,11 +15932,9 @@ "Wesley", "18", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16928,7 +15954,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "Distance" }, "parameters": [ @@ -16936,36 +15961,30 @@ "Wesley", "140", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Imp", "\"Idle\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Imp", "\"Charging\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -16974,11 +15993,9 @@ "", "10", "RandomFloatInRange(1,1.2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -16998,41 +16015,34 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Imp", "\"Charging\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Imp" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Imp", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -17041,8 +16051,7 @@ "", "20", "RandomFloatInRange(1,1.2)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -17065,7 +16074,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -17073,11 +16081,9 @@ "Spread", "=", "140" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Repeat", @@ -17086,7 +16092,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -17094,8 +16099,7 @@ "Spread", "+", "10" - ], - "subInstructions": [] + ] } ], "events": [ @@ -17105,7 +16109,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -17114,24 +16117,20 @@ "Imp.PointX(\"GhostOrbSpawn\")", "Imp.PointY(\"GhostOrbSpawn\")", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "GhostOrb", "=", "Imp.ZOrder()-1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -17139,11 +16138,9 @@ "AngleBetweenPositions(Wesley.X(), Wesley.Y()+5, Imp.PointX(\"GhostOrbSpawn\"),Imp.PointY(\"GhostOrbSpawn\"))+Imp.Variable(Spread)", "45", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -17167,40 +16164,33 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "Imp", "\"Resting\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AnimationEnded" }, "parameters": [ "Imp" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Imp", "\"Idle\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17220,7 +16210,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -17229,14 +16218,12 @@ "", "", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -17245,12 +16232,10 @@ "", "60", "RandomFloatInRange(0.9,1)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" }, "parameters": [ @@ -17264,12 +16249,10 @@ "0.08", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Health::Health::Hit" }, "parameters": [ @@ -17277,12 +16260,10 @@ "Health", "Variable(CharacterStats.Power)", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -17291,24 +16272,20 @@ "Bullet.X()", "Bullet.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "EnemyDamageText", "=", "VariableString(CharacterStats.Power)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceXY" }, "parameters": [ @@ -17316,35 +16293,29 @@ "0", "-25", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "EnemyDamageText", "=", "Imp.ZOrder()+1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Imp", "\"Knockback\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -17352,22 +16323,18 @@ "KnockBackAngle", "=", "Bullet.Angle()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Bullet", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17387,7 +16354,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -17395,14 +16361,12 @@ "\"Knockback\"", "<=", "0.1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -17410,11 +16374,9 @@ "Imp.Variable(KnockBackAngle)", "15", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -17446,21 +16408,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Health::Health::IsDead" }, "parameters": [ "Enemies", "Health", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -17468,8 +16427,7 @@ "DropChance", "=", "RandomInRange(0,100)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -17478,7 +16436,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -17486,14 +16443,12 @@ "DropChance", "<=", "Enemies.Variable(DropChance_HealthOrb)" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -17502,12 +16457,10 @@ "Enemies.X()", "Enemies.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -17515,34 +16468,28 @@ "RandomFloatInRange(0,360)", "40", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetAnimationName" }, "parameters": [ "Pick_Ups", "\"HealthOrb\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Pick_Ups", "=", "Pick_Ups.Y()-800" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Repeat", @@ -17551,7 +16498,6 @@ "actions": [ { "type": { - "inverted": false, "value": "Create" }, "parameters": [ @@ -17560,12 +16506,10 @@ "Enemies.X()", "Enemies.Y()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "AddForceAL" }, "parameters": [ @@ -17573,23 +16517,19 @@ "RandomFloatInRange(0,360)", "50", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangePlan" }, "parameters": [ "Pick_Ups", "=", "Pick_Ups.Y()-800" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -17597,28 +16537,23 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Pick_Ups", "\"PickUps\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Enemies", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -17643,14 +16578,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -17659,12 +16592,10 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CollisionNP" }, "parameters": [ @@ -17673,8 +16604,7 @@ "", "", "" - ], - "subInstructions": [] + ] } ] } @@ -17682,17 +16612,14 @@ "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "GhostOrb", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17712,7 +16639,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -17720,31 +16646,25 @@ "\"PickUps\"", ">", "0.2" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "Arreter" }, "parameters": [ "Pick_Ups" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17764,7 +16684,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "CompareObjectTimer" }, "parameters": [ @@ -17772,24 +16691,20 @@ "\"PickUps\"", ">", "5" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "Pick_Ups", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -17822,18 +16737,15 @@ "actions": [ { "type": { - "inverted": false, "value": "TextObject::Opacity" }, "parameters": [ "EnemyDamageText", "-", "150*TimeDelta()" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17853,31 +16765,26 @@ "conditions": [ { "type": { - "inverted": false, "value": "TextObject::Opacity" }, "parameters": [ "EnemyDamageText", "<=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Delete" }, "parameters": [ "EnemyDamageText", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -17909,28 +16816,23 @@ "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Cache" }, "parameters": [ "Reset_Timer" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17950,15 +16852,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", "<=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -17973,7 +16873,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create a \"Death\" timer, which gives a 1.5 second window for the player to realize they've died before the Reset layer is shown.", + "comment": "Give a 1.5 second window for the player to realize they've died\nand show the Reset layer and align objects to fit the screen, and apply effects (like object shake).", "comment2": "" }, { @@ -17981,129 +16881,71 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"Death\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "when the \"Death\" timer is above 1.5 seconds, show the Reset layer and align objects to fit the screen, and apply effects.(Like object shake)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "CompareTimer" + "value": "Wait" }, "parameters": [ - "", - "\"Death\"", - ">", "1.5" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, "value": "ChangeWidth" }, "parameters": [ "Darkening", "=", "SceneWindowWidth()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCenterX" }, "parameters": [ "Darkening", "=", "(SceneWindowWidth()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShowLayer" }, "parameters": [ "", "\"Reset\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Button", "=", "(SceneWindowWidth()/2)-(Reset_Button.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Reset_Leaderboard", "=", "(SceneWindowWidth()/2)-(Reset_Leaderboard.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -18116,12 +16958,10 @@ "0.2", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" }, "parameters": [ @@ -18134,20 +16974,17 @@ "0.2", "yes", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Darkening", "=", "100" - ], - "subInstructions": [] + ] } ], "events": [ @@ -18156,21 +16993,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Reset_Button", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -18179,11 +17013,9 @@ "", "60", "0.8" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -18205,14 +17037,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "LayerVisible" }, "parameters": [ "", "\"Reset\"" - ], - "subInstructions": [] + ] }, { "type": { @@ -18222,8 +17052,7 @@ "parameters": [ "", "\"Leaderboard\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -18246,7 +17075,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "SourisSurObjet" }, "parameters": [ @@ -18254,74 +17082,54 @@ "", "", "" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Delete" - }, - "parameters": [ - "Reset_Button", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Delete" - }, - "parameters": [ - "Reset_Leaderboard", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"Death\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PlaySound" - }, - "parameters": [ - "", - "MenuButtomPress.wav", - "", - "30", - "1" - ], - "subInstructions": [] - } - ], - "events": [] + "type": { + "value": "Delete" + }, + "parameters": [ + "Reset_Button", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Reset_Leaderboard", + "" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"Death\"" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "MenuButtomPress.wav", + "", + "30", + "1" + ] } ] }, @@ -18343,378 +17151,306 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Reset_Button", "=", "0" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Montre" - }, - "parameters": [ - "Reset_Timer", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Reset_Timer", - "=", - "\"3\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Reset_Timer", - "=", - "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PlaySound" - }, - "parameters": [ - "", - "ResetTimer.wav", - "", - "30", - "0.8" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" - }, - "parameters": [ - "Reset_Timer", - "ShakeObject_PositionAngle", - "0.5", - "2", - "2", - "2", - "0.08", - "yes", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Wait" - }, - "parameters": [ - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Reset_Timer", - "=", - "\"2\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Reset_Timer", - "=", - "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PlaySound" - }, - "parameters": [ - "", - "ResetTimer.wav", - "", - "40", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" - }, - "parameters": [ - "Reset_Timer", - "ShakeObject_PositionAngle", - "0.5", - "4", - "4", - "4", - "0.08", - "yes", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Wait" - }, - "parameters": [ - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Reset_Timer", - "=", - "\"1\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Reset_Timer", - "=", - "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PlaySound" - }, - "parameters": [ - "", - "ResetTimer.wav", - "", - "50", - "1.2" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" - }, - "parameters": [ - "Reset_Timer", - "ShakeObject_PositionAngle", - "0.5", - "7", - "7", - "7", - "0.08", - "yes", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Wait" - }, - "parameters": [ - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Scene" - }, - "parameters": [ - "", - "\"MainGame\"", - "" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 5, - "g": 117, - "r": 65, - "textB": 255, - "textG": 255, - "textR": 255 - }, - "comment": "If the mouse is hovering over the leaderboard text object and the left mouse button is released, delete the text objects and show the leaderboard layer and apply tweaks.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": { + "value": "Montre" + }, + "parameters": [ + "Reset_Timer", + "" + ] + }, { "type": { - "inverted": false, - "value": "SourisSurObjet" + "value": "TextObject::String" + }, + "parameters": [ + "Reset_Timer", + "=", + "\"3\"" + ] + }, + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Reset_Timer", + "=", + "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" + ] + }, + { + "type": { + "value": "PlaySound" }, "parameters": [ - "Reset_Leaderboard", "", + "ResetTimer.wav", "", + "30", + "0.8" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Reset_Timer", + "ShakeObject_PositionAngle", + "0.5", + "2", + "2", + "2", + "0.08", + "yes", "" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ + ] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Delete" - }, - "parameters": [ - "Reset_Leaderboard", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Delete" - }, - "parameters": [ - "Reset_Button", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ShowLayer" - }, - "parameters": [ - "", - "\"Leaderboard\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextInput::TextInputObject::SetPlaceholder" - }, - "parameters": [ - "LeaderboardName_Input", - "=", - "\"Add Name\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Cache" - }, - "parameters": [ - "Leaderboard_Submit" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Reset_Timer", + "=", + "\"2\"" + ] + }, + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Reset_Timer", + "=", + "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ResetTimer.wav", + "", + "40", + "1" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Reset_Timer", + "ShakeObject_PositionAngle", + "0.5", + "4", + "4", + "4", + "0.08", + "yes", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Reset_Timer", + "=", + "\"1\"" + ] + }, + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Reset_Timer", + "=", + "(SceneWindowWidth()/2)-(Reset_Timer.Width()/2)" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ResetTimer.wav", + "", + "50", + "1.2" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Reset_Timer", + "ShakeObject_PositionAngle", + "0.5", + "7", + "7", + "7", + "0.08", + "yes", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"MainGame\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 5, + "g": 117, + "r": 65, + "textB": 255, + "textG": 255, + "textR": 255 + }, + "comment": "If the mouse is hovering over the leaderboard text object and the left mouse button is released, delete the text objects and show the leaderboard layer and apply tweaks.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "Reset_Leaderboard", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Reset_Leaderboard", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Reset_Button", + "" + ] + }, + { + "type": { + "value": "ShowLayer" + }, + "parameters": [ + "", + "\"Leaderboard\"" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetPlaceholder" + }, + "parameters": [ + "LeaderboardName_Input", + "=", + "\"Add Name\"" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Leaderboard_Submit" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "LayerVisible" }, "parameters": [ "", "\"Leaderboard\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -18737,17 +17473,14 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -18756,35 +17489,29 @@ "", "60", "0.8" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Leaderboard_Submit", "=", "(SceneWindowWidth()/2)-(Leaderboard_Submit.Width()/2)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "LeaderboardName_Input", "=", "(SceneWindowWidth()/2)-(LeaderboardName_Input.Width()/2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -18804,41 +17531,34 @@ "conditions": [ { "type": { - "inverted": false, "value": "TextInput::TextInputObject::Focused" }, "parameters": [ "LeaderboardName_Input" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "TextInput::TextInputObject::Text" }, "parameters": [ "LeaderboardName_Input", "!=", "\"\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Montre" }, "parameters": [ "Leaderboard_Submit", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -18858,7 +17578,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "SourisSurObjet" }, "parameters": [ @@ -18866,76 +17585,58 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Visible" }, "parameters": [ "Leaderboard_Submit" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "\"9f08aecb-b8e6-4331-b9cc-da1e7bdb20fa\"", - "Variable(PointCount)", - "LeaderboardName_Input.Text()", - "", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "\"9f08aecb-b8e6-4331-b9cc-da1e7bdb20fa\"", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "\"9f08aecb-b8e6-4331-b9cc-da1e7bdb20fa\"", + "Variable(PointCount)", + "LeaderboardName_Input.Text()", + "", + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "\"9f08aecb-b8e6-4331-b9cc-da1e7bdb20fa\"", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, "comment": "When the leaderboard has finished leading, pause this scene and start the \"lLeaderboard\" scene.", "comment2": "" @@ -18945,49 +17646,40 @@ "conditions": [ { "type": { - "inverted": false, "value": "Leaderboards::IsLeaderboardViewLoaded" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"Death\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "HideLayer" }, "parameters": [ "", "\"Leaderboard\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PushScene" }, "parameters": [ "", "\"Leaderboard\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -19010,37 +17702,31 @@ "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Opacity" }, "parameters": [ "Darkening", "=", "100" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -19048,8 +17734,7 @@ "WalkInDirection", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -19059,15 +17744,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "NbObjet" }, "parameters": [ "Wesley", ">", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -19090,7 +17773,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "SourisSurObjet" }, "parameters": [ @@ -19098,52 +17780,43 @@ "", "", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ToggleGlobalVariableAsBoolean" }, "parameters": [ "PauseGameToggle" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeWidth" }, "parameters": [ "Darkening", "=", "SceneWindowWidth()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCenterX" }, "parameters": [ "Darkening", "=", "(SceneWindowWidth()/2)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -19152,42 +17825,35 @@ "conditions": [ { "type": { - "inverted": false, "value": "GlobalVariableAsBoolean" }, "parameters": [ "PauseGameToggle", "True" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ShowLayer" }, "parameters": [ "", "\"PauseLayer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeTimeScale" }, "parameters": [ "", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -19196,53 +17862,44 @@ "", "15", "0.8" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "GlobalVariableAsBoolean" }, "parameters": [ "PauseGameToggle", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "HideLayer" }, "parameters": [ "", "\"PauseLayer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ChangeTimeScale" }, "parameters": [ "", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "PlaySound" }, "parameters": [ @@ -19251,11 +17908,9 @@ "", "15", "1.1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -19281,14 +17936,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "LayerVisible" }, "parameters": [ "", "\"PauseLayer\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -19306,32 +17959,27 @@ "", "", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\" \"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "SourisSurObjet" }, "parameters": [ @@ -19339,8 +17987,7 @@ "", "", "" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -19350,155 +17997,130 @@ "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "UpgradeIcons", "\"HealthUp\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\"+Max Health\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "UpgradeIcons", "\"FireRate\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\"+Fire Rate\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "UpgradeIcons", "\"Armor\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\"+Defense\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "UpgradeIcons", "\"Power\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\"+Attack Power\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "AnimationName" }, "parameters": [ "UpgradeIcons", "\"Speed\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ "Upgrade_Text", "=", "\"+Move Speed\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -19506,7 +18128,6 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreXY" }, "parameters": [ @@ -19515,11 +18136,9 @@ "(SceneWindowWidth()/2)-(Upgrade_Text.Width()/2)", "=", "(SceneWindowHeight()/2)-(Upgrade_Text.Height()/2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -19632,14 +18251,6 @@ "name": "Health", "type": "Health::Health" }, - { - "name": "MultitouchButton", - "type": "MultitouchJoystick::MultitouchButton" - }, - { - "name": "MultitouchJoystick", - "type": "MultitouchJoystick::MultitouchJoystick" - }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" @@ -19655,9 +18266,6 @@ "disableInputWhenNotFocused": true, "mangledName": "Leaderboard", "name": "Leaderboard", - "oglFOV": 90, - "oglZFar": 500, - "oglZNear": 1, "r": 209, "standardSortMethod": true, "stopSoundsOnStartup": true, @@ -19702,23 +18310,19 @@ "inverted": true, "value": "Leaderboards::IsLeaderboardViewLoaded" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "PopScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "layers": [ @@ -19748,101 +18352,30 @@ "behaviorsSharedData": [] } ], - "externalEvents": [ - { - "associatedLayout": "MainGame", - "lastChangeTimeStamp": 0, - "name": "Healthbar_Changing", - "events": [ - { - "folded": true, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 5, - "g": 117, - "r": 65, - "textB": 255, - "textG": 255, - "textR": 255 - }, - "comment": "Change the width of the HealthBar, and the text of the HealthText by using the health variable in the \"Health\" behavior applied to the player object divided by the scene variable CharacterStats.Health which are acting as the current and maximum health for this game.\n\nThe 216 value for the healthbar width changing action is the size of the healthbar in pixels when at fully health. Changing the width relative to 216 will display the % of the health that is remaining.", - "comment2": "" - }, - { - "folded": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "HealthBar", - "=", - "clamp(0,(216*(Wesley.Health::Health()/Variable(CharacterStats.Health))), 216)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Wesley", - "Health", - "=", - "Wesley.Health::Health()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "HealthText", - "=", - "Wesley.VariableString(Health)+\"/\"+VariableString(CharacterStats.Health)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "HealthText", - "=", - "HealthBarBorder.X()+(HealthBarBorder.Width()/2)-(HealthText.Width()/2)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], + "externalEvents": [], "eventsFunctionsExtensions": [ { "author": "", "category": "Input", - "description": "Users can interact with the multitouch joystick to specify angle and force values. These values can be used to control other objects in the scene such as movement and rotation, such as for twin-stick shooter games.\n\nMulitouch buttons can be used whenever a game allows the user to press multiple locations at once.\n\nHow to use:\n\n- Add the joystick behavior to a sprite that will be the joystick \n- Place the joystick object on the scene\n- Run the \"Activate joystick\" action on every frame and specify the thumb object\n- The joystick thumb object will automatically be created and moved\n\nTips:\n\n- Use \"Simulate a touch\" functions to provide mouse and gamepad controls\n- More than one joystick or button can be used at the same time\n- Joystick and thumb objects should have all sides the same length\n- Thumb object must be smaller than the joystick object", "extensionNamespace": "", - "fullName": "Multitouch joystick and buttons", - "helpPath": "", + "fullName": "Multitouch joystick and buttons (sprite)", + "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", - "name": "MultitouchJoystick", + "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", - "shortDescription": "Activate a joystick or buttons that can be controlled by interacting with a touchscreen.", - "version": "1.0.1", + "shortDescription": "Joysticks or buttons for touchscreens.", + "version": "1.1.3", + "description": [ + "Multitouch joysticks can be used the same way as physical gamepads:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Controls mapping for top-down movement and platformer characters", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], "origin": { - "identifier": "MultitouchJoystick", + "identifier": "SpriteMultitouchJoystick", "name": "gdevelop-extension-store" }, "tags": [ @@ -19852,296 +18385,8000 @@ "controller", "touchscreen", "twin stick", - "shooter" + "shooter", + "virtual" ], "authorIds": [ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "1OgYzWp5UeVPbiWGJwI6vqfgZLC3" + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", + "v0YRpdAnIucZFgiRCCecqVnGKno2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "eventsFunctions": [ { - "description": "Activate a joystick that can be controlled by interacting with a touchscreen.", - "fullName": "Multitouch Joystick", - "name": "MultitouchJoystick", - "objectType": "", - "eventsFunctions": [ + "description": "Check if a button is pressed on a gamepad.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ { - "description": "", - "fullName": "", - "functionType": "Action", - "group": "", - "name": "onCreated", - "private": false, - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "\"Pressed\"" + ] } ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, + "actions": [ { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } - ], - "objectGroups": [] + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" }, { - "description": "", - "fullName": "", - "functionType": "Action", - "group": "", - "name": "onActivate", - "private": false, - "sentence": "", - "events": [ + "description": "Button name", + "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": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a gamepad.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "\"Released\"" + ] } ], - "parameters": [ + "actions": [ { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "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": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change a button state for a multitouch controller.", + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "GetArgumentAsString(\"ButtonState\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "type": "string" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the dead zone radius of a joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "Action", + "name": "SetDeadZone", + "private": true, + "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone", + "=", + "GetArgumentAsNumber(\"DeadZoneRadius\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Dead zone radius", + "name": "DeadZoneRadius", + "supplementaryInformation": "[]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the dead zone radius of a joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "Expression", + "name": "DeadZone", + "private": true, + "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", + "fullName": "Angle to 4-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo4Way", + "private": true, + "sentence": "The angle _PARAM1_ 4-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(GetArgumentAsNumber(\"Angle\") * 4 / 360), 4)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", + "fullName": "Angle to 8-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo8Way", + "private": true, + "sentence": "The angle _PARAM1_ 8-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(GetArgumentAsNumber(\"Angle\") * 8 / 360), 8)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 4-way direction", + "functionType": "Condition", + "name": "IsAngleIn4WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Right\"" + ] }, { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "0", + "GetArgumentAsNumber(\"Angle\")", + "" + ] } ], - "objectGroups": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] }, { - "description": "Activate multitouch joystick.", - "fullName": "Activate multitouch joystick", - "functionType": "Action", - "group": "", - "name": "ActivateJoystick", - "private": false, - "sentence": "Activate joystick _PARAM0_ using _PARAM2_ as the thumbstick", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Initialize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create joystick thumb and link it to the joystick", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Not" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "PickedInstancesCount" - }, - "parameters": [ - "JoystickThumb", - "<", - "1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "1", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "2", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "3", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 8-way direction", + "functionType": "Condition", + "name": "IsAngleIn8WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "0", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"DownRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "1", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "2", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"DownLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "3", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "4", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"UpLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "5", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "6", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"UpRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "7", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsNumber(\"ControllerIdentifier\")", + "GetArgumentAsString(\"JoystickIdentifier\")", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsNumber(\"ControllerIdentifier\")", + "GetArgumentAsString(\"JoystickIdentifier\")", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "Action", + "name": "SetJoystickForce", + "private": true, + "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "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": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyDeadZoneRadius()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasGameJustResumed" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Resumed!!!\"", + "", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyJoystickForce()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyJoystickAngle()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyDeadZoneRadius()" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "Object.Behavior::JoystickAngle()", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyDeadZoneRadius()" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "Object.Behavior::JoystickAngle()", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the joystick values (except for angle, which stays the same)", + "fullName": "Reset", + "functionType": "Action", + "name": "Reset", + "private": true, + "sentence": "Reset the joystick of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier.", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyControllerIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius (range: 0 to 1) of the joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDeadZoneRadius()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "String", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "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)", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JoystickForce" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIndex" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Detect button presses made on a touchscreen.", + "fullName": "Multitouch button", + "name": "MultitouchButton", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Idle\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Released\"", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if button is pressed.", + "fullName": "Button pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Button _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetButtonState" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyButtonIdentifier()", + "GetArgumentAsString(\"ButtonState\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Button identifier", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ButtonIdentifier" + }, + { + "value": "0", + "type": "Number", + "label": "TouchID", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIndex" + }, + { + "value": "", + "type": "Boolean", + "label": "Button released", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsReleased" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a platformer character with a multitouch controller.", + "fullName": "Platformer multitouch controller mapper", + "name": "PlatformerMultitouchMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Property" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJumpButton()", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platform character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "Property" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "Controls", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a multitouch controller.", + "fullName": "Top-down multitouch controller mapper", + "name": "TopDownMultitouchMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "sign(SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"UpLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"UpRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"DownLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"DownRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::TopDownMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Top-down movement behavior", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "hidden": false, + "name": "TopDownMovement" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "Analog", + "type": "Choice", + "label": "Stick mode", + "description": "", + "group": "Controls", + "extraInformation": [ + "Analog", + "360°", + "8 Directions" + ], + "hidden": false, + "name": "StickMode" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "defaultName": "Joystick", + "description": "Joystick for touchscreens.", + "fullName": "Multitouch Joystick", + "name": "SpriteMultitouchJoystick", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Border", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Border", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Thumb", + "=", + "2" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Border", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Thumb", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Pass the object property values to the behavior.", + "fullName": "Update configuration", + "functionType": "Action", + "name": "UpdateConfiguration", + "private": true, + "sentence": "Update the configuration of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyControllerIdentifier()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyJoystickIdentifier()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyDeadZoneRadius()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate control of the joystick.", + "fullName": "De/activate control", + "functionType": "Action", + "name": "ActivateControl", + "sentence": "Activate control of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "!=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyJoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyJoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier (1, 2, 3, 4...).", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyControllerIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name of the object.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyJoystickIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsString(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius of the joystick (range: 0 to 1). 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).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyDeadZoneRadius()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "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)", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbAnchorOrigin" + }, + { + "value": "Center-center", + "type": "Number", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbIsScaledProportionally" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ParentOrigin" + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Thumb", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Border", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Resource bar (continuous)", + "helpPath": "/objects/resource-bar", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjgsMTJIMTRINGMtMi4yLDAtNCwxLjgtNCw0czEuOCw0LDQsNGgxMGgxNGMyLjIsMCw0LTEuOCw0LTRTMzAuMiwxMiwyOCwxMnogTTQsMThjLTEuMSwwLTItMC45LTItMnMwLjktMiwyLTJoMTANCgljMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJINHoiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteContinuousBar", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", + "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", + "version": "1.1.1", + "description": [ + "A bar that represents a resource in the game (health, mana, ammo, etc).", + "", + "There are ready-to-use resource bars in the asset-store [resource bars pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=resource-bars-resource-bars)." + ], + "origin": { + "identifier": "PanelSpriteContinuousBar", + "name": "gdevelop-extension-store" + }, + "tags": [ + "resource", + "bar", + "health", + "mana", + "shield", + "hearts", + "lives", + "ammo" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "q8ubdigLvIRXLxsJDDTaokO41mc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", + "fullName": "Resource bar", + "name": "ResourceBar", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This is done after the events to allow users to read the previous value at the end of the change.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__ResourceBar.LastValueChange\"", + "<=", + "Object.Behavior::PropertyPreviousHighValueDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::UpdatePreviousHighValue" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the value of the object.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(GetArgumentAsNumber(\"Value\"), 0, Object.Behavior::MaxValue())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PreviousHighValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ResourceBar.LastValueChange\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior::PropertyPreviousHighValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::UpdatePreviousHighValue" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the object.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyMaxValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the bar is empty.", + "fullName": "Empty", + "functionType": "Condition", + "name": "IsEmpty", + "sentence": "_PARAM0_ bar is empty", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the bar is full.", + "fullName": "Full", + "functionType": "Condition", + "name": "IsFull", + "sentence": "_PARAM0_ bar is full", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMaxValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the previous high value of the resource bar before the current change.", + "fullName": "Previous high value", + "functionType": "ExpressionAndCondition", + "name": "PreviousHighValue", + "sentence": "the previous high value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPreviousHighValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Force the previous resource value to update to the current one.", + "fullName": "Update previous value", + "functionType": "Action", + "name": "UpdatePreviousHighValue", + "sentence": "Update the previous resource value of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the previous high value conservation duration (in seconds) of the object.", + "fullName": "Previous high value conservation duration", + "functionType": "ExpressionAndCondition", + "group": "FillBar bar configuration", + "name": "PreviousHighValueDuration", + "sentence": "the previous high value conservation duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPreviousHighValueDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PreviousHighValueDuration", + "name": "SetPreviousHighValueDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValueDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the resource value is changing.", + "fullName": "Value is changing", + "functionType": "Condition", + "name": "IsChanging", + "sentence": "_PARAM0_ value is changing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::PreviousHighValue" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyValue()", + "" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__ResourceBar.LastValueChange\"", + "<=", + "Object.Behavior::PropertyPreviousHighValueDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Value" + }, + { + "value": "3", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "", + "type": "Number", + "label": "Previous high value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousHighValue" + }, + { + "value": "1", + "type": "Number", + "label": "Previous high value conservation duration (in seconds)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PreviousHighValueDuration" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "defaultName": "ResourceBar", + "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", + "fullName": "Resource bar (continuous)", + "name": "PanelSpriteContinuousBar", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Background", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "FillBar", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Background", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "FillBar", + "=", + "3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyPreviousHighValueDuration" + }, + "parameters": [ + "Object", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Buffer", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Buffer", + "=", + "2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the label over the bar.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Label", + "=", + "4" + ] + }, + { + "type": { + "value": "TextObject::SetTextAlignment" + }, + "parameters": [ + "Label", + "\"center\"" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass the configuration to the behavior.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetMaxValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMaxValue()", + "Object.PropertyMaxValue()" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyPreviousHighValueDuration()", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.WidthForValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetMaxValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMaxValue()", + "Object.PropertyMaxValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyInitialValue" + }, + "parameters": [ + "Object", + "!=", + "Object.PropertyPreviousInitialValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyPreviousHighValueDuration()", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.WidthForValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Resize", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Width()", + "!=", + "max(Background.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Background.BoundingBoxLeft(), Label.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Height()", + "!=", + "max(Background.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Background.BoundingBoxTop(), Label.BoundingBoxTop())" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::IsChanging" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectWidthTween" + }, + "parameters": [ + "Buffer", + "Tween", + "\"ChangeValue\"", + "Object.WidthForValue()", + "\"linear\"", + "Object.PropertyEasingDuration() * 1000", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "<", + "Buffer.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Buffer", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + ">=", + "Buffer.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Buffer" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", + "fullName": "Update layout", + "functionType": "Action", + "name": "UpdateLayout", + "private": true, + "sentence": "Update layout of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "FillBar", + "=", + "Object.PropertyBarLeftPadding()", + "=", + "Object.PropertyBarTopPadding()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.WidthForValue()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "FillBar", + "=", + "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Buffer", + "=", + "FillBar.X()", + "=", + "FillBar.Y()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Buffer", + "=", + "FillBar.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Buffer", + "=", + "FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Label", + "=", + "Object.PropertyBarLeftPadding()", + "=", + "Object.PropertyBarTopPadding()" + ] + }, + { + "type": { + "value": "TextObject::WrappingWidth" + }, + "parameters": [ + "Label", + "=", + "Object.FullBarWidth()" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the value of the object.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.ResourceBar::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetValue" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + }, + "parameters": [ + "Object", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectWidthTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"", + "Object.WidthForValue()", + "\"linear\"", + "Object.PropertyEasingDuration() * 1000", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + }, + "parameters": [ + "Object", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.WidthForValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::IsChanging" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Buffer", + "=", + "round(Object.FullBarWidth() * FillBar.ResourceBar::PreviousHighValue() / FillBar.ResourceBar::MaxValue())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the object.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.ResourceBar::PropertyMaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetMaxValue" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the bar is empty.", + "fullName": "Empty", + "functionType": "Condition", + "group": "Resource bar", + "name": "IsEmpty", + "sentence": "_PARAM0_ is empty", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::IsEmpty" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the bar is full.", + "fullName": "Full", + "functionType": "Condition", + "group": "Resource bar", + "name": "IsFull", + "sentence": "_PARAM0_ is full", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::IsFull" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the previous value conservation duration (in seconds) of the object.", + "fullName": "Previous value conservation duration", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "PreviousValueDuration", + "sentence": "the previous value conservation duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.ResourceBar::PropertyPreviousHighValueDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PreviousValueDuration", + "name": "SetPreviousValueDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::SetPreviousHighValueDuration" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Value\"", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Buffer", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Value\"", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Buffer" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteContinuousBar::ResourceBar", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the resource value is changing.", + "fullName": "Value is changing", + "functionType": "Condition", + "group": "Resource bar", + "name": "IsChanging", + "private": true, + "sentence": "_PARAM0_ value is changing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::ResourceBar::IsChanging" + }, + "parameters": [ + "FillBar", + "ResourceBar", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Value width", + "functionType": "Expression", + "name": "WidthForValue", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "round(Object.FullBarWidth() * FillBar.ResourceBar::Value() / FillBar.ResourceBar::MaxValue())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarWidth", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the label is shown.", + "fullName": "Label is shown", + "functionType": "Condition", + "group": "Resource bar configuration", + "name": "IsLabelShown", + "sentence": "_PARAM0_ label is shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show (or hide) the label on the bar.", + "fullName": "Show label", + "functionType": "Action", + "group": "Resource bar configuration", + "name": "SetLabelShown", + "sentence": "Show the label of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + }, + "parameters": [ + "Object", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + }, + "parameters": [ + "Object", + "yes" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + }, + { + "description": "Show the label", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Update the text that display the current value and maximum value.", + "fullName": "Update label", + "functionType": "Action", + "name": "UpdateLabel", + "private": true, + "sentence": "Update label of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar", + "Buffer" + ], + "hidden": false, + "name": "BarLeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar", + "Buffer" + ], + "hidden": false, + "name": "BarTopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar", + "Buffer" + ], + "hidden": false, + "name": "BarRightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar", + "Buffer" + ], + "hidden": false, + "name": "BarBottomPadding" + }, + { + "value": "3", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "3", + "type": "Number", + "label": "Initial value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "InitialValue" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "It's used to detect a change at hot reload.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousInitialValue" + }, + { + "value": "1", + "type": "Number", + "label": "Previous high value conservation duration (in seconds)", + "description": "", + "group": "Animation", + "extraInformation": [], + "hidden": false, + "name": "PreviousHighValueDuration" + }, + { + "value": "0.25", + "type": "Number", + "label": "Easing duration", + "description": "", + "group": "Animation", + "extraInformation": [], + "hidden": false, + "name": "EasingDuration" + }, + { + "value": "true", + "type": "Boolean", + "label": "Show the label", + "description": "", + "group": "", + "extraInformation": [ + "Label" + ], + "hidden": false, + "name": "ShowLabel" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Buffer" + ], + "hidden": true, + "name": "ShowBuffer" + }, + { + "value": "Center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Label" + ], + "hidden": true, + "name": "LabelVerticalAnchorOrigin" + }, + { + "value": "Center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "FillBar" + ], + "hidden": true, + "name": "LabelVerticalAnchorTarget" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "2 / 3", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + } + ] + } + ] + }, + { + "author": "Tristan Rhodes (tristan@victrisgames.com)", + "category": "", + "extensionNamespace": "", + "fullName": "Flash layer", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", + "name": "FlashLayer", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/flash-outline.svg", + "shortDescription": "Make a layer visible for a specified duration, and then hide the layer.", + "version": "0.2.0", + "description": [ + "Useful to make a temporary effect (flash on hit, flickering lights, lightning flash, show text like Batman and Robin \"Bam!\", etc)", + "", + "It is recommended to select a layer on the top, and one that is hidden by default." + ], + "origin": { + "identifier": "FlashLayer", + "name": "gdevelop-extension-store" + }, + "tags": [ + "effect", + "vfx", + "layer", + "flash", + "visible", + "hide" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Make a layer visible for a specified duration, and then hide the layer.", + "fullName": "Flash layer", + "functionType": "Action", + "name": "FlashLayer", + "sentence": "Make layer _PARAM1_ visible for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save input parameters", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__FlashLayer_Layer", + "=", + "GetArgumentAsString(\"LayerToFlash\")" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__FlashLayer_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set default values", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__FlashLayer_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__FlashLayer_Duration", + "=", + "0.1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start timer and show layer", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"__FlashLayer_Timer\"" + ] + }, + { + "type": { + "value": "ShowLayer" + }, + "parameters": [ + "", + "VariableString(__FlashLayer_Layer)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__FlashLayer_InProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Layer (Default: \"\")", + "name": "LayerToFlash", + "type": "layer" + }, + { + "description": "Duration (seconds) (Default: 0.1) ", + "name": "Duration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Hide layer, reset time-scale to initial value, and delete timer", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__FlashLayer_InProgress", + "=", + "1" + ] + }, + { + "type": { + "value": "Timer" + }, + "parameters": [ + "", + "Variable(__FlashLayer_Duration)", + "\"__FlashLayer_Timer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "HideLayer" + }, + "parameters": [ + "", + "VariableString(__FlashLayer_Layer)" + ] + }, + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "", + "\"__FlashLayer_Timer\"" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__FlashLayer_InProgress", + "=", + "0" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "@4ian", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "Health points and damage", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", + "name": "Health", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/heart-half-full.svg", + "shortDescription": "Manage health points and damage, including a protective shield and armor.", + "version": "0.2.0", + "description": [ + "Manage health points including a protective shield and armor. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.", + "", + "Damage calculations are performed in this order:", + "", + "Incoming Damage -> Is Damage Cooldown active? -> Chance to Dodge -> Flat Damage Reduction -> Percent Damage Reduction -> Damage to Shield -> Damage to Health", + "", + "How to use:", + "", + "- Set desired values in behavior properties", + "- To apply damage use “Apply damage to an object”", + "- To heal health, use “Heal object” action", + "- To activate the shield, use “Activate shield” action", + "- Health and shield regeneration will happen automatically based on properties", + " ", + "Tips:", + "", + "- While damage cooldown is active, no damage will be applied to health or shield (the object is invincible)", + "- Try using the “Blink” extension while damage cooldown is active", + "- Use the “Is just damaged” or \"Is just healed\" conditions to trigger sound and visual effects", + "", + "Health properties:", + "", + "- Starting health points", + "- Maximum health points. Use \"0\" for no maximum", + "- Damage cooldown (seconds) Use \"0\" for no cooldown", + "- Rate of health regeneration (points per second)", + "- Delay before health regeneration starts after being hit (seconds)", + "- Allow heals to increase health above max health (regen will never exceed max health)", + "", + "Shield properties:", + "", + "- Max shield points. Use \"0\" for no maximum", + "- Duration of shield (seconds) Use \"0\" to make shield permanent", + "- Rate of shield regeneration (points per second)", + "- Delay before shield regeneration starts after being hit (seconds)", + "- Block excess damage when shield is broken (yes/no)", + "", + "The top-down RPG example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://top-down-rpg))." + ], + "origin": { + "identifier": "Health", + "name": "gdevelop-extension-store" + }, + "tags": [ + "health", + "life", + "damage", + "hit", + "heal", + "shield", + "regeneration", + "armor" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "xpwUwByyImTDcHEqDUqfyg0oRBt1", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Manage health (life) points including a protective shield and armor.", + "fullName": "Health", + "name": "Health", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"" + ] + }, + { + "type": { + "value": "Health::Health::SetCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyHealth()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Health", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Regeneration", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "JoystickThumb", - "Object.CenterX()", - "Object.CenterY()", - "Object.Layer()" + "comment": "Health", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyHealthRegenRate" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "Health::Health::PropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::MaxHealth()" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"", + ">", + "Object.Behavior::PropertyHealthRegenDelay()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyHealthRegenRate() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Correct any values above maximum limits", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::MaxHealth()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMaxHealth()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset triggers", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsHealthJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyIsJustHealed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyIsJustDodged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + }, + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Shield", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Regeneration", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shield", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldRegenRate" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "Health::Health::PropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyMaxShieldPoints()" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"", + ">", + "Object.Behavior::PropertyShieldRegenDelay()" + ] + } ], - "subInstructions": [] - }, + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::RenewShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyShieldRegenRate() * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Correct any values above maximum limits", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Remove shield points if shield expired", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "JoystickThumb", - "=", - "Object.ZOrder()+1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } ], - "subInstructions": [] - }, + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset damage trigger", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "Object", - "JoystickThumb" - ], - "subInstructions": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] } ], - "events": [] + "parameters": [] } ], "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Apply damage to the object. Shield and armor can reduce this damage if enabled.", + "fullName": "Apply damage to an object", + "functionType": "Action", + "group": "Health", + "name": "Hit", + "sentence": "Apply _PARAM2_ points of damage to _PARAM0_ (Damage can be reduced by Shield: _PARAM3_, Armor: _PARAM4_)", + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Manage touches", + "name": "Incoming damage", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Touch started", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Only consider incoming damage when damage cooldown is not active", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"DamageValue\")" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Chance to dodge", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "HasAnyTouchStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" + "comment": "No damage will be applied when dodged", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "RandomFloatInRange(0,1)", + "<", + "Object.Behavior::PropertyChanceToDodge()" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsJustDodged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Damage reduction from Armor", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UseArmor\"" + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } ], - "subInstructions": [] + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Flat damage reduction", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0,Object.Behavior::PropertyDamageToBeApplied() - Object.Behavior::PropertyFlatDamageReduction())" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Percent damage reduction", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyPercentDamageReduction" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "*", + "1 - min(1, Object.Behavior::PropertyPercentDamageReduction())" + ] + } + ] + } + ], + "parameters": [] + } + ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply damage to shield", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If shield is active, damage the shield first", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UseShield\"" + ] + }, + { + "type": { + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Health::Health::TriggerDamageCooldown" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -20153,7 +26390,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect new touch on joystick", + "comment": "If damage is less than shield, subtract damage from shield.", "comment2": "" }, { @@ -20161,289 +26398,547 @@ "conditions": [ { "type": { - "inverted": true, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyIsPressed" + "value": "Health::Health::PropertyDamageToBeApplied" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "<=", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "Object.Behavior::PropertyDamageToBeApplied()" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyShieldDamageTaken" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDamageToBeApplied()" + ] }, { "type": { - "inverted": false, - "value": "CollisionPoint" + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If damage is greater than shield, conditionally apply excess damage based on property", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" }, "parameters": [ "Object", - "TouchX(StartedTouchId(Object.Behavior::PropertyTouchCounter()), Object.Layer(),0)", - "TouchY(StartedTouchId(Object.Behavior::PropertyTouchCounter()), Object.Layer(),0)" - ], - "subInstructions": [] + "Behavior", + ">", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchID" + "value": "Health::Health::SetPropertyShieldDamageTaken" }, "parameters": [ "Object", "Behavior", "=", - "StartedTouchId(Object.Behavior::PropertyTouchCounter())" + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] }, { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" + "comment": "Apply excess damage only if shield does not block excess damage", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::PropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] } - ], - "events": [] + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply damage to health", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] }, + { + "type": { + "value": "Health::Health::TriggerDamageCooldown" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchCounter" + "value": "Health::Health::SetCurrentHealth" }, "parameters": [ "Object", "Behavior", - "+", - "1" - ], - "subInstructions": [] + "Object.Behavior::PropertyCurrentHealth() - Object.Behavior::PropertyDamageToBeApplied()", + "" + ] } - ], - "events": [] + ] } ] } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Points of damage", + "name": "DamageValue", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Shield can reduce damage taken", + "name": "UseShield", + "optional": true, + "type": "yesorno" + }, + { + "defaultValue": "yes", + "description": "Armor can reduce damage taken", + "name": "UseArmor", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the health points of the object. Will not trigger damage cooldown.", + "fullName": "Change health points", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHealth", + "sentence": "Change the health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If MaxHealth is set, prevent health from going above it", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyMaxHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyCurrentHealth(), Object.Behavior::PropertyMaxHealth())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "New health value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the health points of the object. Will not trigger damage cooldown.", + "fullName": "Change health points (deprecated)", + "functionType": "Action", + "group": "Health configuration", + "name": "SetCurrentHealth", + "private": true, + "sentence": "Change the health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetHealth" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "New health value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Heal the object by increasing its health points.", + "fullName": "Heal object", + "functionType": "Action", + "group": "Health", + "name": "Heal", + "sentence": "Heal _PARAM0_ with _PARAM2_ health points", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Heal", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If Max Health is not set, do not enforce Max Health", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyMaxHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHealToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"HealValue\")" + ] + } + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Touch ended", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If Max Health is set and Overhealing is not allowed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::PropertyMaxHealth" }, - "comment": "Reset \"released\" every frame", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyButtonReleased" - }, - "parameters": [ - "Object", - "Behavior", - "" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchID()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyButtonReleased" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "JoystickThumb", - "=", - "Object.CenterX()", - "=", - "Object.CenterY()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset values (except for angle, which stays the same)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - } + "type": { + "inverted": true, + "value": "Health::Health::PropertyAllowOverHealing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHealToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(GetArgumentAsNumber(\"HealValue\"),Object.Behavior::PropertyMaxHealth() - Object.Behavior::PropertyCurrentHealth())" ] } - ], - "parameters": [] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick values", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -20454,419 +26949,358 @@ "textG": 0, "textR": 0 }, - "comment": "Detect if joystick has a valid TouchID", + "comment": "Perform heal", "comment2": "" }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyTouchID" + "value": "Health::Health::SetPropertyCurrentHealth" }, "parameters": [ "Object", "Behavior", - "!=", - "0" - ], - "subInstructions": [] + "+", + "Object.Behavior::PropertyHealToBeApplied()" + ] } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record joystick angle ", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "AngleBetweenPositions(Object.CenterX(),Object.CenterY(),TouchX(Object.Behavior::PropertyTouchID(),Object.Layer(),0),TouchY(Object.Behavior::PropertyTouchID(),Object.Layer(),0))" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record distance to touch", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "DistanceBetweenPositions(Object.CenterX(),Object.CenterY(),TouchX(Object.Behavior::PropertyTouchID(),Object.Layer(),0),TouchY(Object.Behavior::PropertyTouchID(),Object.Layer(),0))" - ], - "subInstructions": [] - } - ], - "events": [] - }, + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update healing trigger", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::SetPropertyIsJustHealed" }, - "comment": "Calculate the percent of distance the thumb has moved from the center of joystick.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(Object. Behavior::PropertyTouchDistance() / Object.Width()*2,0,1)" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } ], "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Points to heal (will be added to object health)", + "name": "HealValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the object maximum health points.", + "fullName": "Maximum health points", + "functionType": "Action", + "group": "Health configuration", + "name": "SetMaxHealth", + "sentence": "Change the maximum health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyMaxHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure Current Health does not exceed new Max Health", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::MaxHealth()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::MaxHealth()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Maximum health", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the rate of health regeneration.", + "fullName": "Rate of health regeneration", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHealthRegenRate", + "sentence": "Change the rate of health regen of _PARAM0_ to _PARAM2_ points per second", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHealthRegenRate" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move thumb based on joystick values", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Rate of regen", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "Action", + "group": "Health configuration", + "name": "SetCooldownDuration", + "sentence": "Change the duration of damage cooldown on _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::SetPropertyDamageCooldown" }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "MultitouchJoystick::MultitouchJoystick::IsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "JoystickThumb", - "=", - "Object.CenterX()", - "=", - "Object.CenterY()" - ], - "subInstructions": [] - } - ], - "events": [] - }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Duration of damage cooldown (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the delay before health regeneration starts after being hit.", + "fullName": "Health regeneration delay", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHealthRegenDelay", + "sentence": "Change the health regeneration delay on _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::SetPropertyHealthRegenDelay" }, - "comment": "Move joystick thumb when a touch is active", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::IsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If floating is enabled, move joystick to keep touch inside", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyFloatingEnabled" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touch is outside joystick", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyTouchDistance()", - ">", - "Object.Width()/2" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "Object", - "+", - "XFromAngleAndDistance(Object.Behavior::JoystickAngle(),Object.Behavior::PropertyTouchDistance() - Object.Width()/2)", - "+", - "YFromAngleAndDistance(Object.Behavior::JoystickAngle(),Object.Behavior::PropertyTouchDistance() - Object.Width()/2)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move joystick thumb to the location of the touch (but stay inside joystick)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreAutour" - }, - "parameters": [ - "JoystickThumb", - "Object", - "min(Object.Behavior::PropertyTouchDistance(),Object.Width()/2)", - "Object.Behavior::JoystickAngle()" - ], - "subInstructions": [] - } - ], - "events": [] - } + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Delay (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage", + "functionType": "Action", + "group": "Health configuration", + "name": "SetChanceToDodge", + "sentence": "Change the chance to dodge on _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyChanceToDodge" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" ] } - ], - "parameters": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", - "description": "Joystick thumb", - "longDescription": "", - "name": "JoystickThumb", - "optional": false, - "supplementaryInformation": "", - "type": "objectList" + "description": "Chance to dodge (Range: 0 to 1)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "Expression", - "group": "", - "name": "JoystickForce", - "private": false, - "sentence": "", + "description": "Change the flat damage reduction from armor. Incoming damage is reduced by this value.", + "fullName": "Flat damage reduction from armor", + "functionType": "Action", + "group": "Health configuration", + "name": "SetFlatDamageReduction", + "sentence": "Change the flat damage reduction from armor on _PARAM0_ to _PARAM2_ points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -20874,50 +27308,45 @@ "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "Health::Health::SetPropertyFlatDamageReduction" }, "parameters": [ - "Object.Behavior::PropertyJoystickForce()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Flat reduction from armor", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Expression", - "group": "", - "name": "JoystickAngle", - "private": false, - "sentence": "", + "description": "Change the percent damage reduction from armor. Range: 0 to 1.", + "fullName": "Percent damage reduction from armor", + "functionType": "Action", + "group": "Health configuration", + "name": "SetPercentDamageReduction", + "sentence": "Change the percent damage reduction from armor on _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -20925,2926 +27354,1924 @@ "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "Health::Health::SetPropertyPercentDamageReduction" }, "parameters": [ - "Object.Behavior::PropertyJoystickAngle()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Percent damage reduction from armor", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if joystick force is greater or equal to a value.", - "fullName": "Joystick force", - "functionType": "Condition", - "group": "", - "name": "CheckJoystickForce", - "private": false, - "sentence": "Force of _PARAM0_ is greater or equal to _PARAM2_", + "description": "Allow heals to increase health above max health. Regeneration will not exceed max health.", + "fullName": "Allow over-healing", + "functionType": "Action", + "group": "Health configuration", + "name": "AllowOverHealing", + "sentence": "Allow over-healing on _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyAllowOverHealing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "GetArgumentAsBoolean" }, "parameters": [ - "Object.Behavior::JoystickForce()", - ">=", - "GetArgumentAsNumber(\"Force\")" - ], - "subInstructions": [] + "\"Value\"" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "Health::Health::SetPropertyAllowOverHealing" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", - "description": "Joystick force (Range: 0 to 1)", - "longDescription": "", - "name": "Force", - "optional": false, - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "expression" + "description": "Allow over-healing", + "name": "Value", + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction", - "functionType": "Condition", - "group": "", - "name": "DirectionPushed", - "private": false, - "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "description": "Mark object as hit at least once.", + "fullName": "Mark object as hit at least once", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHitAtLeastOnce", + "private": true, + "sentence": "Mark _PARAM0_ as hit at least once: _PARAM2_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Range (-180 to 180)", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Up", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Up\"" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "-180" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Down", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Down\"" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "180" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "Health::Health::SetPropertyHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Left", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Left\"" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "-180" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "-90" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "90" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "180" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Right", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Right\"" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "-90" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "90" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] + "type": { + "value": "Health::Health::SetPropertyHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Hit at least once", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Mark object as just damaged.", + "fullName": "Mark object as just damaged", + "functionType": "Action", + "group": "Health configuration", + "name": "SetJustDamaged", + "private": true, + "sentence": "Mark _PARAM0_ as just damaged: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsHealthJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsHealthJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", - "description": "Direction", - "longDescription": "", - "name": "Direction", - "optional": false, - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" + "description": "Just damaged", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Trigger damage cooldown.", + "fullName": "Trigger damage cooldown", + "functionType": "Action", + "group": "Health", + "name": "TriggerDamageCooldown", + "sentence": "Trigger the damage cooldown on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Mark that the object was hit at least once (used for initial state of damage cooldown)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::HitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if joystick is floating.", - "fullName": "Check if joystick is floating", + "description": "Check if the object has been hit at least once.", + "fullName": "Object has been hit at least once", "functionType": "Condition", - "group": "", - "name": "IsFloating", - "private": false, - "sentence": "Joystick _PARAM0_ is floating", + "group": "Health", + "name": "HitAtLeastOnce", + "private": true, + "sentence": "_PARAM0_ has been hit at least once", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This condition is used to prevent \"damage cooldown\" from being active when the game starts.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyFloatingEnabled" + "value": "Health::Health::PropertyHitAtLeastOnce" }, "parameters": [ "Object", "Behavior" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Enable (or disable) floating on a joystick.", - "fullName": "Enable (or disable) floating on a joystick", - "functionType": "Action", - "group": "", - "name": "SetFloating", - "private": false, - "sentence": "Enable floating on joystick _PARAM0_: _PARAM2_", + "description": "Check if health was just damaged previously in the events.", + "fullName": "Is health just damaged", + "functionType": "Condition", + "group": "Health", + "name": "IsJustDamaged", + "sentence": "Health has just been damaged on _PARAM0_", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" + "value": "Health::Health::PropertyIsHealthJustDamaged" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyFloatingEnabled" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] + "True" + ] } - ], - "events": [] + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object was just healed previously in the events.", + "fullName": "Is just healed", + "functionType": "Condition", + "group": "Health", + "name": "IsJustHealed", + "sentence": "_PARAM0_ has just been healed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "Health::Health::PropertyIsJustHealed" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyFloatingEnabled" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] + "True" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", + "description": "Check if damage cooldown is active. Object and shield cannot be damaged while this is active.", + "fullName": "Is damage cooldown active", "functionType": "Condition", - "group": "", - "name": "IsPressed", - "private": false, - "sentence": "Joystick _PARAM0_ is pressed", + "group": "Health", + "name": "IsDamageCooldownActive", + "sentence": "Damage cooldown on _PARAM0_ is active", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyIsPressed" + "value": "Health::Health::PropertyHitAtLeastOnce" }, "parameters": [ "Object", "Behavior" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageCooldown" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"", + "<", + "Object.Behavior::PropertyDamageCooldown()" + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change joystick to pressed.", - "fullName": "Change joystick to pressed", - "functionType": "Action", - "group": "", - "name": "SetPressed", - "private": false, - "sentence": "Change joystick _PARAM0_ to pressed: _PARAM2_", + "description": "Check if the object is considered dead (no health points).", + "fullName": "Is dead", + "functionType": "Condition", + "group": "Health", + "name": "IsDead", + "sentence": "_PARAM0_ is dead", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Press joystick", - "comment2": "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" + "value": "Health::Health::PropertyCurrentHealth" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] + "Object", + "Behavior", + "<=", + "0" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] + "True" + ] } - ], - "events": [] - }, + ] + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Release joystick", - "comment2": "" + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "maximum health points of the object.", + "fullName": "Maximum health points", + "functionType": "ExpressionAndCondition", + "group": "Health", + "name": "MaxHealth", + "sentence": "maximum health points", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] + "Object.Behavior::PropertyMaxHealth()" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Simulate a touch on joystick (based on position). Can be used for mouse controls.", - "fullName": "Simulate a touch on joystick (based on position)", - "functionType": "Action", - "group": "", - "name": "SimulateTouch_Position", - "private": false, - "sentence": "Simulate a touch on joystick _PARAM0_ with thumb _PARAM2_ at position: _PARAM3_,_PARAM4_", + "description": "Duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "Expression", + "group": "Health", + "name": "DamageCooldownDuration", + "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick values", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Mark joystick as pressed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record angle to touch", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "AngleBetweenPositions(Object.CenterX(),Object.CenterY(),GetArgumentAsNumber(\"SimulatedTouchX\"),GetArgumentAsNumber(\"SimulatedTouchY\"))" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record distance to touch", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyTouchDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "DistanceBetweenPositions(Object.CenterX(),Object.CenterY(),GetArgumentAsNumber(\"SimulatedTouchX\"),GetArgumentAsNumber(\"SimulatedTouchY\"))" - ], - "subInstructions": [] - } - ], - "events": [] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnNumber" }, - "comment": "Calculate the percent of distance the thumb has moved from the center of joystick.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(Object. Behavior::PropertyTouchDistance() / Object.Width()*2,0,1)" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object.Behavior::PropertyDamageCooldown()" + ] } - ], - "parameters": [] + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move joystick thumb", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "current health points of the object.", + "fullName": "Health points", + "functionType": "ExpressionAndCondition", + "group": "Health", + "name": "Health", + "sentence": "health points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnNumber" }, - "comment": "If floating is enabled, move joystick to keep touch inside", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyFloatingEnabled" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyTouchDistance()", - ">", - "Object.Width()/2" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "Object", - "+", - "XFromAngleAndDistance(Object.Behavior::JoystickAngle(),Object.Behavior::PropertyTouchDistance() - Object.Width()/2)", - "+", - "YFromAngleAndDistance(Object.Behavior::JoystickAngle(),Object.Behavior::PropertyTouchDistance() - Object.Width()/2)" - ], - "subInstructions": [] - } - ], - "events": [] - } + "parameters": [ + "Object.Behavior::PropertyCurrentHealth()" ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move joystick thumb to the location of the touch (but stay inside joystick)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreAutour" - }, - "parameters": [ - "JoystickThumb", - "Object", - "min(Object.Behavior::PropertyTouchDistance(),Object.Width()/2)", - "Object.Behavior::JoystickAngle()" - ], - "subInstructions": [] - } - ], - "events": [] } - ], - "parameters": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" - }, + } + ], + "objectGroups": [] + }, + { + "description": "Delay before health regeneration starts after last being hit (seconds).", + "fullName": "Health regeneration delay", + "functionType": "Expression", + "group": "Health", + "name": "HealthRegenDelay", + "sentence": "", + "events": [ { - "codeOnly": false, - "defaultValue": "", - "description": "JoystickThumb", - "longDescription": "", - "name": "JoystickThumb", - "optional": false, - "supplementaryInformation": "", - "type": "objectList" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenDelay()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "codeOnly": false, - "defaultValue": "", - "description": "X position of simulated touch", - "longDescription": "", - "name": "SimulatedTouchX", - "optional": false, - "supplementaryInformation": "", - "type": "expression" + "description": "Object", + "name": "Object", + "type": "object" }, { - "codeOnly": false, - "defaultValue": "", - "description": "Y position of simulated touch", - "longDescription": "", - "name": "SimulatedTouchY", - "optional": false, - "supplementaryInformation": "", - "type": "expression" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Simulate a touch on joystick (based on angle and force). Can be used for gamepad controls.", - "fullName": "Simulate a touch on joystick (based on angle and force)", - "functionType": "Action", - "group": "", - "name": "SimulateTouch_AngleForce", - "private": false, - "sentence": "Simulate a touch on joystick _PARAM0_ with thumb _PARAM2_ to angle _PARAM3_ and force _PARAM4_", + "description": "Rate of health regeneration (points per second).", + "fullName": "Rate of health regeneration", + "functionType": "Expression", + "group": "Health", + "name": "HealthRegenRate", + "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick values", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Mark joystick as pressed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnNumber" }, - "comment": "Update values", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(GetArgumentAsNumber(\"Angle\"),-180,180)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(GetArgumentAsNumber(\"Force\"),0,1)" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object.Behavior::PropertyHealthRegenRate()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Time before damage cooldown ends (seconds).", + "fullName": "Time remaining in damage cooldown", + "functionType": "Expression", + "group": "Health", + "name": "DamageCooldownRemaining", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "0" + ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move joystick thumb", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::IsDamageCooldownActive" }, - "comment": "Move joystick thumb to the location of the touch (but stay inside joystick)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "JoystickThumb", - "=", - "Object.CenterX() + XFromAngleAndDistance(Object.Behavior::JoystickAngle(), Object.Behavior::JoystickForce() * Object.Width()/2)", - "=", - "Object.CenterY() + YFromAngleAndDistance(Object.Behavior::JoystickAngle(), Object.Behavior::JoystickForce() * Object.Width()/2)" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0,Object.Behavior::PropertyDamageCooldown() - Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\"))" + ] + } + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" - }, + } + ], + "objectGroups": [] + }, + { + "description": "Time since last hit (seconds).", + "fullName": "Time since last hit", + "functionType": "Expression", + "group": "Health", + "name": "TimeSinceLastHit", + "sentence": "", + "events": [ { - "codeOnly": false, - "defaultValue": "", - "description": "JoystickThumb", - "longDescription": "", - "name": "JoystickThumb", - "optional": false, - "supplementaryInformation": "", - "type": "objectList" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\")" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "codeOnly": false, - "defaultValue": "", - "description": "Angle (Range: -180 to 180)", - "longDescription": "", - "name": "Angle", - "optional": false, - "supplementaryInformation": "", - "type": "expression" + "description": "Object", + "name": "Object", + "type": "object" }, { - "codeOnly": false, - "defaultValue": "", - "description": "Force (Range: 0 to 1)", - "longDescription": "", - "name": "Force", - "optional": false, - "supplementaryInformation": "", - "type": "expression" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Simulate a touch ended.", - "fullName": "Simulate a touch ended", - "functionType": "Action", - "group": "", - "name": "SimulateTouchEnded", - "private": false, - "sentence": "Simulate a touch ended on joystick _PARAM0_ with thumb _PARAM2_", + "description": "Chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage", + "functionType": "Expression", + "group": "Health", + "name": "ChanceToDodge", + "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Touch ended", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyButtonReleased" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ], - "subInstructions": [] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "JoystickThumb", - "Object", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetCenter" - }, - "parameters": [ - "JoystickThumb", - "=", - "Object.CenterX()", - "=", - "Object.CenterY()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset values", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - } + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyChanceToDodge()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Flat damage reduction from armor. Incoming damage is reduced by this value.", + "fullName": "Flat damage reduction from armor", + "functionType": "Expression", + "group": "Health", + "name": "FlatDamageReduction", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFlatDamageReduction()" ] } - ], - "parameters": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "JoystickThumb", - "longDescription": "", - "name": "JoystickThumb", - "optional": false, - "supplementaryInformation": "", - "type": "objectList" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickAngle" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickForce" - }, - { - "value": "", - "type": "Boolean", - "label": "Is currently pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "IsPressed" - }, - { - "value": "0", - "type": "Number", - "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchID" - }, - { - "value": "0", - "type": "Number", - "label": "Distance from joystick to touch", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchDistance" - }, - { - "value": "", - "type": "Boolean", - "label": "Floating (allow joystick to be moved by dragging)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "FloatingEnabled" }, { - "value": "", - "type": "Boolean", - "label": "Button was just released", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ButtonReleased" + "description": "Percent damage reduction from armor. Range: 0 to 1.", + "fullName": "Percent damage reduction from armor", + "functionType": "Expression", + "group": "Health", + "name": "PercentDamageReduction", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPercentDamageReduction()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchCounter" - } - ] - }, - { - "description": "Detect button presses made from a touchscreen.", - "fullName": "Multitouch button", - "name": "MultitouchButton", - "objectType": "", - "eventsFunctions": [ - { - "description": "", - "fullName": "", - "functionType": "Action", - "group": "", - "name": "doStepPreEvents", - "private": false, + "description": "Health damage taken from most recent hit.", + "fullName": "Health damage taken from most recent hit", + "functionType": "Expression", + "group": "Health", + "name": "PreviousDamageTaken", "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Touch started", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "HasAnyTouchStarted" - }, - "parameters": [ - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyTouchCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check new touches to see if one started on this object", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchId(Object.Behavior::PropertyTouchCounter()), Object.Layer(),0)", - "TouchY(StartedTouchId(Object.Behavior::PropertyTouchCounter()), Object.Layer(),0)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchId(Object.Behavior::PropertyTouchCounter())" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchJoystick::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyTouchCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDamageToBeApplied()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShield", + "sentence": "Change the maximum shield of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Touch ended", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset \"Released\" each frame", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchID()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset values", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyTouchID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] + "type": { + "value": "Health::Health::SetPropertyMaxShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "parameters": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchButton", + "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Maximum shield", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", - "functionType": "Condition", - "group": "", - "name": "IsReleased", - "private": false, - "sentence": "Button _PARAM0_ is released", + "description": "Change current shield points. Will not trigger damage cooldown.", + "fullName": "Shield points", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldPoints", + "sentence": "Change current shield points on _PARAM0_ to _PARAM2_ points", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsReleased" + "value": "Health::Health::SetPropertyCurrentShieldPoints" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Shield points", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change rate of shield regeneration.", + "fullName": "Shield regeneration rate", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldRegenRate", + "sentence": "Change the shield regeneration rate of _PARAM0_ to _PARAM2_ points per second", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyShieldRegenRate" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Regeneration rate (points per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change delay before shield regeneration starts after being hit.", + "fullName": "Shield regeneration delay", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldRegenDelay", + "sentence": "Change the shield regeneration delay on _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyShieldRegenDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Regeneration delay (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change duration of shield. Use \"0\" to make shield permanent.", + "fullName": "Duration of shield", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldDuration", + "sentence": "Change the duration of shield on _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "Health::Health::SetPropertyShieldDuration" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchButton", + "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Shield duration (seconds)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if button is pressed.", - "fullName": "Button pressed", - "functionType": "Condition", - "group": "", - "name": "IsPressed", - "private": false, - "sentence": "Button _PARAM0_ is pressed", + "description": "Renew shield duration to it's full value.", + "fullName": "Renew shield duration", + "functionType": "Action", + "group": "Shield configuration", + "name": "RenewShieldDuration", + "sentence": "Renew the shield duration on _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "ResetObjectTimer" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "\"__Health.ShieldDuration\"" + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchButton", + "supplementaryInformation": "Health::Health", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change button to pressed.", - "fullName": "Change button to pressed", + "description": "Activate the shield by setting the shield points and renewing the shield duration (optional).", + "fullName": "Activate shield", "functionType": "Action", - "group": "", - "name": "SetPressed", - "private": false, - "sentence": "Change button _PARAM0_ to pressed: _PARAM2_", + "group": "Shield", + "name": "ActivateShield", + "sentence": "Activate the shield on _PARAM0_ with _PARAM2_ points (Renew shield duration: _PARAM3_)", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Press button", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsPressed" + "value": "Health::Health::SetPropertyCurrentShieldPoints" }, "parameters": [ "Object", "Behavior", - "yes" - ], - "subInstructions": [] + "=", + "GetArgumentAsNumber(\"ShieldPoints\")" + ] } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Release button", - "comment2": "" + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::PropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsPressed" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "Health::Health::PropertyMaxShieldPoints" }, "parameters": [ "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MultitouchJoystick::MultitouchButton", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Boolean", - "label": "Button pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "IsPressed" - }, - { - "value": "0", - "type": "Number", - "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchID" - }, - { - "value": "0", - "type": "Number", - "label": "Distance from joystick to touch", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchDistance" - }, - { - "value": "", - "type": "Number", - "label": "Touch counter", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchCounter" - }, - { - "value": "", - "type": "Boolean", - "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "IsReleased" - } - ] - } - ] - }, - { - "author": "Tristan Rhodes (tristan@victrisgames.com)", - "category": "", - "description": "Useful to make a temporary effect (flash on hit, flickering lights, lightning flash, show text like Batman and Robin \"Bam!\", etc)\n\nIt is recommended to select a layer on the top, and one that is hidden by default.", - "extensionNamespace": "", - "fullName": "Flash layer", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", - "name": "FlashLayer", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/flash-outline.svg", - "shortDescription": "Make a layer visible for a specified duration, and then hide the layer.", - "version": "0.2.0", - "origin": { - "identifier": "FlashLayer", - "name": "gdevelop-extension-store" - }, - "tags": [ - "effect", - "vfx", - "layer", - "flash", - "visible", - "hide" - ], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" - ], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Make a layer visible for a specified duration, and then hide the layer.", - "fullName": "Flash layer", - "functionType": "Action", - "group": "", - "name": "FlashLayer", - "private": false, - "sentence": "Make layer _PARAM1_ visible for _PARAM2_ seconds", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save input parameters", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__FlashLayer_Layer", - "=", - "GetArgumentAsString(\"LayerToFlash\")" + "Behavior", + ">", + "0" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(GetArgumentAsNumber(\"ShieldPoints\"),Object.Behavior::MaxShield())" + ] + } + ] }, { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__FlashLayer_Duration", - "=", - "GetArgumentAsNumber(\"Duration\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"RenewShieldDuration\"" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::RenewShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] } ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set default values", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__FlashLayer_Duration", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ + "description": "Object", + "name": "Object", + "type": "object" + }, { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__FlashLayer_Duration", - "=", - "0.1" - ], - "subInstructions": [] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Shield points", + "name": "ShieldPoints", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Renew shield duration", + "name": "RenewShieldDuration", + "optional": true, + "type": "yesorno" } ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Start timer and show layer", - "comment2": "" + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Change maximum shield points.", + "fullName": "Max shield points ", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShieldPoints", + "sentence": "Change the maximum shield points on _PARAM0_ to _PARAM2_ points", + "events": [ { - "type": { - "inverted": false, - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"__FlashLayer_Timer\"" - ], - "subInstructions": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyMaxShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "inverted": false, - "value": "ShowLayer" - }, - "parameters": [ - "", - "VariableString(__FlashLayer_Layer)" - ], - "subInstructions": [] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" }, { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__FlashLayer_InProgress", - "=", - "1" - ], - "subInstructions": [] + "description": "Shield points", + "name": "Value", + "type": "expression" } ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Layer (Default: \"\")", - "longDescription": "", - "name": "LayerToFlash", - "optional": false, - "supplementaryInformation": "", - "type": "layer" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Duration (seconds) (Default: 0.1) ", - "longDescription": "", - "name": "Duration", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "", - "fullName": "", - "functionType": "Action", - "group": "", - "name": "onScenePostEvents", - "private": false, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Hide layer, reset time-scale to initial value, and delete timer", - "comment2": "" + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Enable (or disable) blocking excess damage when shield breaks.", + "fullName": "Block excess damage when shield breaks", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldBlockExcessDamage", + "sentence": "Shield on _PARAM0_ blocks excess damage when it breaks: _PARAM2_", + "events": [ { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__FlashLayer_InProgress", - "=", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" }, { - "type": { - "inverted": false, - "value": "Timer" - }, - "parameters": [ - "", - "Variable(__FlashLayer_Duration)", - "\"__FlashLayer_Timer\"" - ], - "subInstructions": [] + "description": "Block excess damage", + "name": "Value", + "type": "yesorno" } ], - "actions": [ + "objectGroups": [] + }, + { + "description": "Check if the shield was just damaged previously in the events.", + "fullName": "Is shield just damaged", + "functionType": "Condition", + "group": "Shield", + "name": "IsShieldJustDamaged", + "sentence": "Shield on _PARAM0_ has just been damaged", + "events": [ { - "type": { - "inverted": false, - "value": "HideLayer" - }, - "parameters": [ - "", - "VariableString(__FlashLayer_Layer)" - ], - "subInstructions": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] }, { - "type": { - "inverted": false, - "value": "RemoveTimer" - }, - "parameters": [ - "", - "\"__FlashLayer_Timer\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__FlashLayer_InProgress", - "=", - "0" - ], - "subInstructions": [] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" } ], - "events": [] - } - ], - "parameters": [], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [] - }, - { - "author": "@4ian", - "category": "", - "description": "Add actions and conditions to manage the life of the object. Object can get damages, lose some health and you can check with a condition if it's dead.", - "extensionNamespace": "", - "fullName": "Health (life points and damages for objects)", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", - "name": "Health", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/heart-half-full.svg", - "shortDescription": "Add actions and conditions to manage the life of the object. Object can get damages, lose some health and you can check with a condition if it's dead.", - "version": "0.0.1", - "origin": { - "identifier": "Health", - "name": "gdevelop-extension-store" - }, - "tags": [ - "health", - "life", - "damage", - "hit", - "heal" - ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" - ], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Add actions and conditions to manage the life of the object. Object can get damages, lose some health and you can check with a condition if it's dead.", - "fullName": "Health", - "name": "Health", - "objectType": "", - "eventsFunctions": [ + "objectGroups": [] + }, { - "description": "Add some damage to the object, decreasing its life.", - "fullName": "Damage the object", - "functionType": "Action", - "group": "", - "name": "Hit", - "private": false, - "sentence": "Damage _PARAM0_, removing _PARAM2_ from its health", + "description": "Check if incoming damage was just dodged.", + "fullName": "Damage was just dodged", + "functionType": "Condition", + "group": "Health", + "name": "IsJustDodged", + "sentence": "_PARAM0_ just dodged incoming damage", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" + "value": "Health::Health::PropertyIsJustDodged" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "ObjectTimer" - }, - "parameters": [ - "Object", - "\"DamageCooldown\"", - "Object.Behavior::PropertyDamageCooldown()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": true, - "value": "Health::Health::PropertyCooldownActive" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } + "parameters": [ + "Object", + "Behavior" ] } ], "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyHealth" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "-", - "GetArgumentAsNumber(\"DamageValue\")" - ], - "subInstructions": [] - }, + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the shield is active (based on shield points and duration).", + "fullName": "Is shield active", + "functionType": "Condition", + "group": "Shield", + "name": "IsShieldActive", + "sentence": "Shield on _PARAM0_ is active", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "ResetObjectTimer" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "\"DamageCooldown\"" - ], - "subInstructions": [] - }, + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "To be considered \"active\", a shield must have positive points AND not exceed duration", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyCooldownActive" + "value": "Health::Health::PropertyCurrentShieldPoints" }, "parameters": [ "Object", "Behavior", - "yes" + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't check the timer when duration is zero (or negative)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] }, { - "type": { - "inverted": false, - "value": "Health::Health::SetPropertyIsJustDamaged" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.ShieldDuration\"", + "<", + "Object.Behavior::PropertyShieldDuration()" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value of the damage to do (will be removed from object health)", - "longDescription": "", - "name": "DamageValue", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the object is considered dead (no more health).", - "fullName": "Is dead", - "functionType": "Condition", - "group": "", - "name": "IsDead", - "private": false, - "sentence": "_PARAM0_ is dead", + "description": "maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "ExpressionAndCondition", + "group": "Shield", + "name": "MaxShield", + "sentence": "maximum shield points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -23852,67 +29279,27 @@ "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Health::Health::PropertyHealth" - }, - "parameters": [ - "Object", - "Behavior", - "<=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object.Behavior::PropertyMaxShieldPoints()" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" } @@ -23920,12 +29307,11 @@ "objectGroups": [] }, { - "description": "", - "fullName": "", - "functionType": "Action", - "group": "", - "name": "doStepPreEvents", - "private": false, + "description": "Duration of the shield (seconds).", + "fullName": "Duration of shield", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldDuration", "sentence": "", "events": [ { @@ -23934,38 +29320,27 @@ "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyIsJustDamaged" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] + "Object.Behavior::PropertyShieldDuration()" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" } @@ -23973,13 +29348,12 @@ "objectGroups": [] }, { - "description": "Check if the object was just damaged previously in the events.", - "fullName": "Is just damaged", - "functionType": "Condition", - "group": "", - "name": "IsJustDamaged", - "private": false, - "sentence": "_PARAM0_ has just been damaged", + "description": "Delay before shield regeneration starts after being hit (seconds).", + "fullName": "Shield regeneration delay", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldRegenDelay", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -23987,65 +29361,68 @@ "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "False" - ], - "subInstructions": [] + "Object.Behavior::PropertyShieldRegenDelay()" + ] } - ], - "events": [] + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rate of shield regeneration (points per second).", + "fullName": "Rate of shield regeneration", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldRegenRate", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Health::Health::PropertyIsJustDamaged" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object.Behavior::PropertyShieldRegenRate()" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" } @@ -24053,13 +29430,12 @@ "objectGroups": [] }, { - "description": "Heal the object, incrasing its life.", - "fullName": "Heal the object", - "functionType": "Action", - "group": "", - "name": "Heal", - "private": false, - "sentence": "Heal _PARAM0_, adding _PARAM2_ to its health", + "description": "Time before the shield duration ends (seconds).", + "fullName": "Time before shield duration ends", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldTimeRemaining", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24067,97 +29443,66 @@ "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "+", - "GetArgumentAsNumber(\"HealValue\")" - ], - "subInstructions": [] + "0" + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "Health::Health::PropertyMaxHealth" + "value": "Health::Health::PropertyShieldDuration" }, "parameters": [ "Object", "Behavior", ">", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "min(Object.Behavior::PropertyHealth(), Object.Behavior::PropertyMaxHealth())" - ], - "subInstructions": [] + "max(0,Object.Behavior::PropertyShieldDuration() - Object.ObjectTimerElapsedTime(\"__Health.ShieldDuration\"))" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "How much to heal (will be added to object health)", - "longDescription": "", - "name": "HealValue", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the object health to set it to a specific value (check if the actions to damage or heal the object are not better suited to your use case before using this one).", - "fullName": "Change object health", - "functionType": "Action", - "group": "", - "name": "SetHealth", - "private": false, - "sentence": "Set health of _PARAM0_ to _PARAM2_", + "description": "current shield points of the object.", + "fullName": "Shield points", + "functionType": "ExpressionAndCondition", + "group": "Shield", + "name": "ShieldPoints", + "sentence": "shield points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24165,96 +29510,80 @@ "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::PropertyCurrentShieldPoints()" + ] } - ], - "events": [] + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Shield damage taken from most recent hit.", + "fullName": "Shield damage taken from most recent hit", + "functionType": "Expression", + "group": "Health", + "name": "PreviousDamageToShield", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Health::Health::PropertyMaxHealth" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "Health::Health::SetPropertyHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "min(Object.Behavior::PropertyHealth(), Object.Behavior::PropertyMaxHealth())" - ], - "subInstructions": [] + "Object.Behavior::PropertyShieldDamageTaken()" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New health value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "The health of the object.", - "fullName": "Health", + "description": "Health points gained from previous heal.", + "fullName": "Health points gained from previous heal", "functionType": "Expression", - "group": "", - "name": "Health", - "private": false, + "group": "Health", + "name": "PreviousHealAmount", "sentence": "", "events": [ { @@ -24263,36 +29592,27 @@ "actions": [ { "type": { - "inverted": false, "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHealth()" - ], - "subInstructions": [] + "Object.Behavior::PropertyHealToBeApplied()" + ] } - ], - "events": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Health::Health", "type": "behavior" } @@ -24304,32 +29624,92 @@ { "value": "100", "type": "Number", - "label": "Health", + "label": "Starting health (life) points", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": false, + "name": "Health" + }, + { + "value": "0", + "type": "Number", + "label": "Current health (life) points", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": true, + "name": "CurrentHealth" + }, + { + "value": "100", + "type": "Number", + "label": "Maximum health (points) Use \"0\" for no maximum", "description": "", - "group": "", + "group": "Health", "extraInformation": [], "hidden": false, - "name": "Health" + "name": "MaxHealth" }, { "value": "0", "type": "Number", - "label": "Damage cooldown (in seconds) (0 for no cooldown)", + "label": "Damage cooldown (seconds) Use \"0\" for no cooldown", "description": "", - "group": "", + "group": "Health", "extraInformation": [], "hidden": false, "name": "DamageCooldown" }, { - "value": "100", + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": true, + "name": "IsHealthJustDamaged" + }, + { + "value": "0", "type": "Number", - "label": "Maximum health (0 for no maximum)", + "label": "Rate of health regeneration (points per second)", "description": "", - "group": "", + "group": "Health regeneration", "extraInformation": [], "hidden": false, - "name": "MaxHealth" + "name": "HealthRegenRate" + }, + { + "value": "0", + "type": "Number", + "label": "Delay before health regeneration starts after being hit (seconds)", + "description": "", + "group": "Health regeneration", + "extraInformation": [], + "hidden": false, + "name": "HealthRegenDelay" + }, + { + "value": "", + "type": "Boolean", + "label": "Allow heals to increase health above max health (regen will never exceed max health)", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": false, + "name": "AllowOverHealing" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": true, + "name": "HitAtLeastOnce" }, { "value": "", @@ -24339,7 +29719,117 @@ "group": "", "extraInformation": [], "hidden": true, - "name": "IsJustDamaged" + "name": "IsJustHealed" + }, + { + "value": "", + "type": "Number", + "label": "Current shield points", + "description": "", + "group": "Shield", + "extraInformation": [], + "hidden": true, + "name": "CurrentShieldPoints" + }, + { + "value": "0", + "type": "Number", + "label": "Maximum shield (points) Use \"0\" for no maximum", + "description": "", + "group": "Shield", + "extraInformation": [], + "hidden": false, + "name": "MaxShieldPoints" + }, + { + "value": "5", + "type": "Number", + "label": "Duration of shield (seconds) Use \"0\" to make shield permanent", + "description": "", + "group": "Shield", + "extraInformation": [], + "hidden": false, + "name": "ShieldDuration" + }, + { + "value": "0", + "type": "Number", + "label": "Rate of shield regeneration (points per second)", + "description": "", + "group": "Shield regeneration", + "extraInformation": [], + "hidden": false, + "name": "ShieldRegenRate" + }, + { + "value": "", + "type": "Boolean", + "label": "Block excess damage when shield is broken", + "description": "", + "group": "Shield", + "extraInformation": [], + "hidden": false, + "name": "BlockExcessDamage" + }, + { + "value": "", + "type": "Number", + "label": "Delay before shield regeneration starts after being hit (seconds)", + "description": "", + "group": "Shield regeneration", + "extraInformation": [], + "hidden": false, + "name": "ShieldRegenDelay" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "Shield", + "extraInformation": [], + "hidden": true, + "name": "IsShieldJustDamaged" + }, + { + "value": "0", + "type": "Number", + "label": "Chance to dodge incoming damage (Range: 0 to 1) If damage is dodged, no damage is applied", + "description": "", + "group": "Health configuration", + "extraInformation": [], + "hidden": false, + "name": "ChanceToDodge" + }, + { + "value": "0", + "type": "Number", + "label": "Damage to health from the previous incoming damage", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": true, + "name": "DamageToBeApplied" + }, + { + "value": "0", + "type": "Number", + "label": "Flat damage reduction from armor (incoming damage is reduced by this value)", + "description": "", + "group": "Armor", + "extraInformation": [], + "hidden": false, + "name": "FlatDamageReduction" + }, + { + "value": "0", + "type": "Number", + "label": "Percentage damage reduction from armor (Range: 0 to 1)", + "description": "", + "group": "Armor", + "extraInformation": [], + "hidden": false, + "name": "PercentDamageReduction" }, { "value": "", @@ -24349,16 +29839,37 @@ "group": "", "extraInformation": [], "hidden": true, - "name": "CooldownActive" + "name": "IsJustDodged" + }, + { + "value": "", + "type": "Number", + "label": "Damage to shield from the previous incoming damage", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShieldDamageTaken" + }, + { + "value": "0", + "type": "Number", + "label": "Health points gained from the previous heal", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HealToBeApplied" } - ] + ], + "sharedPropertyDescriptors": [] } - ] + ], + "eventsBasedObjects": [] }, { "author": "@4ian", "category": "", - "description": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nAfter adding this to an object, you have to **trigger the effect** by using the **Flash action**.", "extensionNamespace": "", "fullName": "Flash (blink)", "helpPath": "", @@ -24367,6 +29878,10 @@ "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/flash-outline.svg", "shortDescription": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nTrigger the effect by using the Flash action.", "version": "1.0.0", + "description": [ + "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.", + "After adding this to an object, you have to **trigger the effect** by using the **Flash action**." + ], "origin": { "identifier": "Flash", "name": "gdevelop-extension-store" @@ -24392,12 +29907,9 @@ "objectType": "", "eventsFunctions": [ { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "doStepPreEvents", - "private": false, "sentence": "", "events": [ { @@ -24405,14 +29917,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "Flash::Flash::PropertyIsFlashing" }, "parameters": [ "Object", "Behavior" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -24422,66 +29932,55 @@ "conditions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"FlashTimer\"", "Object.Behavior::PropertyHalfPeriodTime()" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Visible" }, "parameters": [ "Object" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Cache" }, "parameters": [ "Object" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"FlashTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"FlashTimer\"", "Object.Behavior::PropertyHalfPeriodTime()" - ], - "subInstructions": [] + ] }, { "type": { @@ -24490,89 +29989,69 @@ }, "parameters": [ "Object" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Montre" }, "parameters": [ "Object", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"FlashTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"FlashDurationTimer\"", "Object.Behavior::PropertyFlashDuration()" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Flash::Flash::Stop" }, "parameters": [ "Object", "Behavior", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" } @@ -24583,9 +30062,7 @@ "description": "Make the specified object(s) blink for the given duration.", "fullName": "Flash (blink)", "functionType": "Action", - "group": "", "name": "Flash", - "private": false, "sentence": "Make _PARAM0_ blink for _PARAM2_ seconds", "events": [ { @@ -24593,32 +30070,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "GetArgumentAsNumber(\"FlashDuration\")", ">", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"FlashDurationTimer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Flash::Flash::SetPropertyFlashDuration" }, "parameters": [ @@ -24626,54 +30098,36 @@ "Behavior", "=", "GetArgumentAsNumber(\"FlashDuration\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Flash::Flash::SetPropertyIsFlashing" }, "parameters": [ "Object", "Behavior", "yes" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", "description": "Duration of the blinking, in seconds", - "longDescription": "", "name": "FlashDuration", - "optional": false, - "supplementaryInformation": "", "type": "expression" } ], @@ -24683,9 +30137,7 @@ "description": "Check if the specified objects are flashing.", "fullName": "Is object flashing", "functionType": "Condition", - "group": "", "name": "IsFlashing", - "private": false, "sentence": "_PARAM0_ is flashing", "events": [ { @@ -24694,65 +30146,48 @@ "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "False" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "Flash::Flash::PropertyIsFlashing" }, "parameters": [ "Object", "Behavior" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" } @@ -24760,12 +30195,9 @@ "objectGroups": [] }, { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "onOwnerRemovedFromScene", - "private": false, "sentence": "", "events": [ { @@ -24774,38 +30206,26 @@ "actions": [ { "type": { - "inverted": false, "value": "Flash::Flash::Stop" }, "parameters": [ "Object", "Behavior", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" } @@ -24813,12 +30233,9 @@ "objectGroups": [] }, { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "onDeActivate", - "private": false, "sentence": "", "events": [ { @@ -24827,38 +30244,26 @@ "actions": [ { "type": { - "inverted": false, "value": "Flash::Flash::Stop" }, "parameters": [ "Object", "Behavior", "" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" } @@ -24869,9 +30274,7 @@ "description": "Stop the flashing of the specified object.", "fullName": "Stop flashing", "functionType": "Action", - "group": "", "name": "Stop", - "private": false, "sentence": "Stop flashing _PARAM0_", "events": [ { @@ -24879,62 +30282,46 @@ "conditions": [ { "type": { - "inverted": false, "value": "Flash::Flash::PropertyIsFlashing" }, "parameters": [ "Object", "Behavior" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "Montre" }, "parameters": [ "Object", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Flash::Flash::SetPropertyIsFlashing" }, "parameters": [ "Object", "Behavior", "no" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "Flash::Flash", "type": "behavior" } @@ -24973,14 +30360,15 @@ "hidden": true, "name": "FlashDuration" } - ] + ], + "sharedPropertyDescriptors": [] } - ] + ], + "eventsBasedObjects": [] }, { "author": "Tristan Rhodes (https://victrisgames.itch.io/)", "category": "", - "description": "Select one or more methods of shaking:\n- Position: Shake the X and/or Y position of the object \n- Angle: Shake the angle (rotation) of the object \n- Scale: Shake the scale of the object (must be a sprite)\n\nControl how the object shakes:\n- Amplitude: How far the object moves during each shake\n- Duration: Amount of time to shake the object\n- Time between shakes: Amount of time between each movement of the object\n- Keep shaking until stopped (boolean)\n\nTips:\n- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)\n- To make the single-shake move in the opposite direction, use negative numbers \n- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" \n- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)\n- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. \n- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", "extensionNamespace": "", "fullName": "Shake Object (position, angle, scale)", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", @@ -24989,6 +30377,26 @@ "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", "shortDescription": "Shake an object, using one or more ways to shake (position, angle, scale).", "version": "1.5.5", + "description": [ + "Select one or more methods of shaking:", + "- Position: Shake the X and/or Y position of the object ", + "- Angle: Shake the angle (rotation) of the object ", + "- Scale: Shake the scale of the object (must be a sprite)", + "", + "Control how the object shakes:", + "- Amplitude: How far the object moves during each shake", + "- Duration: Amount of time to shake the object", + "- Time between shakes: Amount of time between each movement of the object", + "- Keep shaking until stopped (boolean)", + "", + "Tips:", + "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", + "- To make the single-shake move in the opposite direction, use negative numbers ", + "- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" ", + "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", + "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", + "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing" + ], "origin": { "identifier": "ShakeObject", "name": "gdevelop-extension-store" @@ -25019,9 +30427,7 @@ "description": "Shake an object, using one or more ways to shake (position, angle).", "fullName": "Shake object (position, angle)", "functionType": "Action", - "group": "", "name": "ShakeObject_PositionAngle", - "private": false, "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_. Wait _PARAM6_ seconds between shakes. Keep shaking until stopped: _PARAM7_", "events": [ { @@ -25052,17 +30458,14 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25083,7 +30486,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25091,12 +30493,10 @@ "__ShakeObject_Duration", "=", "GetArgumentAsNumber(\"Duration\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25104,12 +30504,10 @@ "__ShakeObject_PowerX", "=", "GetArgumentAsNumber(\"PowerX\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25117,12 +30515,10 @@ "__ShakeObject_PowerY", "=", "GetArgumentAsNumber(\"PowerY\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25130,12 +30526,10 @@ "__ShakeObject_PowerAngle", "=", "GetArgumentAsNumber(\"PowerAngle\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25143,11 +30537,9 @@ "__ShakeObject_TimeBetweenShakes", "=", "GetArgumentAsNumber(\"TimeBetweenShakes\")" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25168,48 +30560,40 @@ "actions": [ { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "False" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"ShakeForever\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25229,7 +30613,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25237,14 +30620,12 @@ "__ShakeObject_Duration", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25252,18 +30633,15 @@ "__ShakeObject_Duration", "=", "0.5" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25271,14 +30649,12 @@ "__ShakeObject_TimeBetweenShakes", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25286,11 +30662,9 @@ "__ShakeObject_TimeBetweenShakes", "=", "0.08" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25310,7 +30684,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25318,14 +30691,12 @@ "__ShakeObject_Duration", "<", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25333,11 +30704,9 @@ "__ShakeObject_Duration", "=", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25357,7 +30726,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25365,14 +30733,12 @@ "__ShakeObject_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25380,11 +30746,9 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25405,7 +30769,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25413,11 +30776,9 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -25425,95 +30786,54 @@ ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", "description": "Duration of shake (in seconds) (Default: 0.5) ", - "longDescription": "", "name": "Duration", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", - "longDescription": "", "name": "PowerX", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", - "longDescription": "", "name": "PowerY", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", - "longDescription": "", "name": "PowerAngle", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amount of time between shakes (in seconds) (Default: 0.08)", - "longDescription": "", "name": "TimeBetweenShakes", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Keep shaking until stopped", "longDescription": "Duration value will be ignored", "name": "ShakeForever", - "optional": false, - "supplementaryInformation": "", "type": "yesorno" } ], "objectGroups": [] }, { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "doStepPostEvents", - "private": false, "sentence": "", "events": [ { @@ -25539,7 +30859,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25547,8 +30866,7 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -25571,21 +30889,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "True" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25593,22 +30908,18 @@ "__ShakeObject_Duration", "=", "100" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -25637,14 +30948,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25652,20 +30961,17 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } ] } @@ -25673,18 +30979,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25692,8 +30995,7 @@ "__ShakeObject_ShakeCounter", "+", "1" - ], - "subInstructions": [] + ] } ], "events": [ @@ -25724,14 +31026,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25739,12 +31039,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25752,8 +31050,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -25761,37 +31058,31 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25799,25 +31090,21 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_AngleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -25838,7 +31125,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25846,12 +31132,10 @@ "__ShakeObject_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25859,12 +31143,10 @@ "__ShakeObject_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -25872,11 +31154,9 @@ "__ShakeObject_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -25899,14 +31179,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25914,12 +31192,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25927,8 +31203,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -25966,7 +31241,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25974,8 +31248,7 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -25985,7 +31258,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -25993,14 +31265,12 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26008,18 +31278,15 @@ "__ShakeObject_DisplacementX", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26027,14 +31294,12 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26042,11 +31307,9 @@ "__ShakeObject_DisplacementY", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -26068,7 +31331,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26076,8 +31338,7 @@ "__ShakeObject_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -26087,7 +31348,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26095,14 +31355,12 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26110,18 +31368,15 @@ "__ShakeObject_DisplacementX", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26129,14 +31384,12 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26144,11 +31397,9 @@ "__ShakeObject_DisplacementY", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -26172,7 +31423,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26180,8 +31430,7 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -26217,21 +31466,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26239,11 +31485,9 @@ "__ShakeObject_DisplacementAngle", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -26276,21 +31520,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26298,11 +31539,9 @@ "__ShakeObject_DisplacementAngle", "=", "-1 *(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -26325,7 +31564,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26333,11 +31571,9 @@ "__ShakeObject_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -26372,7 +31608,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26380,11 +31615,9 @@ "__ShakeObject_PercentTimeElapsedThisFrame", "=", "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -26411,8 +31644,7 @@ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -26435,14 +31667,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26450,12 +31680,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26463,8 +31691,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -26472,27 +31699,23 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -26515,7 +31738,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26523,12 +31745,10 @@ "__ShakeObject_DisplacementTravelledX", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26536,11 +31756,9 @@ "__ShakeObject_DisplacementTravelledY", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -26562,29 +31780,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -26607,7 +31821,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26615,11 +31828,9 @@ "__ShakeObject_AngleTravelled", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -26643,15 +31854,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -26674,14 +31883,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26689,12 +31896,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26702,8 +31907,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -26711,27 +31915,23 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -26754,7 +31954,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26762,12 +31961,10 @@ "__ShakeObject_DisplacementTravelledX", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26775,11 +31972,9 @@ "__ShakeObject_DisplacementTravelledY", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -26801,29 +31996,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -26846,7 +32037,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26854,11 +32044,9 @@ "__ShakeObject_AngleTravelled", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -26899,26 +32087,22 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"", "Object.Variable(__ShakeObject_Duration)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -26926,24 +32110,20 @@ "__ShakeObject_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26951,12 +32131,10 @@ "__ShakeObject_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -26964,8 +32142,7 @@ "__ShakeObject_ShakeCounter", "=", "0" - ], - "subInstructions": [] + ] } ], "events": [ @@ -26996,14 +32173,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27011,12 +32186,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27024,8 +32197,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -27033,37 +32205,31 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27071,25 +32237,21 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_AngleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27110,7 +32272,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27118,12 +32279,10 @@ "__ShakeObject_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27131,12 +32290,10 @@ "__ShakeObject_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27144,11 +32301,9 @@ "__ShakeObject_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -27164,22 +32319,13 @@ ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", "type": "behavior" } @@ -27190,9 +32336,7 @@ "description": "Stop any shaking of object that was initiated by the Shake Object extension.", "fullName": "Stop shaking the object", "functionType": "Action", - "group": "", "name": "StopShaking", - "private": false, "sentence": "Stop shaking _PARAM0_", "events": [ { @@ -27200,21 +32344,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" }, "parameters": [ "Object", "Behavior", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27222,31 +32363,20 @@ "__ShakeObject_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", "type": "behavior" } @@ -27257,9 +32387,7 @@ "description": "Check if an object is shaking.", "fullName": "Check if an object is shaking", "functionType": "Condition", - "group": "", "name": "IsShaking", - "private": false, "sentence": "_PARAM0_ is shaking", "events": [ { @@ -27267,7 +32395,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27275,43 +32402,30 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, - "supplementaryInformation": "", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", "type": "behavior" } @@ -27319,7 +32433,8 @@ "objectGroups": [] } ], - "propertyDescriptors": [] + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] }, { "description": "Shake an object, using one or more ways to shake (position, angle, scale)\nThis behavior can only be used on sprite objects.", @@ -27331,9 +32446,7 @@ "description": "Shake an object, using one or more ways to shake (position, angle, scale).", "fullName": "Shake object (position, angle, scale)", "functionType": "Action", - "group": "", "name": "ShakeObject_PositionAngleScale", - "private": false, "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_, and scale amplitude _PARAM6_. Wait _PARAM7_ seconds between shakes. Keep shaking until stopped: _PARAM8_", "events": [ { @@ -27364,17 +32477,14 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27395,7 +32505,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27403,12 +32512,10 @@ "__ShakeObject_Duration", "=", "GetArgumentAsNumber(\"Duration\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27416,12 +32523,10 @@ "__ShakeObject_PowerX", "=", "GetArgumentAsNumber(\"PowerX\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27429,12 +32534,10 @@ "__ShakeObject_PowerY", "=", "GetArgumentAsNumber(\"PowerY\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27442,12 +32545,10 @@ "__ShakeObject_PowerAngle", "=", "GetArgumentAsNumber(\"PowerAngle\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27455,12 +32556,10 @@ "__ShakeObject_PowerScale", "=", "GetArgumentAsNumber(\"PowerScale\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27468,11 +32567,9 @@ "__ShakeObject_TimeBetweenShakes", "=", "GetArgumentAsNumber(\"TimeBetweenShakes\")" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27493,48 +32590,40 @@ "actions": [ { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "False" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"ShakeForever\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27554,7 +32643,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27562,14 +32650,12 @@ "__ShakeObject_Duration", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27577,18 +32663,15 @@ "__ShakeObject_Duration", "=", "0.5" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27596,14 +32679,12 @@ "__ShakeObject_TimeBetweenShakes", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27611,11 +32692,9 @@ "__ShakeObject_TimeBetweenShakes", "=", "0.08" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27635,7 +32714,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27643,14 +32721,12 @@ "__ShakeObject_Duration", "<", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27658,11 +32734,9 @@ "__ShakeObject_Duration", "=", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27682,7 +32756,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27690,14 +32763,12 @@ "__ShakeObject_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27705,11 +32776,9 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -27730,7 +32799,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27738,11 +32806,9 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -27750,105 +32816,60 @@ ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, "supplementaryInformation": "Sprite", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", "type": "behavior" }, { - "codeOnly": false, - "defaultValue": "", "description": "Duration of shake (in seconds) (Default: 0.5)", - "longDescription": "", "name": "Duration", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", - "longDescription": "", "name": "PowerX", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", - "longDescription": "", "name": "PowerY", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", - "longDescription": "", "name": "PowerAngle", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of scale shake (in percent change) (For example: 5)", - "longDescription": "", "name": "PowerScale", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amount of time between shakes (in seconds) (Default: 0.08)", - "longDescription": "", "name": "TimeBetweenShakes", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Keep shaking until stopped", "longDescription": "Duration value will be ignored", "name": "ShakeForever", - "optional": false, - "supplementaryInformation": "", "type": "yesorno" } ], "objectGroups": [] }, { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "doStepPostEvents", - "private": false, "sentence": "", "events": [ { @@ -27874,7 +32895,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27882,8 +32902,7 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -27906,21 +32925,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "ObjectVariableAsBoolean" }, "parameters": [ "Object", "__ShakeObject_ShakeForever", "True" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -27928,22 +32944,18 @@ "__ShakeObject_Duration", "=", "100" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -27972,14 +32984,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -27987,20 +32997,17 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } ] } @@ -28008,18 +33015,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28027,8 +33031,7 @@ "__ShakeObject_ShakeCounter", "+", "1" - ], - "subInstructions": [] + ] } ], "events": [ @@ -28060,14 +33063,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28075,12 +33076,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28088,8 +33087,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -28097,37 +33095,31 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28135,32 +33127,27 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_AngleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28168,25 +33155,21 @@ "__ShakeObject_PowerScale", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeScale" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_ScaleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -28207,7 +33190,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28215,12 +33197,10 @@ "__ShakeObject_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28228,12 +33208,10 @@ "__ShakeObject_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28241,12 +33219,10 @@ "__ShakeObject_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28254,11 +33230,9 @@ "__ShakeObject_ScaleTravelled", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -28281,14 +33255,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28296,12 +33268,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28309,8 +33279,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -28348,7 +33317,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28356,8 +33324,7 @@ "__ShakeObject_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -28367,7 +33334,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28375,14 +33341,12 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28390,18 +33354,15 @@ "__ShakeObject_DisplacementX", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28409,14 +33370,12 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28424,11 +33383,9 @@ "__ShakeObject_DisplacementY", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -28450,7 +33407,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28458,8 +33414,7 @@ "__ShakeObject_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -28469,7 +33424,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28477,14 +33431,12 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28492,18 +33444,15 @@ "__ShakeObject_DisplacementX", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28511,14 +33460,12 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28526,11 +33473,9 @@ "__ShakeObject_DisplacementY", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -28554,7 +33499,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28562,8 +33506,7 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -28599,21 +33542,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28621,11 +33561,9 @@ "__ShakeObject_DisplacementAngle", "=", "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -28658,21 +33596,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28680,11 +33615,9 @@ "__ShakeObject_DisplacementAngle", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -28706,7 +33639,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28714,8 +33646,7 @@ "__ShakeObject_PowerScale", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -28764,21 +33695,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28786,11 +33714,9 @@ "__ShakeObject_DisplacementScale", "=", "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -28823,21 +33749,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28845,11 +33768,9 @@ "__ShakeObject_DisplacementScale", "=", "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -28872,7 +33793,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28880,11 +33800,9 @@ "__ShakeObject_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -28919,7 +33837,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -28927,11 +33844,9 @@ "__ShakeObject_PercentTimeElapsedThisFrame", "=", "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -28958,8 +33873,7 @@ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -28982,14 +33896,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -28997,12 +33909,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29010,8 +33920,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -29019,27 +33928,23 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29062,7 +33967,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29070,12 +33974,10 @@ "__ShakeObject_DisplacementTravelledX", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29083,11 +33985,9 @@ "__ShakeObject_DisplacementTravelledY", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -29109,29 +34009,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29154,7 +34050,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29162,11 +34057,9 @@ "__ShakeObject_AngleTravelled", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -29188,29 +34081,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerScale)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeScale" }, "parameters": [ "Object", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29233,7 +34122,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29241,11 +34129,9 @@ "__ShakeObject_ScaleTravelled", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -29269,15 +34155,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_ShakeTimer\"", "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -29300,14 +34184,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29315,12 +34197,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29328,8 +34208,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -29337,27 +34216,23 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29380,7 +34255,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29388,12 +34262,10 @@ "__ShakeObject_DisplacementTravelledX", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29401,11 +34273,9 @@ "__ShakeObject_DisplacementTravelledY", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -29427,29 +34297,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29472,7 +34338,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29480,11 +34345,9 @@ "__ShakeObject_AngleTravelled", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -29506,29 +34369,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "Object.Variable(__ShakeObject_PowerScale)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeScale" }, "parameters": [ "Object", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29551,7 +34410,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29559,11 +34417,9 @@ "__ShakeObject_ScaleTravelled", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -29604,26 +34460,22 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "ObjectTimer" }, "parameters": [ "Object", "\"__ShakeObject_DurationTimer\"", "Object.Variable(__ShakeObject_Duration)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29631,24 +34483,20 @@ "__ShakeObject_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29656,12 +34504,10 @@ "__ShakeObject_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29669,8 +34515,7 @@ "__ShakeObject_ShakeCounter", "=", "0" - ], - "subInstructions": [] + ] } ], "events": [ @@ -29701,14 +34546,12 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29716,12 +34559,10 @@ "__ShakeObject_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29729,8 +34570,7 @@ "__ShakeObject_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -29738,37 +34578,31 @@ "actions": [ { "type": { - "inverted": false, "value": "MettreX" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "MettreY" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29776,32 +34610,27 @@ "__ShakeObject_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetAngle" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_AngleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -29809,25 +34638,21 @@ "__ShakeObject_PowerScale", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeScale" }, "parameters": [ "Object", "-", "Object.Variable(__ShakeObject_ScaleTravelled)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -29848,7 +34673,6 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29856,12 +34680,10 @@ "__ShakeObject_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29869,12 +34691,10 @@ "__ShakeObject_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29882,12 +34702,10 @@ "__ShakeObject_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29895,11 +34713,9 @@ "__ShakeObject_ScaleTravelled", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -29915,22 +34731,14 @@ ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, "supplementaryInformation": "Sprite", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", "type": "behavior" } @@ -29941,9 +34749,7 @@ "description": "Stop shaking an object.", "fullName": "Stop shaking an object", "functionType": "Action", - "group": "", "name": "StopShaking", - "private": false, "sentence": "Stop shaking _PARAM0_", "events": [ { @@ -29951,21 +34757,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" }, "parameters": [ "Object", "Behavior", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarObjet" }, "parameters": [ @@ -29973,31 +34776,21 @@ "__ShakeObject_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, "supplementaryInformation": "Sprite", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", "type": "behavior" } @@ -30008,9 +34801,7 @@ "description": "Check if an object is shaking.", "fullName": "Check if an object is shaking", "functionType": "Condition", - "group": "", "name": "IsShaking", - "private": false, "sentence": "_PARAM0_ is shaking", "events": [ { @@ -30018,7 +34809,6 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarObjet" }, "parameters": [ @@ -30026,43 +34816,31 @@ "__ShakeObject_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Object", - "longDescription": "", "name": "Object", - "optional": false, "supplementaryInformation": "Sprite", "type": "object" }, { - "codeOnly": false, - "defaultValue": "", "description": "Behavior", - "longDescription": "", "name": "Behavior", - "optional": false, "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", "type": "behavior" } @@ -30070,14 +34848,15 @@ "objectGroups": [] } ], - "propertyDescriptors": [] + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] } - ] + ], + "eventsBasedObjects": [] }, { "author": "westboy31, Tristan Rhodes (https://victrisgames.itch.io/)", "category": "", - "description": "Ideal for explosions, hit/impacts, earthquake, etc.\n\nSelect one or more methods of shaking:\n- Position: Shake the X and/or Y position of the camera \n- Angle: Shake the rotation of the camera \n- Zoom: Shake the zoom level of the camera \n\nControl how the camera shakes:\n- Amplitude: How far the camera moves during each shake\n- Duration: Amount of time to shake the camera\n- Time between shakes: Amount of time between each change of the movement of the camera\n- Keep shaking until stopped (boolean)\n\nTips:\n- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)\n- To make the single-shake move in the opposite direction, use negative numbers \n- To repeat a single-shake effect in a loop, add a condition \"Camera is not shaking\" \n- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)\n- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. \n- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing\n", "extensionNamespace": "", "fullName": "Camera Shake", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", @@ -30086,6 +34865,29 @@ "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", "shortDescription": "Shake the camera on the specified layer using one or more methods of shaking (position, angle, zoom).", "version": "2.6.5", + "description": [ + "Ideal for explosions, hit/impacts, earthquake, etc.", + "", + "Select one or more methods of shaking:", + "- Position: Shake the X and/or Y position of the camera ", + "- Angle: Shake the rotation of the camera ", + "- Zoom: Shake the zoom level of the camera ", + "", + "Control how the camera shakes:", + "- Amplitude: How far the camera moves during each shake", + "- Duration: Amount of time to shake the camera", + "- Time between shakes: Amount of time between each change of the movement of the camera", + "- Keep shaking until stopped (boolean)", + "", + "Tips:", + "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", + "- To make the single-shake move in the opposite direction, use negative numbers ", + "- To repeat a single-shake effect in a loop, add a condition \"Camera is not shaking\" ", + "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", + "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", + "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", + "" + ], "origin": { "identifier": "CameraShake", "name": "gdevelop-extension-store" @@ -30109,9 +34911,7 @@ "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom).", "fullName": "Camera Shake", "functionType": "Action", - "group": "", "name": "CameraShake", - "private": false, "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", "events": [ { @@ -30142,17 +34942,14 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"__CameraShake_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30173,102 +34970,85 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_PowerX", "=", "GetArgumentAsNumber(\"PowerX\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_PowerY", "=", "GetArgumentAsNumber(\"PowerY\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobalTxt" }, "parameters": [ "__CameraShake_Layer", "=", "GetArgumentAsString(\"Layer\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_Camera", "=", "GetArgumentAsNumber(\"Camera\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_Duration", "=", "GetArgumentAsNumber(\"Duration\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_PowerAngle", "=", "GetArgumentAsNumber(\"PowerAngle\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_PowerZoom", "=", "GetArgumentAsNumber(\"PowerZoom\")" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_TimeBetweenShakes", "=", "GetArgumentAsNumber(\"TimeBetweenShakes\")" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30289,46 +35069,38 @@ "actions": [ { "type": { - "inverted": false, "value": "SetGlobalVariableAsBoolean" }, "parameters": [ "__CameraShake_ShakeForever", "False" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"ShakeForever\"" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetGlobalVariableAsBoolean" }, "parameters": [ "__CameraShake_ShakeForever", "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30348,64 +35120,54 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_Duration", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_Duration", "=", "0.5" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_TimeBetweenShakes", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_TimeBetweenShakes", "=", "0.08" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30425,32 +35187,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_Duration", "<", "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_Duration", "=", "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30470,32 +35227,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30516,18 +35268,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -30535,105 +35284,58 @@ ], "parameters": [ { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of shaking on the X axis (pixels) (For example: 5)", - "longDescription": "", "name": "PowerX", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amplitude of shaking on the Y axis (pixels) (For example: 5)", - "longDescription": "", "name": "PowerY", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Layer (base layer if empty)", - "longDescription": "", "name": "Layer", - "optional": false, - "supplementaryInformation": "", "type": "layer" }, { - "codeOnly": false, - "defaultValue": "", "description": "Camera index (Default: 0)", - "longDescription": "", "name": "Camera", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Duration (seconds) (Default: 0.5)", - "longDescription": "", "name": "Duration", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Angle rotation amplitude (degrees) (For example: 2)", - "longDescription": "", "name": "PowerAngle", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Zoom amplitude (percent change) (For example: 3)", - "longDescription": "", "name": "PowerZoom", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Amount of time between shakes (seconds) (Default: 0.08)", - "longDescription": "", "name": "TimeBetweenShakes", - "optional": false, - "supplementaryInformation": "", "type": "expression" }, { - "codeOnly": false, - "defaultValue": "", "description": "Keep shaking until stopped", "longDescription": "Duration value will be ignored", "name": "ShakeForever", - "optional": false, - "supplementaryInformation": "", "type": "yesorno" } ], "objectGroups": [] }, { - "description": "", "fullName": "", "functionType": "Action", - "group": "", "name": "onScenePostEvents", - "private": false, "sentence": "", "events": [ { @@ -30659,15 +35361,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -30690,42 +35390,35 @@ "conditions": [ { "type": { - "inverted": false, "value": "GlobalVariableAsBoolean" }, "parameters": [ "__CameraShake_ShakeForever", "True" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_Duration", "=", "100" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"__CameraShake_DurationTimer\"" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "colorB": 228, @@ -30754,34 +35447,29 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_InitialShake", "=", "1" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "Timer" }, "parameters": [ "", "GlobalVariable(__CameraShake_TimeBetweenShakes)", "\"__CameraShake_ShakeTimer\"" - ], - "subInstructions": [] + ] } ] } @@ -30789,26 +35477,22 @@ "actions": [ { "type": { - "inverted": false, "value": "ResetTimer" }, "parameters": [ "", "\"__CameraShake_ShakeTimer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ShakeCounter", "+", "1" - ], - "subInstructions": [] + ] } ], "events": [ @@ -30840,21 +35524,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "RotateCamera" }, "parameters": [ @@ -30863,32 +35544,27 @@ "GlobalVariable(__CameraShake_AngleTravelled)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerZoom", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -30896,45 +35572,38 @@ "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -30942,7 +35611,6 @@ "actions": [ { "type": { - "inverted": false, "value": "SetCameraX" }, "parameters": [ @@ -30951,12 +35619,10 @@ "GlobalVariable(__CameraShake_DisplacementTravelledX)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCameraY" }, "parameters": [ @@ -30965,11 +35631,9 @@ "GlobalVariable(__CameraShake_DisplacementTravelledY)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -30990,54 +35654,45 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ZoomTravelled", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -31060,34 +35715,29 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -31125,15 +35775,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_InitialShake", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -31143,64 +35791,54 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementX", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementY", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -31222,15 +35860,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -31240,64 +35876,54 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementX", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementY", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY) * RandomWithStep(-1, 1, 2)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -31321,15 +35947,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -31365,32 +35989,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementAngle", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -31423,32 +36042,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementAngle", "=", "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -31470,15 +36084,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerZoom", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -31527,32 +36139,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", "=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementZoom", "=", "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -31585,32 +36192,27 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementZoom", "=", "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -31633,18 +36235,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_InitialShake", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -31679,18 +36278,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarScene" }, "parameters": [ "__CameraShake_PercentTimeElapsedThisFrame", "=", "min(1,TimeDelta()/GlobalVariable(__CameraShake_TimeBetweenShakes))" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -31717,8 +36313,7 @@ "", "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", "\"__CameraShake_ShakeTimer\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -31741,34 +36336,29 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -31776,7 +36366,6 @@ "actions": [ { "type": { - "inverted": false, "value": "CameraX" }, "parameters": [ @@ -31785,12 +36374,10 @@ "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CameraY" }, "parameters": [ @@ -31799,8 +36386,7 @@ "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -31823,30 +36409,25 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledX", "-", "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledY", "-", "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -31868,21 +36449,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "GlobalVariable(__CameraShake_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "RotateCamera" }, "parameters": [ @@ -31891,8 +36469,7 @@ "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", "", "" - ], - "subInstructions": [] + ] } ], "events": [ @@ -31915,18 +36492,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_AngleTravelled", "+", "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -31948,21 +36522,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "GlobalVariable(__CameraShake_PowerZoom)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -31970,8 +36541,7 @@ "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) + round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -31994,18 +36564,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ZoomTravelled", "+", "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -32029,15 +36596,13 @@ "conditions": [ { "type": { - "inverted": false, "value": "Timer" }, "parameters": [ "", "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", "\"__CameraShake_ShakeTimer\"" - ], - "subInstructions": [] + ] } ], "actions": [], @@ -32060,34 +36625,29 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -32095,7 +36655,6 @@ "actions": [ { "type": { - "inverted": false, "value": "CameraX" }, "parameters": [ @@ -32104,12 +36663,10 @@ "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "CameraY" }, "parameters": [ @@ -32118,8 +36675,7 @@ "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -32142,30 +36698,25 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledX", "+", "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledY", "+", "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -32187,21 +36738,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "GlobalVariable(__CameraShake_PowerAngle)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "RotateCamera" }, "parameters": [ @@ -32210,8 +36758,7 @@ "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", "", "" - ], - "subInstructions": [] + ] } ], "events": [ @@ -32234,18 +36781,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_AngleTravelled", "-", "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] }, @@ -32267,21 +36811,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "Egal" }, "parameters": [ "GlobalVariable(__CameraShake_PowerZoom)", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -32289,8 +36830,7 @@ "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } ], "events": [ @@ -32313,18 +36853,15 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ZoomTravelled", "-", "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ] } @@ -32365,58 +36902,49 @@ "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "Timer" }, "parameters": [ "", "GlobalVariable(__CameraShake_Duration)", "\"__CameraShake_DurationTimer\"" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } ] }, { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Once" }, - "parameters": [], - "subInstructions": [] + "parameters": [] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "0" - ], - "subInstructions": [] + ] } ], "events": [ @@ -32447,21 +36975,18 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerAngle", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "RotateCamera" }, "parameters": [ @@ -32470,32 +36995,27 @@ "GlobalVariable(__CameraShake_AngleTravelled)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerZoom", "!=", "0" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ZoomCamera" }, "parameters": [ @@ -32503,45 +37023,38 @@ "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerX", "!=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_PowerY", "!=", "0" - ], - "subInstructions": [] + ] } ] } @@ -32549,7 +37062,6 @@ "actions": [ { "type": { - "inverted": false, "value": "SetCameraX" }, "parameters": [ @@ -32558,12 +37070,10 @@ "GlobalVariable(__CameraShake_DisplacementTravelledX)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "SetCameraY" }, "parameters": [ @@ -32572,11 +37082,9 @@ "GlobalVariable(__CameraShake_DisplacementTravelledY)", "GlobalVariableString(__CameraShake_Layer)", "GlobalVariable(__CameraShake_Camera)" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { "type": "BuiltinCommonInstructions::Comment", @@ -32597,66 +37105,55 @@ "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledX", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_DisplacementTravelledY", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_AngleTravelled", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ZoomTravelled", "=", "0" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ShakeCounter", "=", "0" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [] @@ -32677,9 +37174,7 @@ "description": "Check if camera is shaking.", "fullName": "Check if camera is shaking", "functionType": "Condition", - "group": "", "name": "IsShaking", - "private": false, "sentence": " Camera is shaking", "events": [ { @@ -32687,30 +37182,25 @@ "conditions": [ { "type": { - "inverted": false, "value": "VarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "1" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "SetReturnBoolean" }, "parameters": [ "True" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [], @@ -32720,9 +37210,7 @@ "description": "Stop shaking the camera.", "fullName": "Stop shaking the camera", "functionType": "Action", - "group": "", "name": "StopShaking", - "private": false, "sentence": "Stop shaking the camera", "events": [ { @@ -32730,38 +37218,34 @@ "conditions": [ { "type": { - "inverted": false, "value": "CameraShake::IsShaking" }, "parameters": [ "", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ModVarGlobal" }, "parameters": [ "__CameraShake_ShakeInProgress", "=", "-1" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] } ], "parameters": [], "objectGroups": [] } ], - "eventsBasedBehaviors": [] + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] } ], "externalLayouts": [],