diff --git a/examples/top-down-rpg/README.md b/examples/top-down-rpg/README.md new file mode 100644 index 000000000..3d478cc31 --- /dev/null +++ b/examples/top-down-rpg/README.md @@ -0,0 +1 @@ +A monster tamer style top down rpg game example. Including top down movement, scrolling text during chat, camera controls, and a simple battle sequence. \ No newline at end of file diff --git a/examples/top-down-rpg/Top-down-rpg.json b/examples/top-down-rpg/Top-down-rpg.json new file mode 100644 index 000000000..759b64c6a --- /dev/null +++ b/examples/top-down-rpg/Top-down-rpg.json @@ -0,0 +1,26777 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": false, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.example.topdownrpg", + "pixelsRounding": false, + "projectUuid": "247f11a2-f6aa-4ab8-94bd-afb11dd8f3f9", + "scaleMode": "nearest", + "sizeOnStartupMode": "adaptWidth", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Top Down Rpg", + "description": "A monster tamer style top down rpg game example. Including top down movement, scrolling text during chat, camera controls, and a simple battle sequence.", + "author": "", + "windowWidth": 1920, + "windowHeight": 1080, + "latestCompilationDirectory": "", + "maxFPS": 60, + "minFPS": 20, + "verticalSync": false, + "platformSpecificAssets": { + "android-icon-144": "", + "android-icon-192": "", + "android-icon-36": "", + "android-icon-48": "", + "android-icon-72": "", + "android-icon-96": "", + "android-windowSplashScreenAnimatedIcon": "", + "desktop-icon-512": "", + "ios-icon-100": "", + "ios-icon-1024": "", + "ios-icon-114": "", + "ios-icon-120": "", + "ios-icon-144": "", + "ios-icon-152": "", + "ios-icon-167": "", + "ios-icon-180": "", + "ios-icon-20": "", + "ios-icon-29": "", + "ios-icon-40": "", + "ios-icon-50": "", + "ios-icon-57": "", + "ios-icon-58": "", + "ios-icon-60": "", + "ios-icon-72": "", + "ios-icon-76": "", + "ios-icon-80": "", + "ios-icon-87": "", + "liluo-thumbnail": "thumbnail.png" + }, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0.2, + "minDuration": 1.5, + "progressBarColor": 16777215, + "progressBarHeight": 20, + "progressBarMaxWidth": 200, + "progressBarMinWidth": 40, + "progressBarWidthPercent": 30, + "showGDevelopSplash": true, + "showProgressBar": true + }, + "authorIds": [ + "9MGDlUQAh8QUilno4JPycekjRCJ3" + ], + "categories": [ + "rpg" + ], + "playableDevices": [ + "keyboard" + ], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/ACharDown1.png", + "kind": "image", + "metadata": "", + "name": "ACharDown1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharDown2.png", + "kind": "image", + "metadata": "", + "name": "ACharDown2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharDown3.png", + "kind": "image", + "metadata": "", + "name": "ACharDown3.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharDown4.png", + "kind": "image", + "metadata": "", + "name": "ACharDown4.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACgarRight1.png", + "kind": "image", + "metadata": "", + "name": "ACgarRight1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACgarRight2.png", + "kind": "image", + "metadata": "", + "name": "ACgarRight2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACgarRight3.png", + "kind": "image", + "metadata": "", + "name": "ACgarRight3.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACgarRight4.png", + "kind": "image", + "metadata": "", + "name": "ACgarRight4.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharLeft1.png", + "kind": "image", + "metadata": "", + "name": "ACharLeft1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharLeft2.png", + "kind": "image", + "metadata": "", + "name": "ACharLeft2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharLeft3.png", + "kind": "image", + "metadata": "", + "name": "ACharLeft3.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharLeft4.png", + "kind": "image", + "metadata": "", + "name": "ACharLeft4.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharUp1.png", + "kind": "image", + "metadata": "", + "name": "ACharUp1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharUp2.png", + "kind": "image", + "metadata": "", + "name": "ACharUp2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharUp3.png", + "kind": "image", + "metadata": "", + "name": "ACharUp3.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/ACharUp4.png", + "kind": "image", + "metadata": "", + "name": "ACharUp4.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Dock1.png", + "kind": "image", + "metadata": "", + "name": "Dock1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Tree1.png", + "kind": "image", + "metadata": "", + "name": "Tree1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Tree2.png", + "kind": "image", + "metadata": "", + "name": "Tree2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Bush1.png", + "kind": "image", + "metadata": "", + "name": "Bush1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/House1.png", + "kind": "image", + "metadata": "", + "name": "House1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/House2.png", + "kind": "image", + "metadata": "", + "name": "House2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/WaterCorner.png", + "kind": "image", + "metadata": "", + "name": "WaterCorner.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Grass1.png", + "kind": "image", + "metadata": "", + "name": "Grass1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/WaterEdgeRight.png", + "kind": "image", + "metadata": "", + "name": "WaterEdgeRight.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/WaterEdgeUp.png", + "kind": "image", + "metadata": "", + "name": "WaterEdgeUp.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Water1.png", + "kind": "image", + "metadata": "", + "name": "Water1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/RoadEdge1.png", + "kind": "image", + "metadata": "", + "name": "RoadEdge1.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Enemy_Spawn_Location.png", + "kind": "image", + "metadata": "", + "name": "Enemy_Spawn_Location.png", + "smoothed": false, + "userAdded": true + }, + { + "file": "assets/8BitOperatorPlus8Regular_Edited.fnt", + "kind": "bitmapFont", + "metadata": "", + "name": "8BitOperatorPlus8Regular_Edited.fnt", + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/8BitOperatorPlus8Regular_Edited.png", + "kind": "image", + "metadata": "", + "name": "8BitOperatorPlus8Regular_Edited.png", + "smoothed": false, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Border.png", + "kind": "image", + "metadata": "", + "name": "Border.png", + "smoothed": false, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Border2.png", + "kind": "image", + "metadata": "", + "name": "Border2.png", + "smoothed": false, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Healthbar.png", + "kind": "image", + "metadata": "", + "name": "Healthbar.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/HealthbarBorder.png", + "kind": "image", + "metadata": "", + "name": "HealthbarBorder.png", + "smoothed": false, + "userAdded": true + }, + { + "file": "assets/Attack.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.1,\\\"sustainPunch\\\":50,\\\"decay\\\":0.35000000000000003,\\\"tremoloDepth\\\":19,\\\"tremoloFrequency\\\":27,\\\"frequency\\\":10000,\\\"frequencySweep\\\":-4800,\\\"frequencyDeltaSweep\\\":-4100,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"brownnoise\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":50,\\\"squareDutySweep\\\":0,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"Attack\"}}", + "name": "Attack.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/Talk.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0.03461516912647311,\\\"sustain\\\":0.06,\\\"sustainPunch\\\":0,\\\"decay\\\":0.2,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":399.07212207604067,\\\"frequencySweep\\\":9999.999999999698,\\\"frequencyDeltaSweep\\\":0.8611028349862437,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"square\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":370,\\\"vibratoFrequency\\\":572,\\\"squareDuty\\\":10,\\\"squareDutySweep\\\":-30,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"Talk\"}}", + "name": "Talk.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/HoverSound.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0.011876134915122183,\\\"sustain\\\":0.01,\\\"sustainPunch\\\":0,\\\"decay\\\":0.02,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":1012.4426242250636,\\\"frequencySweep\\\":9999.999999999698,\\\"frequencyDeltaSweep\\\":995.5111583241919,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.71,\\\"waveform\\\":\\\"triangle\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":70,\\\"squareDutySweep\\\":0,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"HoverSound\"}}", + "name": "HoverSound.wav", + "preloadAsMusic": false, + "preloadAsSound": false, + "preloadInCache": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Road1.png", + "kind": "image", + "metadata": "", + "name": "Road1.png", + "smoothed": false, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/WaterCorner2.png", + "kind": "image", + "metadata": "", + "name": "WaterCorner2.png", + "smoothed": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Creature_Player.png", + "kind": "image", + "metadata": "", + "name": "Creature_Player.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Creature_Enemy.png", + "kind": "image", + "metadata": "", + "name": "Creature_Enemy.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "thumbnail.png", + "kind": "image", + "metadata": "", + "name": "thumbnail.png", + "smoothed": false, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [ + { + "assetStoreId": "", + "name": "Transition", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "FlashTransitionPainter", + "type": "FlashTransitionPainter::FlashTransitionPainter", + "Timer": 1, + "Color": "255;255;255", + "Type": "", + "Direction": "", + "MaxOpacity": 255 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "fillColor": { + "b": 255, + "g": 255, + "r": 255 + }, + "outlineColor": { + "b": 0, + "g": 0, + "r": 0 + }, + "absoluteCoordinates": false, + "clearBetweenFrames": true + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 48, + "leftMargin": 16, + "name": "TextBorder", + "rightMargin": 16, + "tags": "", + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 48, + "variables": [], + "effects": [], + "behaviors": [] + } + ], + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 209, + "disableInputWhenNotFocused": true, + "mangledName": "Overworld", + "name": "Overworld", + "r": 209, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 209, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 8, + "gridHeight": 8, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.2, + "snap": false, + "zoomFactor": 0.8900000000000297, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "PhysicalObject", + "objects": [ + { + "name": "Tree1" + }, + { + "name": "Bush1" + }, + { + "name": "Tree2" + }, + { + "name": "House1" + }, + { + "name": "House2" + }, + { + "name": "NPC" + } + ] + } + ], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 400, + "layer": "", + "locked": true, + "name": "Grass", + "persistentUuid": "15a3b7f4-f78f-4898-9037-58d9fc07eab8", + "sealed": true, + "width": 444, + "x": 816, + "y": 336, + "zOrder": -200, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "locked": true, + "name": "CornerWater", + "persistentUuid": "c4db8498-f834-4193-851a-6edf548d92a7", + "sealed": true, + "width": 0, + "x": 1248, + "y": 632, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 88, + "layer": "", + "locked": true, + "name": "WaterEdgeRight", + "persistentUuid": "06e0d51e-cafa-4f12-80ad-c7e158682e81", + "sealed": true, + "width": 16, + "x": 1248, + "y": 648, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 16, + "layer": "", + "locked": true, + "name": "NewTiledSprite", + "persistentUuid": "e7946e06-fbb2-4d69-a4de-8257e68caf91", + "sealed": true, + "width": 174, + "x": 1264, + "y": 632, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 160, + "layer": "", + "locked": true, + "name": "Water1", + "persistentUuid": "fb607f81-0e83-43a2-94c2-3c67a797f7d3", + "sealed": true, + "width": 432, + "x": 832, + "y": 736, + "zOrder": -10000, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 320, + "layer": "", + "locked": true, + "name": "Road1", + "persistentUuid": "b8a2b635-b626-4392-be21-6fa6fc7377fb", + "sealed": true, + "width": 32, + "x": 1200, + "y": 384, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 180, + "customSize": true, + "height": 5, + "layer": "", + "locked": true, + "name": "RoadEdge1", + "persistentUuid": "d0d4b9a5-3ba0-4ffb-a30c-d5c9b19b58aa", + "sealed": true, + "width": 304, + "x": 925, + "y": 704, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "locked": true, + "name": "Road1", + "persistentUuid": "859ff938-47b0-4884-a81b-647e4e158ae7", + "sealed": true, + "width": 336, + "x": 864, + "y": 672, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 5, + "layer": "", + "locked": true, + "name": "RoadEdge1", + "persistentUuid": "23e1b8be-0d93-433c-b724-582f9e59c65f", + "sealed": true, + "width": 304, + "x": 894, + "y": 672, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 90, + "customSize": true, + "height": 5, + "layer": "", + "locked": true, + "name": "RoadEdge1", + "persistentUuid": "eec3ba6d-5a91-4a21-b913-71d066e57200", + "sealed": true, + "width": 304, + "x": 1077.5, + "y": 550.5, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 270, + "customSize": true, + "height": 5, + "layer": "", + "locked": true, + "name": "RoadEdge1", + "persistentUuid": "2ef1961f-419f-44d7-8ca4-49b9aa5e0e58", + "sealed": true, + "width": 304, + "x": 1045.5, + "y": 521.5, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "locked": true, + "name": "Dock1", + "persistentUuid": "6d1893bf-7a30-4d60-9821-9367ab6b28ef", + "sealed": true, + "width": 0, + "x": 1248, + "y": 656, + "zOrder": -90, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 16, + "layer": "", + "locked": true, + "name": "NewTiledSprite", + "persistentUuid": "9a418a0e-ca5b-43c6-bc5a-47dd3e7c9395", + "sealed": true, + "width": 432, + "x": 816, + "y": 736, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 144, + "layer": "", + "locked": true, + "name": "Water1", + "persistentUuid": "22e45ac6-7fa4-4192-b80b-2627af6c404c", + "sealed": true, + "width": 176, + "x": 1264, + "y": 640, + "zOrder": -10000, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 264, + "layer": "", + "locked": true, + "name": "Grass", + "persistentUuid": "753fd074-6b60-4410-b871-257718ecbb5a", + "sealed": true, + "width": 224, + "x": 1248, + "y": 368, + "zOrder": -5200, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 112, + "layer": "", + "locked": true, + "name": "Water1", + "persistentUuid": "8f0fb863-d7c1-44e3-a76f-3325dc44a9bd", + "sealed": true, + "width": 176, + "x": 1264, + "y": 784, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "House2", + "persistentUuid": "50cf5a76-1b21-413d-b097-4006410e19a0", + "width": 0, + "x": 1163.75732421875, + "y": 516.7144165039062, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "House1", + "persistentUuid": "257f2fba-4cf0-4939-a27a-8a1be20a6360", + "width": 0, + "x": 1266.7686767578125, + "y": 469.999755859375, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 12, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "e64d3c30-d571-4270-9762-7e17f6d82e79", + "width": 128, + "x": 1304, + "y": 602, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 47, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "0166d221-c908-425d-8c2d-85f710145da4", + "width": 408, + "x": 856, + "y": 736, + "zOrder": 2000, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 43, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "33480495-66c7-4e10-8299-dbf261c66d0c", + "width": 27, + "x": 1295, + "y": 650, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 108, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "402ede23-0a65-43d9-a6ff-05b6c96e110c", + "width": 71, + "x": 1248, + "y": 684, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "0942d96b-64e0-4177-80d6-af792be074c8", + "width": 0, + "x": 1001.8545532226562, + "y": 573.4091186523438, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "087e6b10-ccad-4510-9f5f-21825814a4ea", + "width": 0, + "x": 966.8545532226562, + "y": 573.4091186523438, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "d03f44fb-f22e-4e9b-b668-e3048c3b85d9", + "width": 0, + "x": 1415.8544921875, + "y": 611.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "bfe14f18-e0c6-4601-9065-b47cf52b2741", + "width": 0, + "x": 1319.8544921875, + "y": 611.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "cd424d52-7fef-4947-ae1e-5d54718d6e49", + "width": 0, + "x": 1351.8544921875, + "y": 611.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "2f21620f-2352-48de-9ff8-f6c9a14d0fca", + "width": 0, + "x": 1383.8544921875, + "y": 611.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "cf41b047-35d9-47ee-a51a-7124aca7963b", + "width": 0, + "x": 1001.8545532226562, + "y": 669.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "0936ab8d-457e-4cff-b951-a81d2c3c2620", + "width": 0, + "x": 966.8545532226562, + "y": 669.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "320bae1c-a256-47d8-9ceb-e72ff29bfe19", + "width": 0, + "x": 1001.8545532226562, + "y": 637.4091186523438, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "856a2a60-357f-4227-a285-adba47f6661e", + "width": 0, + "x": 966.8545532226562, + "y": 637.4091186523438, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "727cb41f-dab9-417d-b21d-7468092e1cfb", + "width": 0, + "x": 1001.8545532226562, + "y": 605.4091186523438, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "ef1e1b3b-9249-45b8-b101-5e7317161cfd", + "width": 0, + "x": 966.8545532226562, + "y": 605.4091186523438, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "0c32cdf5-e064-4911-98f8-94e88d9a0dd4", + "width": 0, + "x": 1378.8544921875, + "y": 419.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "8cb20257-5d72-4286-8b9a-d708ce475792", + "width": 0, + "x": 1343.8544921875, + "y": 419.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "5e6e182a-d068-419f-be1d-90e7b6ae5bfb", + "width": 0, + "x": 1378.8544921875, + "y": 515.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "f3663d36-a4b0-4764-bc23-67cf0e52c427", + "width": 0, + "x": 1343.8544921875, + "y": 515.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "52a8a411-1129-4fde-8199-9fc4a2e109c2", + "width": 0, + "x": 1378.8544921875, + "y": 483.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "492d21f8-6bc5-43eb-a253-afb8fd9e1b15", + "width": 0, + "x": 1343.8544921875, + "y": 483.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "190ecd12-c376-44e0-8596-4f248869c9b2", + "width": 0, + "x": 1378.8544921875, + "y": 451.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "661388eb-93d3-4e91-b524-375e2e2bf730", + "width": 0, + "x": 1343.8544921875, + "y": 451.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "b0b0e407-1b28-4598-a1a3-b7458b78470c", + "width": 0, + "x": 936, + "y": 726, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "8bcb22b5-1be4-45c9-9474-329399ea1572", + "width": 0, + "x": 968, + "y": 726, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "fc36ad56-0594-41f2-ab03-f3636f37de58", + "width": 0, + "x": 1000, + "y": 726, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "e8b62d84-9066-4c1f-9cac-bb2ed23fcdc3", + "width": 0, + "x": 1032, + "y": 726, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "d0c7cbf9-cb86-47b6-8028-358a382a6d5a", + "width": 0, + "x": 1064, + "y": 726, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "0e8dcf9b-f190-43a7-b7bc-9f55299de48d", + "width": 0, + "x": 1096, + "y": 726, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "02a38c85-e098-42db-a61d-e500721d813f", + "width": 0, + "x": 1128, + "y": 726, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "97d673e0-9de6-4e77-920c-0f5eeea955c8", + "width": 0, + "x": 1160, + "y": 726, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "a59168c4-6668-42ad-addb-9597be75e3ed", + "width": 0, + "x": 1192, + "y": 726, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "f136c286-969a-41e3-ac47-14e650ec4a14", + "width": 0, + "x": 1224, + "y": 726, + "zOrder": 32, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree2", + "persistentUuid": "dfc9c297-d934-47bc-bf78-13cf5a0cae91", + "width": 0, + "x": 904, + "y": 726, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "13224ec5-4c04-4ac0-82b6-3bbd1662b56d", + "width": 0, + "x": 1119.3182373046875, + "y": 666.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "f7b90ea5-457c-4587-b5ae-35f7525277bd", + "width": 0, + "x": 1191.3182373046875, + "y": 587.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "ce36e224-ec14-4612-ba11-42d08115b6ba", + "width": 0, + "x": 1135.3182373046875, + "y": 666.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "f26ea0bd-2b9b-4ed4-9841-f24f79223808", + "width": 0, + "x": 1176.3182373046875, + "y": 667.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "ac22b506-432b-439f-87f7-c09fe2728baf", + "width": 0, + "x": 1191.3182373046875, + "y": 571.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "cf8c62f1-95e8-4a2b-b30f-e6efe6da1f27", + "width": 0, + "x": 1191.3182373046875, + "y": 603.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Bush1", + "persistentUuid": "d9e26baa-9441-49d3-a4d9-4751a12e41f7", + "width": 0, + "x": 1191.3182373046875, + "y": 587.963623046875, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 25, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "24c436a0-65e1-4cf5-a41d-a4576f8396e0", + "width": 192, + "x": 1248, + "y": 632, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 28, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "063f50b1-819e-48f0-83d8-6b9d823382b0", + "width": 64, + "x": 1232, + "y": 444, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 43, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "23d1aa3d-fbb9-4b47-9e79-de909e6e3734", + "width": 16, + "x": 1183, + "y": 566, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 12, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "e75bccdf-d800-4ac4-a6c6-16f7e625cbb4", + "width": 32, + "x": 1111, + "y": 660, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 12, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "d8010b2f-02ab-4edc-9132-c60fac7a68a5", + "width": 16, + "x": 1168, + "y": 660, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "9f305444-9017-4b48-af59-9cb928f521d8", + "width": 16, + "x": 896, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "3eb63f6f-44ba-497f-8011-fbcf112f7fb2", + "width": 16, + "x": 1216, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "3ee1a74f-1112-4a54-93a7-2a0ea71c6f5d", + "width": 16, + "x": 1184, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "acf9a04b-9ff9-4881-8a10-1883d7e0ca0e", + "width": 16, + "x": 1152, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "b8e70c7e-6547-44f3-b67e-96440b6fa347", + "width": 16, + "x": 1120, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "dd91a27e-5ad7-4052-87aa-c36b2c4efb82", + "width": 16, + "x": 1088, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "7b6e8dcb-846e-43d5-9765-a1bb3cec5f90", + "width": 16, + "x": 1056, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "d7e15cb8-a299-43ca-9a78-f6492dc5d17b", + "width": 16, + "x": 1024, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "15b5ed89-fa9a-463d-86bf-19e9904cd5bc", + "width": 16, + "x": 992, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "4c16228c-d6f4-4d79-a2bc-a9d26c3119e1", + "width": 16, + "x": 960, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 10, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "579eedd4-39ef-4e52-b76b-eb38318a82d5", + "width": 16, + "x": 928, + "y": 718, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "NPC", + "persistentUuid": "196cafb9-af98-435d-8107-4675c15d4990", + "width": 0, + "x": 1175.92724609375, + "y": 527.2363891601562, + "zOrder": 44, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "Dialogue", + "name": "Dialogue", + "persistentUuid": "caf097a8-67e7-4d4e-b372-23ef93794341", + "width": 0, + "x": 326, + "y": 827, + "zOrder": 45, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 247, + "layer": "Dialogue", + "name": "TextBorder", + "persistentUuid": "e12d230a-0da4-42e4-b9a3-34cd6b21804b", + "width": 1344, + "x": 288, + "y": 800, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 16, + "layer": "", + "name": "E", + "persistentUuid": "f3745d28-ecfe-4aa1-ad5d-c3d0ed30886e", + "width": 16, + "x": 1173, + "y": 504, + "zOrder": 600, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "Transition", + "name": "Transition", + "persistentUuid": "f51be381-f77f-4bdb-a630-df379ad3f9f6", + "width": 0, + "x": 1552, + "y": 640, + "zOrder": 503, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 48, + "layer": "Dialogue", + "name": "YesButton", + "persistentUuid": "550f652b-972c-4c6b-93fd-5c0dfaabeba8", + "width": 144, + "x": 1280, + "y": 976, + "zOrder": 509, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 48, + "layer": "Dialogue", + "name": "NoButton", + "persistentUuid": "c1137197-ee6a-430b-9055-699dbb70a65e", + "width": 144, + "x": 1456, + "y": 976, + "zOrder": 510, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Player", + "persistentUuid": "eb3eb9c8-9e76-4d2e-89c0-600889f54713", + "width": 0, + "x": 1216, + "y": 624, + "zOrder": 511, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 14, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "6e019a57-fd94-42ab-ad44-c926536191b4", + "width": 18, + "x": 1167, + "y": 518, + "zOrder": 40, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "e6e9a3f5-84bd-450b-b6b2-a52fa872e4bd", + "width": 0, + "x": 1071.8544921875, + "y": 573.4091186523438, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "bd164f8c-0c89-42c2-a0cd-614f4c2e6b0b", + "width": 0, + "x": 1036.8544921875, + "y": 573.4091186523438, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "73e6c36d-2f81-41c4-b21c-aa9c9455d192", + "width": 0, + "x": 1071.8544921875, + "y": 669.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "ef6ea253-f38d-4c4e-9ae5-09c93459771b", + "width": 0, + "x": 1036.8544921875, + "y": 669.4091186523438, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "023cda18-5694-4b46-ba3c-d4cdc103e5e2", + "width": 0, + "x": 1071.8544921875, + "y": 637.4091186523438, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "304e1062-cadb-4912-9831-4fed4c49a40d", + "width": 0, + "x": 1036.8544921875, + "y": 637.4091186523438, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "f87da9e9-3ef2-4e48-b86b-c4bc37409488", + "width": 0, + "x": 1071.8544921875, + "y": 605.4091186523438, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "45fa6d46-1082-4242-a07d-2c76b5f2816e", + "width": 0, + "x": 1036.8544921875, + "y": 605.4091186523438, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "c19ef060-41f0-4c8f-b929-9b51eb321703", + "width": 0, + "x": 1448.8544921875, + "y": 419.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "3a07c208-86c3-46aa-8606-b001850e0b81", + "width": 0, + "x": 1413.8544921875, + "y": 419.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "0f0ebe6a-2d67-427a-b4f0-d10bef2f4dbd", + "width": 0, + "x": 1448.8544921875, + "y": 515.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "e2bcbcf9-5558-47e6-996f-9d7b8092c128", + "width": 0, + "x": 1413.8544921875, + "y": 515.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "535dac12-efa0-4ea3-b2b7-316ed2bbe745", + "width": 0, + "x": 1448.8544921875, + "y": 483.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "bff93b18-8272-4ca8-b075-0c57b853201e", + "width": 0, + "x": 1413.8544921875, + "y": 483.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "e8ad3e5d-dfe5-4000-bde3-611a7c393593", + "width": 0, + "x": 1448.8544921875, + "y": 451.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "cf9ec7f8-4c76-44e4-8d77-36c4d4c0b2e8", + "width": 0, + "x": 1413.8544921875, + "y": 451.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 106, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "96df7b17-0bdf-4beb-974e-1b72a5880a9c", + "width": 137, + "x": 1328, + "y": 411, + "zOrder": 39, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "locked": true, + "name": "WaterCorner2", + "persistentUuid": "35b1989e-4eec-45cf-95f5-0e883f81f798", + "sealed": true, + "width": 0, + "x": 1248, + "y": 736, + "zOrder": 512, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 28, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "8256bb0e-129f-40a9-a043-6d00aa892d9e", + "width": 64, + "x": 1128, + "y": 492, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "House1", + "persistentUuid": "1617e46b-73cf-4a15-83a5-6d73899c0a54", + "width": 0, + "x": 1266.7686767578125, + "y": 565.999755859375, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 28, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "748e3900-a1ad-46bd-bf07-fbaa23fa3a92", + "width": 64, + "x": 1232, + "y": 540, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "5ce48746-120f-4f67-a544-11f33773ede8", + "width": 0, + "x": 1001.8545532226562, + "y": 445.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "4f21966d-7793-4fd3-9aed-6e5f8e432c25", + "width": 0, + "x": 966.8545532226562, + "y": 445.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "bb26eca6-bd33-48a5-a751-fb3e32cd1fec", + "width": 0, + "x": 1001.8545532226562, + "y": 541.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "ffa5f4d1-195f-4a64-b0fa-d71620a422ba", + "width": 0, + "x": 966.8545532226562, + "y": 541.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "a69cb3c7-2d40-4b46-8251-5753a776acbb", + "width": 0, + "x": 1001.8545532226562, + "y": 509.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "e8b6cde7-34e3-4b4c-8763-fe13d91e4925", + "width": 0, + "x": 966.8545532226562, + "y": 509.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "15d6116b-1d15-41fc-8d58-b91ffdf478e9", + "width": 0, + "x": 1001.8545532226562, + "y": 477.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "869d4cf7-05f9-4956-80cd-090ca1394379", + "width": 0, + "x": 966.8545532226562, + "y": 477.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "f26dc266-d8af-474e-b549-c1554f3cfa3c", + "width": 0, + "x": 1071.8544921875, + "y": 445.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "af98ae35-6a68-4cdb-aea1-efb8592d85fd", + "width": 0, + "x": 1036.8544921875, + "y": 445.4090881347656, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "c1a05778-f419-4983-baad-24c8510dbced", + "width": 0, + "x": 1071.8544921875, + "y": 541.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "ecbfa823-a2e1-4fe0-9a1f-eab29699b012", + "width": 0, + "x": 1036.8544921875, + "y": 541.4090576171875, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "19c30ee7-1c1f-4394-a5cb-1c553d97d44e", + "width": 0, + "x": 1071.8544921875, + "y": 509.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "7c8e320b-62ba-4887-b6eb-a11855c20bac", + "width": 0, + "x": 1036.8544921875, + "y": 509.4090881347656, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "1bc000dc-d9aa-4158-a36a-41f9bd6577fe", + "width": 0, + "x": 1071.8544921875, + "y": 477.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Tree1", + "persistentUuid": "fcde295b-5629-4144-ace7-b701b1238529", + "width": 0, + "x": 1036.8544921875, + "y": 477.4090881347656, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 238, + "layer": "", + "name": "CollisionDetect", + "persistentUuid": "22eec5f2-dd86-44d1-aabc-12329e6b3671", + "width": 137, + "x": 950.9864501953125, + "y": 434, + "zOrder": 39, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Player", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "TopDownMovement", + "type": "TopDownMovementBehavior::TopDownMovementBehavior", + "acceleration": 900000, + "allowDiagonals": false, + "angleOffset": 0, + "angularMaxSpeed": 180, + "customIsometryAngle": 30, + "deceleration": 900000, + "ignoreDefaultControls": false, + "maxSpeed": 50, + "movementAngleOffset": 0, + "rotateObject": false, + "viewpoint": "TopDown" + } + ], + "animations": [ + { + "name": "Down", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.20000000298023224, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "ACharDown1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharDown2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharDown3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharDown4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Right", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.20000000298023224, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "ACgarRight1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACgarRight2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACgarRight3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACgarRight4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Left", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.20000000298023224, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "ACharLeft1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharLeft2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharLeft3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharLeft4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Up", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.20000000298023224, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "ACharUp1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharUp2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharUp3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "ACharUp4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 2, + "y": 13 + }, + { + "x": 14, + "y": 13 + }, + { + "x": 14, + "y": 16 + }, + { + "x": 2, + "y": 16 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "NPC", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Down", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.20000000298023224, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "ACharDown1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 7.927276611328125, + "y": 15.236364364624023 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 17 + }, + { + "x": 15, + "y": 17 + }, + { + "x": 15, + "y": 20 + }, + { + "x": 9, + "y": 20 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Dock1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Dock1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Tree1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Tree1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15.854545593261719, + "y": 27.40909194946289 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Tree2", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Tree2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 16.000001907348633, + "y": 30.618200302124023 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Bush1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Bush1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 8.318181991577148, + "y": 11.963641166687012 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "House1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "House1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 34.76862716674805, + "y": 45.99976348876953 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "House2", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "House2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 35.75733947753906, + "y": 44.714439392089844 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "CornerWater", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "WaterCorner.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "WaterCorner2", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "WaterCorner2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "height": 32, + "name": "Grass", + "tags": "", + "texture": "Grass1.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 16, + "name": "WaterEdgeRight", + "tags": "", + "texture": "WaterEdgeRight.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 32, + "name": "NewTiledSprite", + "tags": "", + "texture": "WaterEdgeUp.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 32, + "name": "Water1", + "tags": "", + "texture": "Water1.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 16, + "name": "Road1", + "tags": "", + "texture": "Road1.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 5, + "name": "RoadEdge1", + "tags": "", + "texture": "RoadEdge1.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 36, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "name": "CollisionDetect", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Enemy_Spawn_Location.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Dialogue", + "tags": "", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "BitmapText_AutoTyping", + "type": "AutoTyping::BitmapText_AutoTyping", + "Interval": 0.05, + "CharacterJustAdded": false, + "CurrentCharacter": "" + } + ], + "content": { + "text": "Do you want to battle?\nI have the best creatures in town!", + "opacity": 255, + "scale": 3, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", + "align": "left", + "wordWrap": true + } + }, + { + "assetStoreId": "", + "name": "E", + "tags": "", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "content": { + "text": "E", + "opacity": 255, + "scale": 0.5, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", + "align": "left", + "wordWrap": true + } + }, + { + "assetStoreId": "", + "name": "E2", + "tags": "", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "content": { + "text": "E", + "opacity": 255, + "scale": 0.5, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", + "align": "left", + "wordWrap": true + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "YesButton", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 16, + "TopPadding": 16, + "MinimalWidth": 300 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Yes", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "NoButton", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 16, + "TopPadding": 16, + "MinimalWidth": 300 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "No", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "6", + "", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "PhysicalObject", + "=", + "PhysicalObject.Y()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "CollisionDetect" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "E", + "ShakeObject_PositionAngle", + "0.5", + "0", + "2", + "10", + "1", + "yes", + "" + ] + }, + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "1.5", + "\"Transition\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Player", + "=", + "Player.Y()" + ] + }, + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "Player", + "CollisionDetect", + "" + ] + }, + { + "type": { + "value": "CentreCamera" + }, + "parameters": [ + "", + "Player", + "", + "", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "PlayerMovement", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LayerVisible" + }, + "parameters": [ + "", + "\"Dialogue\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Player", + "TopDownMovement", + "yes" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "E", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "YesButton" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "NoButton" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::TopDownMovementBehavior::IsUsingControl" + }, + "parameters": [ + "Player", + "TopDownMovement", + "\"Up\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Player", + "\"Up\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::TopDownMovementBehavior::IsUsingControl" + }, + "parameters": [ + "Player", + "TopDownMovement", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Player", + "\"Down\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::TopDownMovementBehavior::IsUsingControl" + }, + "parameters": [ + "Player", + "TopDownMovement", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Player", + "\"Right\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::TopDownMovementBehavior::IsUsingControl" + }, + "parameters": [ + "Player", + "TopDownMovement", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Player", + "\"Left\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TopDownMovementBehavior::IsMoving" + }, + "parameters": [ + "Player", + "TopDownMovement" + ] + } + ], + "actions": [ + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Player" + ] + }, + { + "type": { + "value": "ChangeSprite" + }, + "parameters": [ + "Player", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::IsMoving" + }, + "parameters": [ + "Player", + "TopDownMovement" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Player" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Dialogue", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Distance" + }, + "parameters": [ + "Player", + "NPC", + "20", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "e" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ShowLayer" + }, + "parameters": [ + "", + "\"Dialogue\"" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "E" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "\"Dialogue\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::StartAtBeginning" + }, + "parameters": [ + "Dialogue", + "BitmapText_AutoTyping", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Player", + "TopDownMovement", + "" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "Talk.wav", + "", + "50", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::TypingFinished" + }, + "parameters": [ + "Dialogue", + "BitmapText_AutoTyping", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "YesButton", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "NoButton", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "YesButton" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "YesButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" + }, + "parameters": [ + "Transition", + "FlashTransitionPainter", + "\"0;0;0\"", + "1", + "\"Circular\"", + "\"Forward\"", + "255", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "PushScene" + }, + "parameters": [ + "", + "\"Battle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "NoButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "HideLayer" + }, + "parameters": [ + "", + "\"Dialogue\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "NoButton", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "YesButton", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HoverSound.wav", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 0, + "ambientLightColorG": 19942824, + "ambientLightColorR": 16, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + }, + { + "ambientLightColorB": 13920576, + "ambientLightColorG": 6050880, + "ambientLightColorR": 11874240, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Dialogue", + "visibility": false, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 8799112, + "ambientLightColorG": 6050880, + "ambientLightColorR": 12506048, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Transition", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "BitmapText_AutoTyping", + "type": "AutoTyping::BitmapText_AutoTyping" + }, + { + "name": "FlashTransitionPainter", + "type": "FlashTransitionPainter::FlashTransitionPainter" + }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "TopDownMovement", + "type": "TopDownMovementBehavior::TopDownMovementBehavior" + } + ] + }, + { + "b": 146, + "disableInputWhenNotFocused": true, + "mangledName": "Battle", + "name": "Battle", + "r": 156, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 146, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.2, + "snap": false, + "zoomFactor": 0.2299999999999997, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Transition", + "persistentUuid": "767cf046-bd7e-46a6-a0de-9e463bf21835", + "width": 0, + "x": 2104, + "y": 596, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 400, + "layer": "", + "name": "Enemy", + "persistentUuid": "c09519df-6e7e-41f3-8c2e-05be52194d06", + "width": 400, + "x": 1241, + "y": 136, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 600, + "layer": "", + "name": "Player", + "persistentUuid": "9176821a-39ac-48bf-a647-1af51f1cf6b8", + "width": 600, + "x": 203, + "y": 252, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 320, + "layer": "Dialogue", + "name": "TextBorder", + "persistentUuid": "3eda7dbd-af4a-4a6f-a7d9-d9e294bbc3aa", + "width": 1792, + "x": 64, + "y": 704, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 68, + "layer": "", + "name": "Player_HealthBar", + "persistentUuid": "a8733f20-e9a2-4f82-a152-caf9c12703de", + "width": 448, + "x": 288, + "y": 192, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 68, + "layer": "", + "name": "HealthBorder", + "persistentUuid": "dd99757b-c891-495b-90f1-ce12f42d12d1", + "width": 448, + "x": 1216, + "y": 540, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 68, + "layer": "", + "name": "HealthBorder", + "persistentUuid": "3ab5fea9-bffc-4e4a-ad20-968e26ddcfef", + "width": 448, + "x": 288, + "y": 192, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 68, + "layer": "", + "name": "Enemy_HealthBar", + "persistentUuid": "33f86b74-e137-45b3-97f5-9a456a8936cc", + "width": 448, + "x": 1216, + "y": 540, + "zOrder": 4, + "numberProperties": [ + { + "name": "animation", + "value": 0 + } + ], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "Dialogue", + "name": "Attack1", + "persistentUuid": "7dc38f8a-b2d4-4716-96cc-cfda55183779", + "width": 256, + "x": 160, + "y": 736, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "Dialogue", + "name": "Attack2", + "persistentUuid": "be19237c-cdfd-46d6-9f03-ac226e9a3f61", + "width": 256, + "x": 160, + "y": 832, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "Dialogue", + "name": "Run", + "persistentUuid": "d0d0038e-afed-4b66-afad-9eb83d409837", + "width": 256, + "x": 160, + "y": 928, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 256, + "layer": "Dialogue", + "name": "Dialogue", + "persistentUuid": "1d6dd4c3-a14e-4637-b8ba-6dad23785fdd", + "width": 1248, + "x": 512, + "y": 736, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "Background", + "name": "Grass", + "persistentUuid": "51b4918b-fb97-491c-8070-567de75dafb1", + "width": 256, + "x": 2560, + "y": 800, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 133, + "layer": "Background", + "name": "Background", + "persistentUuid": "a759a552-ce69-4fb4-bf22-05ee11499324", + "width": 250, + "x": 2567, + "y": 708, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Enemy", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Flash", + "type": "Flash::Flash", + "HalfPeriodTime": 0.1, + "IsFlashing": false, + "FlashDuration": 0 + }, + { + "name": "Health", + "type": "Health::Health", + "Health": 100, + "CurrentHealth": 0, + "MaxHealth": 100, + "DamageCooldown": 0, + "IsHealthJustDamaged": false, + "HealthRegenRate": 0, + "HealthRegenDelay": 0, + "AllowOverHealing": false, + "HitAtLeastOnce": false, + "IsJustHealed": false, + "CurrentShieldPoints": 0, + "MaxShieldPoints": 0, + "ShieldDuration": 5, + "ShieldRegenRate": 0, + "BlockExcessDamage": false, + "ShieldRegenDelay": 0, + "IsShieldJustDamaged": false, + "ChanceToDodge": 0, + "DamageToBeApplied": 0, + "FlatDamageReduction": 0, + "PercentDamageReduction": 0, + "IsJustDodged": false, + "ShieldDamageTaken": 0, + "HealToBeApplied": 0 + }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Creature_Enemy.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Player", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Flash", + "type": "Flash::Flash", + "HalfPeriodTime": 0.1, + "IsFlashing": false, + "FlashDuration": 0 + }, + { + "name": "Health", + "type": "Health::Health", + "Health": 100, + "CurrentHealth": 0, + "MaxHealth": 100, + "DamageCooldown": 0, + "IsHealthJustDamaged": false, + "HealthRegenRate": 0, + "HealthRegenDelay": 0, + "AllowOverHealing": false, + "HitAtLeastOnce": false, + "IsJustHealed": false, + "CurrentShieldPoints": 0, + "MaxShieldPoints": 0, + "ShieldDuration": 5, + "ShieldRegenRate": 0, + "BlockExcessDamage": false, + "ShieldRegenDelay": 0, + "IsShieldJustDamaged": false, + "ChanceToDodge": 0, + "DamageToBeApplied": 0, + "FlatDamageReduction": 0, + "PercentDamageReduction": 0, + "IsJustDodged": false, + "ShieldDamageTaken": 0, + "HealToBeApplied": 0 + }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Creature_Player.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Player_HealthBar", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "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": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Enemy_HealthBar", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "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": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "HealthBorder", + "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": "", + "name": "Dialogue", + "tags": "", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "BitmapText_AutoTyping", + "type": "AutoTyping::BitmapText_AutoTyping", + "Interval": 0.02, + "CharacterJustAdded": false, + "CurrentCharacter": "" + } + ], + "content": { + "text": "The battle begins.", + "opacity": 255, + "scale": 3, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", + "align": "left", + "wordWrap": true + } + }, + { + "assetStoreId": "", + "name": "NewButton", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": {}, + "childrenContent": { + "Hovered": { + "bottomMargin": 16, + "height": 48, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border-export.png", + "tiled": false, + "topMargin": 16, + "width": 48 + }, + "Idle": { + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "width": 32 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Text", + "font": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + "Pressed": { + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "width": 32 + } + } + }, + { + "assetStoreId": "", + "height": 32, + "name": "Grass", + "tags": "", + "texture": "Grass1.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "name": "House2", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "KawaseBlur", + "name": "Effect", + "doubleParameters": { + "blur": 0.5, + "padding": 0, + "pixelizeX": 1, + "pixelizeY": 1, + "quality": 3 + }, + "stringParameters": {}, + "booleanParameters": {} + } + ], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "House2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 36.8875617980957, + "y": 58.29928970336914 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "Attack1", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 16, + "TopPadding": 16, + "MinimalWidth": 300 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Attack", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "Attack2", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 16, + "TopPadding": 16, + "MinimalWidth": 300 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Skill", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "Run", + "tags": "", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 16, + "TopPadding": 16, + "MinimalWidth": 300 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Run", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Border2.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "name": "Background", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "KawaseBlur", + "name": "Effect", + "doubleParameters": { + "blur": 10, + "padding": 0, + "pixelizeX": 1, + "pixelizeY": 1, + "quality": 3 + }, + "stringParameters": {}, + "booleanParameters": {} + } + ], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "House1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" + }, + "parameters": [ + "Transition", + "FlashTransitionPainter", + "\"0;0;0\"", + "0.5", + "\"Circular\"", + "\"Backward\"", + "255", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Player", + "ShakeObject_PositionAngle", + "", + "5", + "5", + "0", + "2", + "yes", + "yes" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Enemy", + "ShakeObject_PositionAngle", + "", + "-4", + "-4", + "0", + "2", + "yes", + "yes" + ] + }, + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "10", + "\"Background\"", + "" + ] + }, + { + "type": { + "value": "CentreCamera" + }, + "parameters": [ + "", + "Grass", + "", + "\"Background\"", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Health display", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeWidth" + }, + "parameters": [ + "Player_HealthBar", + "=", + "448*(Player.Health::Health()/Player.Health::MaxHealth())" + ] + }, + { + "type": { + "value": "ChangeWidth" + }, + "parameters": [ + "Enemy_HealthBar", + "=", + "448*(Enemy.Health::Health()/Enemy.Health::MaxHealth())" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Your turn", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Attack1", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Attack2", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Run", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HoverSound.wav", + "", + "20", + "RandomFloatInRange(0.8,0.9)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "Turn", + "False" + ] + }, + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "Clickable", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Attack1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ToggleSceneVariableAsBoolean" + }, + "parameters": [ + "Clickable" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionTween" + }, + "parameters": [ + "Player", + "Tween", + "\"BackUp\"", + "Player.X()-100", + "Player.Y()", + "\"easeOutQuad\"", + "500", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.5" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionTween" + }, + "parameters": [ + "Player", + "Tween", + "\"BackUp\"", + "Player.X()+100", + "Player.Y()", + "\"easeInQuad\"", + "100", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.1" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "Attack.wav", + "", + "90", + "RandomFloatInRange(0.9,1)" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::StopShaking" + }, + "parameters": [ + "Enemy", + "ShakeObject_PositionAngle", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Enemy", + "ShakeObject_PositionAngleScale", + "0.6", + "10", + "10", + "5", + "10", + "0.2", + "", + "" + ] + }, + { + "type": { + "value": "Flash::Flash::Flash" + }, + "parameters": [ + "Enemy", + "Flash", + "0.3", + "" + ] + }, + { + "type": { + "value": "Health::Health::Hit" + }, + "parameters": [ + "Enemy", + "Health", + "10", + "", + "", + "" + ] + }, + { + "type": { + "value": "BitmapText::BitmapTextObject::SetText" + }, + "parameters": [ + "Dialogue", + "=", + "\"You attacked your enemy.\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "ToggleSceneVariableAsBoolean" + }, + "parameters": [ + "Turn" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Enemy", + "ShakeObject_PositionAngle", + "", + "-4", + "-4", + "0", + "2", + "yes", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Their turn", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "Turn", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.5" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionTween" + }, + "parameters": [ + "Enemy", + "Tween", + "\"BackUp\"", + "Enemy.X()+100", + "Enemy.Y()", + "\"easeOutQuad\"", + "500", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.5" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionTween" + }, + "parameters": [ + "Enemy", + "Tween", + "\"BackUp\"", + "Enemy.X()-100", + "Enemy.Y()", + "\"easeInQuad\"", + "100", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.1" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "Attack.wav", + "", + "90", + "RandomFloatInRange(0.9,1)" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Player", + "ShakeObject_PositionAngleScale", + "0.6", + "10", + "10", + "5", + "10", + "0.2", + "", + "" + ] + }, + { + "type": { + "value": "Flash::Flash::Flash" + }, + "parameters": [ + "Player", + "Flash", + "0.3", + "" + ] + }, + { + "type": { + "value": "Health::Health::Hit" + }, + "parameters": [ + "Player", + "Health", + "10", + "", + "", + "" + ] + }, + { + "type": { + "value": "BitmapText::BitmapTextObject::SetText" + }, + "parameters": [ + "Dialogue", + "=", + "\"Your enemy attacked you.\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "ToggleSceneVariableAsBoolean" + }, + "parameters": [ + "Turn" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Player", + "ShakeObject_PositionAngle", + "", + "5", + "5", + "0", + "2", + "yes", + "yes" + ] + }, + { + "type": { + "value": "ToggleSceneVariableAsBoolean" + }, + "parameters": [ + "Clickable" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Battle End", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Health::Health::IsDead" + }, + "parameters": [ + "Enemy", + "Health", + "" + ] + }, + { + "type": { + "value": "Health::Health::IsDead" + }, + "parameters": [ + "Player", + "Health", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PopScene" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 22078880, + "ambientLightColorG": 6050880, + "ambientLightColorR": 14081096, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Background", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 0, + "ambientLightColorG": 0, + "ambientLightColorR": 0, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + }, + { + "ambientLightColorB": 11858072, + "ambientLightColorG": 6050880, + "ambientLightColorR": 21777048, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Dialogue", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 21829640, + "ambientLightColorG": 6050880, + "ambientLightColorR": 22048576, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "UI", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "BitmapText_AutoTyping", + "type": "AutoTyping::BitmapText_AutoTyping" + }, + { + "name": "Flash", + "type": "Flash::Flash" + }, + { + "name": "FlashTransitionPainter", + "type": "FlashTransitionPainter::FlashTransitionPainter" + }, + { + "name": "Health", + "type": "Health::Health" + }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "@4ian", + "category": "Visual effect", + "extensionNamespace": "", + "fullName": "Flash (blink)", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", + "name": "Flash", + "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.\nAfter adding this to an object, you have to **trigger the effect** by using the **Flash action**.", + "origin": { + "identifier": "Flash", + "name": "gdevelop-extension-store" + }, + "tags": [ + "flash", + "blink", + "visible", + "invisible", + "hit", + "damage" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "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.", + "fullName": "Flash (blink)", + "name": "Flash", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashTimer\"", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashTimer\"", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + }, + { + "type": { + "inverted": true, + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashDurationTimer\"", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make the specified object(s) blink for the given duration.", + "fullName": "Flash (blink)", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ blink for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"FlashDuration\")", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"FlashDurationTimer\"" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + }, + { + "description": "Duration of the blinking, in seconds", + "name": "FlashDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the specified objects are flashing.", + "fullName": "Is object flashing", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onOwnerRemovedFromScene", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop the flashing of the specified object.", + "fullName": "Stop flashing", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "label": "Half period (time during which object is invisible), in seconds", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "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.1.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.\n\nDamage calculations are performed in this order:\n\nIncoming Damage -> Is Damage Cooldown active? -> Chance to Dodge -> Flat Damage Reduction -> Percent Damage Reduction -> Damage to Shield -> Damage to Health\n\nHow to use:\n\n- Set desired values in behavior properties\n- To apply damage use “Apply damage to an object”\n- To heal health, use “Heal object” action\n- To activate the shield, use “Activate shield” action\n- Health and shield regeneration will happen automatically based on properties\n \nTips:\n\n- While damage cooldown is active, no damage will be applied to health or shield (the object is invincible)\n- Try using the “Blink” extension while damage cooldown is active\n- Use the “Is just damaged” or \"Is just healed\" conditions to trigger sound and visual effects\n\nHealth properties:\n\n- Starting health points\n- Maximum health points. Use \"0\" for no maximum\n- Damage cooldown (seconds) Use \"0\" for no cooldown\n- Rate of health regeneration (points per second)\n- Delay before health regeneration starts after being hit (seconds)\n- Allow heals to increase health above max health (regen will never exceed max health)\n\nShield properties:\n\n- Max shield points. Use \"0\" for no maximum\n- Duration of shield (seconds) Use \"0\" to make shield permanent\n- Rate of shield regeneration (points per second)\n- Delay before shield regeneration starts after being hit (seconds)\n- Block excess damage when shield is broken (yes/no)", + "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 + }, + "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()" + ] + } + ], + "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": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "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": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "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": "Incoming damage", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "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": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Chance to dodge", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "No damage will be applied when dodged", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "RandomFloatInRange(0,1)", + "<", + "Object.Behavior::PropertyChanceToDodge()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsJustDodged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Damage reduction from Armor", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UseArmor\"" + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "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::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", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If damage is less than shield, subtract damage from shield.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "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": { + "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", + "Behavior", + ">", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyShieldDamageTaken" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "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" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + }, + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ], + "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": { + "value": "Health::Health::SetCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyCurrentHealth() - Object.Behavior::PropertyDamageToBeApplied()", + "" + ] + } + ] + } + ] + } + ], + "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": "SetCurrentHealth", + "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": "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" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHealToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"HealValue\")" + ] + } + ] + }, + { + "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": { + "value": "Health::Health::PropertyMaxHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "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())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Perform heal", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyHealToBeApplied()" + ] + } + ] + }, + { + "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": { + "value": "Health::Health::SetPropertyIsJustHealed" + }, + "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" + }, + { + "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": { + "value": "Health::Health::SetPropertyDamageCooldown" + }, + "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": { + "value": "Health::Health::SetPropertyHealthRegenDelay" + }, + "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": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Chance to dodge (Range: 0 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "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", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyFlatDamageReduction" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Flat reduction from armor", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "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", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyPercentDamageReduction" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Percent damage reduction from armor", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "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": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyAllowOverHealing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Allow over-healing", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "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": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "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\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsHealthJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "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 the object has been hit at least once.", + "fullName": "Object has been hit at least once", + "functionType": "Condition", + "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": { + "value": "Health::Health::PropertyHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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": { + "value": "Health::Health::PropertyIsHealthJustDamaged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "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": { + "value": "Health::Health::PropertyIsJustHealed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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": "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": { + "value": "Health::Health::PropertyHitAtLeastOnce" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Health::Health::PropertyDamageCooldown" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"", + "<", + "Object.Behavior::PropertyDamageCooldown()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "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": "Expression", + "group": "Health", + "name": "MaxHealth", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxHealth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "Expression", + "group": "Health", + "name": "DamageCooldownDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDamageCooldown()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Current health points of the object.", + "fullName": "Health points", + "functionType": "Expression", + "group": "Health", + "name": "Health", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentHealth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "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": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenDelay()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rate of health regeneration (points per second).", + "fullName": "Rate of health regeneration", + "functionType": "Expression", + "group": "Health", + "name": "HealthRegenRate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "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" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0,Object.Behavior::PropertyDamageCooldown() - Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "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": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\")" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage", + "functionType": "Expression", + "group": "Health", + "name": "ChanceToDodge", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "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()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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": [] + }, + { + "description": "Health damage taken from most recent hit.", + "fullName": "Health damage taken from most recent hit", + "functionType": "Expression", + "group": "Health", + "name": "PreviousDamageTaken", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "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": [ + { + "type": { + "value": "Health::Health::SetPropertyMaxShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Maximum shield", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "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": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "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": { + "value": "Health::Health::SetPropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Shield duration (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "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": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.ShieldDuration\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Activate the shield by setting the shield points and renewing the shield duration (optional).", + "fullName": "Activate shield", + "functionType": "Action", + "group": "Shield", + "name": "ActivateShield", + "sentence": "Activate the shield on _PARAM0_ with _PARAM2_ points (Renew shield duration: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ShieldPoints\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyMaxShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(GetArgumentAsNumber(\"ShieldPoints\"),Object.Behavior::MaxShield())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"RenewShieldDuration\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::RenewShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "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" + } + ], + "objectGroups": [] + }, + { + "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": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyMaxShieldPoints" + }, + "parameters": [ + "Object", + "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": "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": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyBlockExcessDamage" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "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" + }, + { + "description": "Block excess damage", + "name": "Value", + "type": "yesorno" + } + ], + "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": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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": { + "value": "Health::Health::PropertyIsJustDodged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "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": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "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": { + "value": "Health::Health::PropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "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" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.ShieldDuration\"", + "<", + "Object.Behavior::PropertyShieldDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "Expression", + "group": "Shield", + "name": "MaxShield", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Duration of the shield (seconds).", + "fullName": "Duration of shield", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldRegenDelay()" + ] + } + ] + } + ], + "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": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldRegenRate()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0,Object.Behavior::PropertyShieldDuration() - Object.ObjectTimerElapsedTime(\"__Health.ShieldDuration\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Current shield points of the object.", + "fullName": "Shield points", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldPoints", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ] + } + ], + "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": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldDamageTaken()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Health points gained from previous heal.", + "fullName": "Health points gained from previous heal", + "functionType": "Expression", + "group": "Health", + "name": "PreviousHealAmount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealToBeApplied()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "100", + "type": "Number", + "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": "Health", + "extraInformation": [], + "hidden": false, + "name": "MaxHealth" + }, + { + "value": "0", + "type": "Number", + "label": "Damage cooldown (seconds) Use \"0\" for no cooldown", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": false, + "name": "DamageCooldown" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "Health", + "extraInformation": [], + "hidden": true, + "name": "IsHealthJustDamaged" + }, + { + "value": "0", + "type": "Number", + "label": "Rate of health regeneration (points per second)", + "description": "", + "group": "Health regeneration", + "extraInformation": [], + "hidden": false, + "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": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "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": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "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": "Westboy31", + "category": "Visual effect", + "extensionNamespace": "", + "fullName": "Flash and transition painter", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vdmllLWZpbHRlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCA0TDIwIDdIMTdMMTUgNEgxM0wxNSA3SDEyTDEwIDRIOEwxMCA3SDdMNSA0SDRDMi45IDQgMiA0LjkgMiA2TDIgMThDMiAxOS4xIDIuOSAyMCA0IDIwSDIwQzIxLjEgMjAgMjIgMTkuMSAyMiAxOFY0SDE4TTExLjI1IDE1LjI1TDEwIDE4TDguNzUgMTUuMjVMNiAxNEw4Ljc1IDEyLjc1TDEwIDEwTDExLjI1IDEyLjc1TDE0IDE0TDExLjI1IDE1LjI1TTE2Ljk0IDExLjk0TDE2IDE0TDE1LjA2IDExLjk0TDEzIDExTDE1LjA2IDEwLjA2TDE2IDhMMTYuOTQgMTAuMDZMMTkgMTFMMTYuOTQgMTEuOTRaIiAvPjwvc3ZnPg==", + "name": "FlashTransitionPainter", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/movie-filter.svg", + "shortDescription": "Behavior for shape painter allows you to paint a color all over the screen for period of time with an effect (useful for simulate flash and transition effect).", + "version": "0.1.0", + "description": "* __Paint effect:__Action to paint a color all over the screen for a period of time with specific effect.\neffect type:\n * __Flash:__ is a monochrome color appear with fade then disappear with fade out.\n * __Vertical:__ is a monochrome color comes from right side then comes back.\n * __Horizontal:__ is a monochrome color come from top side then comes back.\n * __Circular:__ is a circle which increases from the center and narrows.\n* __Paint effect ended:__ event when the paint effect ends.", + "origin": { + "identifier": "FlashTransitionPainter", + "name": "gdevelop-extension-store" + }, + "tags": [ + "shape painter", + "flash", + "transition", + "effect" + ], + "authorIds": [], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Paint all over the screen a color for a period of time.", + "fullName": "Flash and transition painter", + "name": "FlashTransitionPainter", + "objectType": "PrimitiveDrawing::Drawer", + "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": "Disable effect when the game starts.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid default parameter of painter that could make the extension doesn't work.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "Object", + "yes" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineSize" + }, + "parameters": [ + "Object", + "=", + "0" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"" + ] + }, + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initialise position of painter. \nIncrement or decrement \"_TimeProgressionEffect\" depending on direction.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "CameraX(Object.Layer(),0) - SceneWindowWidth()/2", + "=", + "CameraY(Object.Layer(),0) - SceneWindowHeight()/2" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyColor()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_TimeProgressionEffect", + "+", + "(TimeDelta() / Object.Behavior::PropertyTimer())*Object.Variable(__FlashTransitionPainter_ReverseDirection)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Here this the paints functions of different effect depending on the type chosen by the user.\nDetect the direction of the animation and its end.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Type 1 : flash effect. ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Flash\"" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_OpacityFlash", + ">=", + "Object.Behavior::PropertyMaxOpacity()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "-1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Forward\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_OpacityFlash", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_OpacityFlash", + "=", + "lerp(0, Object.Behavior::PropertyMaxOpacity(), Object.Variable(__FlashTransitionPainter_TimeProgressionEffect))" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__FlashTransitionPainter_OpacityFlash)" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "CameraX(Object.Layer(),0) - SceneWindowWidth()/2", + "CameraY(Object.Layer(),0) - SceneWindowHeight()/2", + "SceneWindowWidth()", + "SceneWindowHeight()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Type 2 : screen come from top then return.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Horizontal\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + ">=", + "SceneWindowWidth()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "-1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Forward\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "=", + "10" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + "=", + "lerp(0,SceneWindowWidth(),Object.Variable(__FlashTransitionPainter_TimeProgressionEffect))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "-", + "2" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "+", + "51" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__FlashTransitionPainter_SmoothEdgeOpacity)" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "0", + "Object.Variable(__FlashTransitionPainter_ProgressiveWidth) + Object.Variable(__FlashTransitionPainter_SmoothEdge)", + "SceneWindowHeight()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Type 3 : screen come from left then return.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Vertical\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveHeight", + ">=", + "SceneWindowHeight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "-1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Forward\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveHeight", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "=", + "10" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveHeight", + "=", + "lerp(0,SceneWindowHeight(),Object.Variable(__FlashTransitionPainter_TimeProgressionEffect))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "-", + "2" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "+", + "51" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__FlashTransitionPainter_SmoothEdgeOpacity)" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "0", + "SceneWindowWidth()", + "Object.Variable(__FlashTransitionPainter_ProgressiveHeight) + Object.Variable(__FlashTransitionPainter_SmoothEdge)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Type 4 : a circle scale up from the middle then scale down.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Circular\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + ">=", + "(sqrt (pow(SceneWindowHeight(),2) + pow(SceneWindowWidth(),2) )) /2 " + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "-1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Forward\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "=", + "1" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ProgressiveWidth", + "=", + "lerp(0,(sqrt (pow(SceneWindowHeight(),2) + pow(SceneWindowWidth(),2) ))/2 ,Object.Variable(__FlashTransitionPainter_TimeProgressionEffect))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdge", + "-", + "0.2" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_SmoothEdgeOpacity", + "+", + "51" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__FlashTransitionPainter_SmoothEdgeOpacity)" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "SceneWindowWidth()/2", + "SceneWindowHeight()/2", + "Object.Variable(__FlashTransitionPainter_ProgressiveWidth) + Object.Variable(__FlashTransitionPainter_SmoothEdge)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The repeat 5 times is used to have clean and smooth edges , especially for circle.\n", + "comment2": "" + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset variables.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_OpacityFlash", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "1" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_TimeProgressionEffect", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Paint Effect.", + "fullName": "Paint Effect", + "functionType": "Action", + "name": "PaintEffect", + "sentence": "Paint effect type _PARAM4_ of _PARAM0_ with direction _PARAM5_ and color _PARAM2_ for _PARAM3_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred.\nIf user doesn't assign value to timer we take a default value (0.2).", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + }, + { + "type": { + "inverted": true, + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyTimer" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Timer\") + (3*TimeDelta())" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"" + ] + }, + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Direction\")" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"Type\")", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyType" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Type\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"Color\")", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyTimer" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyTimer" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0.2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Both\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyTimer" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Timer\")/2 + (3*TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Backward\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_ReverseDirection", + "=", + "-1" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FlashTransitionPainter_TimeProgressionEffect", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"MaxOpacity\")", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyMaxOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"MaxOpacity\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter", + "type": "behavior" + }, + { + "description": "Color", + "name": "Color", + "type": "color" + }, + { + "description": "Duration", + "name": "Timer", + "type": "expression" + }, + { + "description": "Type of effect ", + "name": "Type", + "supplementaryInformation": "[\"Flash\",\"Horizontal\",\"Vertical\",\"Circular\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction transition", + "name": "Direction", + "supplementaryInformation": "[\"Both\",\"Forward\",\"Backward\"]", + "type": "stringWithSelector" + }, + { + "description": "End opacity (only for flash)", + "name": "MaxOpacity", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Paint effect ended.", + "fullName": "Paint effect ended ", + "functionType": "Condition", + "name": "PaintEffectIsEnd", + "sentence": "When paint effect of _PARAM0_ ends", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect when the animation ends with a timer which is initialised in PaintEffect function.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Backward\"" + ] + }, + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Forward\"" + ] + } + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"", + "Object.Behavior::PropertyTimer() - (3*TimeDelta())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlashTransitionPainter::FlashTransitionPainter::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Both\"" + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__FlashTransitionPainter_timerEffect\"", + "Object.Behavior::PropertyTimer()*2 - (3*TimeDelta())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Timer", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Timer" + }, + { + "value": "255;255;255", + "type": "String", + "label": "Color", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Color" + }, + { + "value": "", + "type": "String", + "label": "Type of effect ", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Type" + }, + { + "value": "", + "type": "String", + "label": "Direction of transition", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Direction" + }, + { + "value": "255", + "type": "Number", + "label": "The maximum of the opacity only for flash", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MaxOpacity" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteButton", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", + "shortDescription": "A button that can be customized.", + "version": "1.0.0", + "description": "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "origin": { + "identifier": "PanelSpriteButton", + "name": "gdevelop-extension-store" + }, + "tags": [ + "button", + "ui" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Panel sprite button", + "name": "PanelSpriteButton", + "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": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Idle", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Place the label over the backgrounds.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Label", + "=", + "1" + ] + }, + { + "type": { + "value": "TextObject::SetTextAlignment" + }, + "parameters": [ + "Label", + "\"center\"" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "yes" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touch devices can't do hovering. As it's heavy to check that the cursor is over the button, we disable it.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetPropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The property can't be set in onCreate for some reson.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetPropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Idle", + "ContainsCursor", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Idle" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "Idle", + "", + "no", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Idle", + "ContainsCursor", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The trigger once must be before the state condition to detect a new press.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Idle", + "ContainsCursor", + "True" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Idle", + "ContainsCursor", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Idle", + "ContainsCursor", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedOutside\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "parameters": [] + }, + { + "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 button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Width()", + "!=", + "max(Idle.Width(), Label.Width())" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Height()", + "!=", + "max(Idle.Height(), Label.Height())" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteButton::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjetTxt" + }, + "parameters": [ + "Idle", + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "GetArgumentAsString(\"LabelText\")" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "", + "name": "LabelText", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the label text.", + "fullName": "Label text", + "functionType": "StringExpression", + "name": "LabelText", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Label.String()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", + "fullName": "", + "functionType": "Expression", + "name": "CenterWithPaddingY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", + "fullName": "", + "functionType": "Action", + "name": "CenterLabel", + "private": true, + "sentence": "Center the label of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Label", + "=", + "Object.PropertyLeftPadding()", + "=", + "Object.PropertyTopPadding()" + ] + }, + { + "type": { + "value": "TextObject::WrappingWidth" + }, + "parameters": [ + "Label", + "=", + "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + ] + }, + { + "type": { + "value": "TextObject::WrappingWidth" + }, + "parameters": [ + "Label", + "=", + "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "+", + "Object.PropertyPressedLabelOffsetY()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Label offset on Y axis when pressed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "label": "Left padding", + "description": "", + "group": "Padding", + "extraInformation": [], + "hidden": false, + "name": "LeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Right padding", + "description": "", + "group": "Padding", + "extraInformation": [], + "hidden": false, + "name": "RightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Top padding", + "description": "", + "group": "Padding", + "extraInformation": [], + "hidden": false, + "name": "TopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bottom padding", + "description": "", + "group": "Padding", + "extraInformation": [], + "hidden": false, + "name": "BottomPadding" + }, + { + "value": "true", + "type": "Boolean", + "label": "Should check hovering", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldCheckHovering" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Text", + "font": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + } + ] + } + ] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Visual effect", + "extensionNamespace": "", + "fullName": "Shake Object (position, angle, scale)", + "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", + "name": "ShakeObject", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", + "shortDescription": "Shake an object, using one or more ways to shake (position, angle, scale).", + "version": "1.5.5", + "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", + "origin": { + "identifier": "ShakeObject", + "name": "gdevelop-extension-store" + }, + "tags": [ + "shaking", + "object", + "effect", + "shake", + "scale", + "position", + "rotate", + "angle" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle).\nThis behavior can be used on any type of object.", + "fullName": "Shake object (position, angle)", + "name": "ShakeObject_PositionAngle", + "objectType": "", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle).", + "fullName": "Shake object (position, angle)", + "functionType": "Action", + "name": "ShakeObject_PositionAngle", + "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": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start/Reset duration timer", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "GetArgumentAsNumber(\"PowerX\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "GetArgumentAsNumber(\"PowerY\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "GetArgumentAsNumber(\"PowerAngle\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "GetArgumentAsNumber(\"TimeBetweenShakes\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShakeForever\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0.08" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If duration is less than a single shake, increase duration to make 1 full shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "<", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect initial shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initiate the onScenePostEvents function", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + }, + { + "description": "Duration of shake (in seconds) (Default: 0.5) ", + "name": "Duration", + "type": "expression" + }, + { + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "name": "PowerX", + "type": "expression" + }, + { + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "name": "PowerY", + "type": "expression" + }, + { + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "name": "PowerAngle", + "type": "expression" + }, + { + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "name": "TimeBetweenShakes", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep object shaking forever (if desired)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "100" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate movement of the shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Run once before every shake movement", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "+", + "1" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Position Shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "After initial shake pick a random direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Rotation (angle) shake ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"even\" shake, rotate clockwise", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, rotate counter-clockwise", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "-1 *(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save that initial shake has been processed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate the fraction of shake that occured during this frame", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PercentTimeElapsedThisFrame", + "=", + "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increase change for the first half of the shake (move away from original values)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Decrease change the second half of the shake (return to original position)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop any shaking of object that was initiated by the Shake Object extension.", + "fullName": "Stop shaking the object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "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.", + "fullName": "Shake object (position, angle, scale)", + "name": "ShakeObject_PositionAngleScale", + "objectType": "Sprite", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle, scale).", + "fullName": "Shake object (position, angle, scale)", + "functionType": "Action", + "name": "ShakeObject_PositionAngleScale", + "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": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start/Reset duration timer", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "GetArgumentAsNumber(\"PowerX\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "GetArgumentAsNumber(\"PowerY\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "GetArgumentAsNumber(\"PowerAngle\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "=", + "GetArgumentAsNumber(\"PowerScale\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "GetArgumentAsNumber(\"TimeBetweenShakes\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShakeForever\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0.08" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If duration is less than a single shake, increase duration to make 1 full shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "<", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect initial shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initiate the onScenePostEvents function", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + }, + { + "description": "Duration of shake (in seconds) (Default: 0.5)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "name": "PowerX", + "type": "expression" + }, + { + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "name": "PowerY", + "type": "expression" + }, + { + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "name": "PowerAngle", + "type": "expression" + }, + { + "description": "Amplitude of scale shake (in percent change) (For example: 5)", + "name": "PowerScale", + "type": "expression" + }, + { + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "name": "TimeBetweenShakes", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep object shaking forever (if desired)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "100" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate movement of the shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Run once before every shake movement", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "+", + "1" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "folded": true, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Position Shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "After initial shake pick a random direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Rotation (angle) shake ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"even\" shake, rotate clockwise", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, rotate counter-clockwise", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Scale shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate object scale displacement, with linear decay over time", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every even shake, increase scale", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementScale", + "=", + "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, decrease scale", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementScale", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save that initial shake has been processed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate the fraction of shake that occured during this frame", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PercentTimeElapsedThisFrame", + "=", + "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increase change for the first half of the shake (move away from original values)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change scale", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Decrease change the second half of the shake (return to original position)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change scale", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Camera", + "extensionNamespace": "", + "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", + "name": "SmoothCamera", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", + "shortDescription": "Smoothly scroll to follow an object.", + "version": "0.2.2", + "description": "The camera follows an object according to:\n- a frame rate independent catch-up speed to make the scrolling from smooth to strong\n- a maximum speed to do linear following ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) or slow down the camera when teleporting the object\n- a follow-free zone to avoid scrolling on small movements\n- an offset to see further in one direction\n- an extra delay and catch-up speed to give an impression of speed (useful for dash)\n- position forecasting and delay to simulate a cameraman response time\n\nA platformer dedicated behavior allows to switch of settings when the character is in air or on the floor. This can be used to stabilize the camera when jumping.", + "origin": { + "identifier": "SmoothCamera", + "name": "gdevelop-extension-store" + }, + "tags": [ + "camera", + "scrolling", + "follow", + "smooth" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Smoothly scroll to follow an object.", + "fullName": "Smooth Camera", + "name": "SmoothCamera", + "objectType": "", + "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": "Update private properties through setters to check their values and initialize state.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyLeftwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyRightwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyUpwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyDownwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyLeftwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetRightwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyRightwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyUpwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyDownwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaLeft" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaLeft()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaRight" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaRight()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaTop()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaBottom()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyCameraDelay()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.", + "fullName": "Move the camera closer", + "functionType": "Action", + "name": "MoveCameraCloser", + "sentence": "Move the camera closer to _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object.", + "fullName": "Do move the camera closer", + "functionType": "Action", + "name": "DoMoveCameraCloser", + "private": true, + "sentence": "Do move the camera closer _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::UpdateDelayedPosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::UpdateForecastedPosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraX(Object.Layer(), 0)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + ">", + "Object.Behavior::FreeAreaRight()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * Object.Behavior::PropertyLogLeftwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "<", + "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "<", + "Object.Behavior::FreeAreaLeft()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * Object.Behavior::PropertyLogRightwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + ">", + "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraY(Object.Layer(), 0)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + ">", + "Object.Behavior::FreeAreaBottom()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * Object.Behavior::PropertyLogUpwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "<", + "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "<", + "Object.Behavior::FreeAreaTop()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * Object.Behavior::PropertyLogDownwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + ">", + "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Delay the camera according to a maximum speed and catch up the delay.", + "fullName": "Wait and catch up", + "functionType": "Action", + "name": "WaitAndCatchUp", + "sentence": "Delay the camera of _PARAM0_ during: _PARAM2_ seconds according to the maximum speed _PARAM3_;_PARAM4_ seconds and catch up in _PARAM5_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "TimeFromStart() + GetArgumentAsNumber(\"WaitingDuration\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitingSpeedXMax\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitingSpeedYMax\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CatchUpDuration\")" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Wait and catch up\"", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Waiting duration (in seconds)", + "name": "WaitingDuration", + "type": "expression" + }, + { + "description": "Waiting maximum camera target speed X", + "name": "WaitingSpeedXMax", + "type": "expression" + }, + { + "description": "Waiting maximum camera target speed Y", + "name": "WaitingSpeedYMax", + "type": "expression" + }, + { + "description": "Catch up duration (in seconds)", + "name": "CatchUpDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the targeted and actual camera position.", + "fullName": "Draw debug", + "functionType": "Action", + "name": "DrawDebug", + "sentence": "Draw targeted and actual camera position for _PARAM0_ on _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "ShapePainter", + "=", + "0" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Path used by the forecasting", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"245;166;35\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "ShapePainter", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::PathLineTo" + }, + "parameters": [ + "ShapePainter", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::EndFillPath" + }, + "parameters": [ + "ShapePainter" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Follow-free area.", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"126;211;33\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::FreeAreaLeft() - 1", + "Object.Behavior::FreeAreaTop() - 1", + "Object.Behavior::FreeAreaRight() + 1", + "Object.Behavior::FreeAreaBottom() + 1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Linear regression vector used by the forcasting.", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"208;2;27\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::PropertyProjectedOldestX()", + "Object.Behavior::PropertyProjectedOldestY()", + "Object.Behavior::PropertyProjectedNewestX()", + "Object.Behavior::PropertyProjectedNewestY()", + "1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Targeted and actual camera position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::PropertyForecastedX()", + "Object.Behavior::PropertyForecastedY()", + "3" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "CameraX(Object.Layer(), 0)", + "CameraY(Object.Layer(), 0) - 4", + "CameraX(Object.Layer(), 0)", + "CameraY(Object.Layer(), 0) + 4", + "1" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "CameraX(Object.Layer(), 0) - 4", + "CameraY(Object.Layer(), 0)", + "CameraX(Object.Layer(), 0) + 4", + "CameraY(Object.Layer(), 0)", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Shape painter", + "name": "ShapePainter", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the following on X axis.", + "fullName": "Follow on X", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowOnX", + "sentence": "The camera follows _PARAM0_ on X axis: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"FollowOnX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow on X axis", + "name": "FollowOnX", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the following on Y axis.", + "fullName": "Follow on Y", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowOnY", + "sentence": "The camera follows _PARAM0_ on Y axis: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"FollowOnY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow on Y axis", + "name": "FollowOnY", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area right border.", + "fullName": "Follow free area right border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaRight", + "sentence": "Change the camera follow free area right border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaRight\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area right border", + "name": "SetFollowFreeAreaRight", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area left border.", + "fullName": "Follow free area left border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaLeft", + "sentence": "Change the camera follow free area left border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaLeft\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area left border", + "name": "SetFollowFreeAreaLeft", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area top border.", + "fullName": "Follow free area top border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaTop", + "sentence": "Change the camera follow free area top border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"FollowFreeAreaTop\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area top border", + "name": "FollowFreeAreaTop", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area bottom border.", + "fullName": "Follow free area bottom border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaBottom", + "sentence": "Change the camera follow free area bottom border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaBottom\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area bottom border", + "name": "SetFollowFreeAreaBottom", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera leftward maximum speed (in pixels per second).", + "fullName": "Leftward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetLeftwardSpeedMax", + "sentence": "Change the camera leftward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Leftward maximum speed (in ratio per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera rightward maximum speed (in pixels per second).", + "fullName": "Rightward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetRightwardSpeedMax", + "sentence": "Change the camera rightward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Rightward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera upward maximum speed (in pixels per second).", + "fullName": "Upward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetUpwardSpeedMax", + "sentence": "Change the camera upward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Upward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera downward maximum speed (in pixels per second).", + "fullName": "Downward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetDownwardSpeedMax", + "sentence": "Change the camera downward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Downward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera leftward catch-up speed (in ratio per second).", + "fullName": "Leftward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetLeftwardSpeed", + "sentence": "Change the camera leftward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"LeftwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyLeftwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Leftward catch-up speed (in ratio per second)", + "name": "LeftwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera rightward catch-up speed (in ratio per second).", + "fullName": "Rightward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetRightwardSpeed", + "sentence": "Change the camera rightward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"RightwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyRightwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Rightward catch-up speed (in ratio per second)", + "name": "RightwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera downward catch-up speed (in ratio per second).", + "fullName": "Downward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetDownwardSpeed", + "sentence": "Change the camera downward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"DownwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyDownwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Downward catch-up speed (in ratio per second)", + "name": "DownwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera upward catch-up speed (in ratio per second).", + "fullName": "Upward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetUpwardSpeed", + "sentence": "Change the camera upward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"UpwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyUpwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Upward catch-up speed (in ratio per second)", + "name": "UpwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera offset on X axis of an object.", + "fullName": "Camera Offset X", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetOffsetX", + "sentence": "Change the camera offset on X axis of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CameraOffsetX\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera offset X", + "name": "CameraOffsetX", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera offset on Y axis of an object.", + "fullName": "Camera Offset Y", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetOffsetY", + "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CameraOffsetY\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera offset Y", + "name": "CameraOffsetY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera forecast time (in seconds).", + "fullName": "Forecast time", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetForecastTime", + "sentence": "Change the camera forecast time of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(0, GetArgumentAsNumber(\"ForecastTime\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Forecast time", + "name": "ForecastTime", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera delay (in seconds).", + "fullName": "Camera delay", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetCameraDelay", + "sentence": "Change the camera delay of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(0, GetArgumentAsNumber(\"CameraDelay\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera delay", + "name": "CameraDelay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area left border X.", + "fullName": "Free area left", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaLeft", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() - Object.Behavior::PropertyFollowFreeAreaLeft()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area right border X.", + "fullName": "Free area right", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaRight", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() + Object.Behavior::PropertyFollowFreeAreaRight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area bottom border Y.", + "fullName": "Free area bottom", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaBottom", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() + Object.Behavior::PropertyFollowFreeAreaBottom()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area top border Y.", + "fullName": "Free area top", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaTop", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() - Object.Behavior::PropertyFollowFreeAreaTop()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Update delayed position and delayed history. This is called in doStepPreEvents.", + "fullName": "Update delayed position", + "functionType": "Action", + "group": "Private", + "name": "UpdateDelayedPosition", + "private": true, + "sentence": "Update delayed position and delayed history of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "TimeFromStart()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use the object center when no delay is asked.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.CenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.CenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition" + }, + "parameters": [ + "Object", + "Behavior", + "TimeFromStart()", + "Object.CenterX()", + "Object.CenterY()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "TimeFromStart()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "Object.CenterX()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "Object.CenterY()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting.", + "comment2": "" + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime[1]", + "<", + "TimeFromStart() - Object.Behavior::CurrentDelay()" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ObjectTime[0])", + "Object.Variable(__SmoothCamera.ObjectX[0])", + "Object.Variable(__SmoothCamera.ObjectY[0])", + "" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't move the camera if there is not enough history.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Variable(__SmoothCamera.ObjectX[0])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Variable(__SmoothCamera.ObjectY[0])" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime[0]", + "<", + "TimeFromStart() - Object.Behavior::CurrentDelay()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "max(0, TimeDelta() * (1 - min(Object.Behavior::PropertyWaitingSpeedXMax() * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), Object.Behavior::PropertyWaitingSpeedYMax() * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Extra delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The time with delay is now between the first 2 indexes", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime" + ] + }, + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX" + ] + }, + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyCameraExtraDelay() / Object.Behavior::PropertyCameraDelayCatchUpDuration()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Start to catch up\"", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, Object.Behavior::PropertyCameraExtraDelay() -Object.Behavior::PropertyCameraDelayCatchUpSpeed() * TimeDelta())" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Catching up delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera following target is delayed from the object.", + "fullName": "Camera is delayed", + "functionType": "Condition", + "name": "IsDelayed", + "private": true, + "sentence": "The camera of _PARAM0_ is delayed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::CurrentDelay()", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the current camera delay.", + "fullName": "Current delay", + "functionType": "Expression", + "name": "CurrentDelay", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraDelay() + Object.Behavior::PropertyCameraExtraDelay()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera following is waiting at a reduced speed.", + "fullName": "Camera is waiting", + "functionType": "Condition", + "name": "IsWaiting", + "private": true, + "sentence": "The camera of _PARAM0_ is waiting", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "TimeFromStart()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Add a position to the history for forecasting. This is called 2 times in UpadteDelayedPosition.", + "fullName": "Add forecast history position", + "functionType": "Action", + "group": "Private", + "name": "AddForecastHistoryPosition", + "private": true, + "sentence": "Add the time:_PARAM2_ and position: _PARAM3_; _PARAM4_ to the forecast history of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime", + "GetArgumentAsNumber(\"Time\")" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryX", + "GetArgumentAsNumber(\"ObjectX\")" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryY", + "GetArgumentAsNumber(\"ObjectY\")" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions.", + "comment2": "" + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">=", + "3" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime[0]", + "<", + "TimeFromStart() - Object.Behavior::PropertyCameraDelay() - Object.Behavior::PropertyCameraExtraDelay() - Object.Behavior::PropertyForecastHistoryDuration()" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryX", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryY", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Object X", + "name": "ObjectX", + "type": "expression" + }, + { + "description": "Object Y", + "name": "ObjectY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Update forecasted position. This is called in doStepPreEvents.", + "fullName": "Update forecasted position", + "functionType": "Action", + "group": "Private", + "name": "UpdateForecastedPosition", + "private": true, + "sentence": "Update forecasted position of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Mean X", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "/", + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Mean Y", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "/", + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Mean: \" + ToString(Object.Behavior::PropertyForecastHistoryMeanX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryMeanY())", + "", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Variance and Covariance", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX(), 2)" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY(), 2)" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX())\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY())" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Variances: \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceY()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryCovariance())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "<", + "1" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + ">=", + "1" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + ">=", + "1" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Linear function parameters", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + ">=", + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryMeanY() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanX()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Projection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Axis permutation to avoid a ratio between 2 numbers near 0.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "<", + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryMeanX() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanY()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Projection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Permute back axis", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedOldestX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedOldestY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyIndex()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyIndex()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Oldest: \" + ToString(Object.Behavior::PropertyProjectedOldestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedOldestY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Newest: \" + ToString(Object.Behavior::PropertyProjectedNewestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedNewestY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Forcasted position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestX() + ( Object.Behavior::PropertyProjectedNewestX() - Object.Behavior::PropertyProjectedOldestX()) * Object.Behavior::ForecastTimeRatio()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestY() + ( Object.Behavior::PropertyProjectedNewestY() - Object.Behavior::PropertyProjectedOldestY()) * Object.Behavior::ForecastTimeRatio()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Forecasted: \" + ToString(Object.Behavior::PropertyForecastedX()) + \" \" + ToString(Object.Behavior::PropertyForecastedY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Project history ends position to have the vector on the line from linear regression. This function is only called by UpdateForecastedPosition.", + "fullName": "Project history ends", + "functionType": "Action", + "group": "Private", + "name": "ProjectHistoryEnds", + "private": true, + "sentence": "Project history oldest: _PARAM2_;_PARAM3_ and newest position: _PARAM4_;_PARAM5_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(GetArgumentAsNumber(\"NewestX\") + (GetArgumentAsNumber(\"NewestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"NewestY\") + (GetArgumentAsNumber(\"NewestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"NewestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(GetArgumentAsNumber(\"OldestX\") + (GetArgumentAsNumber(\"OldestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"OldestY\") + (GetArgumentAsNumber(\"OldestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"OldestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "OldestX", + "name": "OldestX", + "type": "expression" + }, + { + "description": "OldestY", + "name": "OldestY", + "type": "expression" + }, + { + "description": "Newest X", + "name": "NewestX", + "type": "expression" + }, + { + "description": "Newest Y", + "name": "NewestY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the ratio between forecast time and the duration of the history. This function is only called by UpdateForecastedPosition.", + "fullName": "Forecast time ratio", + "functionType": "Expression", + "group": "Private", + "name": "ForecastTimeRatio", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "- Object.Behavior::PropertyForecastTime() / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.9", + "type": "Number", + "label": "Leftward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "LeftwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Rightward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "RightwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "UpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "DownwardSpeed" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on X axis", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FollowOnX" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on Y axis", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FollowOnY" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area left border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaLeft" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area right border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaRight" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area top border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area bottom border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaBottom" + }, + { + "value": "0", + "type": "Number", + "label": "Camera offset X", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "CameraOffsetX" + }, + { + "value": "0", + "type": "Number", + "label": "Camera offset Y", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "CameraOffsetY" + }, + { + "value": "0", + "type": "Number", + "label": "Camera delay (in seconds)", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "CameraDelay" + }, + { + "value": "0", + "type": "Number", + "label": "Forcast time (in seconds)", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "ForecastTime" + }, + { + "value": "0", + "type": "Number", + "label": "Forecast history duration (in second)", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "ForecastHistoryDuration" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogLeftwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogRightwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogDownwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogUpwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DelayedCenterX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DelayedCenterY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryMeanX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryMeanY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryVarianceX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryCovariance" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryLinearA" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryLinearB" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastedX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastedY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedNewestX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedNewestY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedOldestX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedOldestY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryVarianceY" + }, + { + "value": "", + "type": "Number", + "label": "Index (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraDelayCatchUpSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraExtraDelay" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingSpeedXMax" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingSpeedYMax" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingEnd" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraDelayCatchUpDuration" + }, + { + "value": "9000", + "type": "Number", + "label": "Leftward maximum speed (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "LeftwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Rightward maximum speed (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "RightwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Upward maximum speed (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "UpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Downward maximum speed (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "DownwardSpeedMax" + }, + { + "value": "", + "type": "Number", + "label": "OldX (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldX" + }, + { + "value": "", + "type": "Number", + "label": "OldY (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldY" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsCalledManually" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", + "fullName": "Smooth platformer camera", + "name": "SmoothPlatformerCamera", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorFollowFreeAreaTop()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorFollowFreeAreaBottom()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorUpwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorDownwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorUpwardSpeedMax()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorDownwardSpeedMax()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirFollowFreeAreaTop()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirFollowFreeAreaBottom()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirUpwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirDownwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirUpwardSpeedMax()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirDownwardSpeedMax()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothPlatformerCamera", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "", + "type": "Behavior", + "label": "Smooth camera behavior", + "description": "", + "group": "", + "extraInformation": [ + "SmoothCamera::SmoothCamera" + ], + "hidden": false, + "name": "SmoothCamera" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JumpOriginY" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area top in the air", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "AirFollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area bottom in the air", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "AirFollowFreeAreaBottom" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area top on the floor", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FloorFollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "label": "Follow free area bottom on the floor", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FloorFollowFreeAreaBottom" + }, + { + "value": "0.95", + "type": "Number", + "label": "Upward speed in the air (in ratio persecond)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "AirUpwardSpeed" + }, + { + "value": "0.95", + "type": "Number", + "label": "Downward speed in the air (in ratio persecond)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "AirDownwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward speed on the floor (in ratio persecond)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "FloorUpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward speed on the floor (in ratio persecond)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "FloorDownwardSpeed" + }, + { + "value": "9000", + "type": "Number", + "label": "Upward maximum speed in the air (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "AirUpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Downward maximum speed in the air (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "AirDownwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Upward maximum speed on the floor (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "FloorUpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "label": "Downward maximum speed on the floor (in pixels per second)", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "FloorDownwardSpeedMax" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "westboy, daliyoucefmedakram@gmail.com, @bouh", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Auto typing animation for text (\"typewriter\" effect)", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXR5cGV3cml0ZXIiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjAgMTNIMTZDMTYgMTQuMSAxNS4xIDE1IDE0IDE1SDEwQzguOSAxNSA4IDE0LjEgOCAxM0g0TDIgMThWMjBDMiAyMS4xIDIuOSAyMiA0IDIySDIwQzIxLjEgMjIgMjIgMjEuMSAyMiAyMFYxOE02IDIwQzUuMTEgMjAgNC42NiAxOC45MiA1LjI5IDE4LjI5QzUuOTIgMTcuNjYgNyAxOC4xMSA3IDE5QzcgMTkuNTUgNi41NSAyMCA2IDIwTTEwIDIwQzkuMTEgMjAgOC42NiAxOC45MiA5LjI5IDE4LjI5QzkuOTIgMTcuNjYgMTEgMTguMTEgMTEgMTlDMTEgMTkuNTUgMTAuNTUgMjAgMTAgMjBNMTQgMjBDMTMuMTEgMjAgMTIuNjYgMTguOTIgMTMuMjkgMTguMjlDMTMuOTIgMTcuNjYgMTUgMTguMTEgMTUgMTlDMTUgMTkuNTUgMTQuNTUgMjAgMTQgMjBNMTggMjBDMTcuMTEgMjAgMTYuNjYgMTguOTIgMTcuMjkgMTguMjlDMTcuOTIgMTcuNjYgMTkgMTguMTEgMTkgMTlDMTkgMTkuNTUgMTguNTUgMjAgMTggMjBNMTggMTBWM0g2VjEwSDNWMTJIMjFWMTBNOCA1SDE2VjZIOE04IDdIMTRWOEg4IiAvPjwvc3ZnPg==", + "name": "AutoTyping", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/typewriter.svg", + "shortDescription": "Animate text to simulate it being written one character at at time (a \"typewriter\" effect).", + "version": "1.1.0", + "description": "Animate text to simulate it being written one character at at time (a \"typewriter\" effect), with a customizable time between each character. Useful for dialogue scenes or visual novels.\n\nHow to use:\n- Add the behavior to a Text object (BBText, Bitmap Text object) and choose the interval between characters.\n\nTips:\n- Change the typing speed with the \"Change interval\" action.\n- Pause the typing and resume it at any time.\n- Use the \"Skip to end of text\" action to give users a way to skip text they don't want to read \n- If the text changes, the automatic typing starts again from the beginning with the new text.\n- Use a condition to check if the typing finished.\n- Use a condition to check if a new text character was added. This is useful to trigger audio effects.\n- Use the \"CurrentCharacter\" expression to know when a specific character was displayed.\n", + "origin": { + "identifier": "AutoTyping", + "name": "gdevelop-extension-store" + }, + "tags": [ + "text", + "bbtext", + "dialogue", + "visual novel", + "autotyping", + "bitmap" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Animate text to simulate it being written one character at at time (a \"typewriter\" effect).", + "fullName": "Auto typing text", + "name": "Text_AutoTyping", + "objectType": "TextObject::Text", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Initialize object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.String()" + ] + }, + { + "type": { + "value": "AutoTyping::Text_AutoTyping::StartAtBeginning" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset trigger", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AutoTyping::Text_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update text based on timer", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "<=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Object", + "=", + "SubStr(Object.VariableString(__AutoTyping.txt_buffer), 0, Object.Variable(__AutoTyping.write_index))" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"", + "Object.Behavior::PropertyInterval()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "+", + "1" + ] + }, + { + "type": { + "value": "AutoTyping::Text_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "AutoTyping::Text_AutoTyping::SetPropertyCurrentCharacter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StrAt(Object.VariableString(__AutoTyping.txt_buffer), Object.Variable(__AutoTyping.write_index))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Object", + "!=", + "Object.VariableString(__AutoTyping.txt_buffer)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.String()" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Execute actions when the auto typing text ends.", + "fullName": "Auto typing finished", + "functionType": "Condition", + "name": "TypingFinished", + "sentence": "When _PARAM0_ finished auto typing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect if the auto typing is on pause.", + "fullName": "Typing on pause", + "functionType": "Condition", + "name": "TypingPause", + "sentence": "_PARAM0_ is on pause", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimerPaused" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect when a new text character is displayed. Useful for triggering sound effects.", + "fullName": "New text character was just displayed", + "functionType": "Condition", + "name": "IsCharacterJustAdded", + "sentence": "Text character was just displayed on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AutoTyping::Text_AutoTyping::PropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pause animation auto typing.", + "fullName": "Pause auto typing", + "functionType": "Action", + "name": "Pause", + "sentence": "Pause auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Resume auto typing after pause.", + "fullName": "Resume after pause", + "functionType": "Action", + "name": "Resume", + "sentence": "Resume auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Skip to the end of the text.", + "fullName": "Skip to the end of the text", + "functionType": "Action", + "name": "SkipToEnd", + "sentence": "Skip to the end of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Jump to a specific position in the text. Positions start at \"0\" and increase by one for every character.", + "fullName": "Jump to a specific position in the text", + "functionType": "Action", + "name": "JumpToPosition", + "sentence": "Jump to position _PARAM2_ in the text _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "GetArgumentAsNumber(\"CharacterIndex\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + }, + { + "description": "Character position", + "name": "CharacterIndex", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Start at the beginning of text.", + "fullName": "Start at the beginning of the text", + "functionType": "Action", + "name": "StartAtBeginning", + "sentence": "Start at the beginning of _PARAM0_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start at beginning", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time between characters being typed. ", + "fullName": "Time between characters", + "functionType": "Action", + "name": "ChangeInterval", + "sentence": "Change the interval between characters of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AutoTyping::Text_AutoTyping::SetPropertyInterval" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"interval\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + }, + { + "description": "Interval time", + "name": "interval", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text character that was last displayed.", + "fullName": "Current text character", + "functionType": "StringExpression", + "name": "CurrentCharacter", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentCharacter()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the index of the text character that was last displayed.", + "fullName": "Index of current text character", + "functionType": "Expression", + "name": "CurrentCharacterIndex", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__AutoTyping.write_index)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::Text_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.05", + "type": "Number", + "label": "Interval between characters in seconds.", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Interval" + }, + { + "value": "", + "type": "Boolean", + "label": "Detect if a new text character was just displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CharacterJustAdded" + }, + { + "value": "", + "type": "String", + "label": "Text character that was most recently displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentCharacter" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Animate text to simulate it being written one character at at time (a \"typewriter\" effect).", + "fullName": "Auto typing text", + "name": "BitmapText_AutoTyping", + "objectType": "BitmapText::BitmapTextObject", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Initialize object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.Text()" + ] + }, + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::StartAtBeginning" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset trigger", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update text based on timer", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "<=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::BitmapTextObject::SetText" + }, + "parameters": [ + "Object", + "=", + "SubStr(Object.VariableString(__AutoTyping.txt_buffer), 0, Object.Variable(__AutoTyping.write_index))" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"", + "Object.Behavior::PropertyInterval()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "+", + "1" + ] + }, + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::SetPropertyCurrentCharacter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StrAt(Object.VariableString(__AutoTyping.txt_buffer), Object.Variable(__AutoTyping.write_index))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BitmapText::BitmapTextObject::Text" + }, + "parameters": [ + "Object", + "!=", + "Object.VariableString(__AutoTyping.txt_buffer)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.Text()" + ] + }, + { + "type": { + "value": "BitmapText::BitmapTextObject::SetText" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Execute actions when the auto typing text ends.", + "fullName": "Auto typing finished", + "functionType": "Condition", + "name": "TypingFinished", + "sentence": "When _PARAM0_ finished auto typing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect if the auto typing is on pause.", + "fullName": "Typing on pause", + "functionType": "Condition", + "name": "TypingPause", + "sentence": "_PARAM0_ is on pause", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimerPaused" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect when a new text character is displayed. Useful for triggering sound effects.", + "fullName": "New text character was just displayed", + "functionType": "Condition", + "name": "IsCharacterJustAdded", + "sentence": "Text character was just displayed on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::PropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pause animation auto typing.", + "fullName": "Pause auto typing", + "functionType": "Action", + "name": "Pause", + "sentence": "Pause auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Resume auto typing after pause.", + "fullName": "Resume after pause", + "functionType": "Action", + "name": "Resume", + "sentence": "Resume auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Skip to the end of the text.", + "fullName": "Skip to the end of the text", + "functionType": "Action", + "name": "SkipToEnd", + "sentence": "Skip to the end of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Jump to a specific position in the text. Positions start at \"0\" and increase by one for every character.", + "fullName": "Jump to a specific position in the text", + "functionType": "Action", + "name": "JumpToPosition", + "sentence": "Jump to position _PARAM2_ in the text _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "GetArgumentAsNumber(\"CharacterIndex\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + }, + { + "description": "Character position", + "name": "CharacterIndex", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Start at the beginning of text.", + "fullName": "Start at the beginning of the text", + "functionType": "Action", + "name": "StartAtBeginning", + "sentence": "Start at the beginning of _PARAM0_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start at beginning", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "BitmapText::BitmapTextObject::SetText" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time between characters being typed. ", + "fullName": "Time between characters", + "functionType": "Action", + "name": "ChangeInterval", + "sentence": "Set the interval between characters of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AutoTyping::BitmapText_AutoTyping::SetPropertyInterval" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"interval\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + }, + { + "description": "Interval tme", + "name": "interval", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text character that was last displayed.", + "fullName": "Current character", + "functionType": "StringExpression", + "name": "CurrentCharacter", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentCharacter()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the index of the text character that was last displayed.", + "fullName": "Index of current text character", + "functionType": "Expression", + "name": "CurrentCharacterIndex", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__AutoTyping.write_index)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BitmapText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.05", + "type": "Number", + "label": "Interval between characters in seconds.", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Interval" + }, + { + "value": "", + "type": "Boolean", + "label": "Detect if a new text character was just displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CharacterJustAdded" + }, + { + "value": "", + "type": "String", + "label": "Text character that was most recently displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentCharacter" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Animate text to simulate it being written one character at at time (a \"typewriter\" effect).", + "fullName": "Auto typing text", + "name": "BBText_AutoTyping", + "objectType": "BBText::BBText", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Initialize object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.GetBBText()" + ] + }, + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::StartAtBeginning" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset trigger", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update text based on timer", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "<=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "BBText::SetBBText" + }, + "parameters": [ + "Object", + "=", + "SubStr(Object.VariableString(__AutoTyping.txt_buffer), 0, Object.Variable(__AutoTyping.write_index))" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"", + "Object.Behavior::PropertyInterval()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "+", + "1" + ] + }, + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::SetPropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::SetPropertyCurrentCharacter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StrAt(Object.VariableString(__AutoTyping.txt_buffer), Object.Variable(__AutoTyping.write_index))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BBText::IsBBText" + }, + "parameters": [ + "Object", + "!=", + "Object.VariableString(__AutoTyping.txt_buffer)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__AutoTyping.txt_buffer", + "=", + "Object.GetBBText()" + ] + }, + { + "type": { + "value": "BBText::SetBBText" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Execute actions when the auto typing text ends.", + "fullName": "Auto typing finished", + "functionType": "Condition", + "name": "TypingFinished", + "sentence": "When _PARAM0_ finished auto typing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + ">=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect if the auto typing is on pause.", + "fullName": "Typing on pause", + "functionType": "Condition", + "name": "TypingPause", + "sentence": "_PARAM0_ is on pause", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimerPaused" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Detect when a new text character is displayed. Useful for triggering sound effects.", + "fullName": "New text character was just displayed", + "functionType": "Condition", + "name": "IsCharacterJustAdded", + "sentence": "Text character was just displayed on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::PropertyCharacterJustAdded" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pause animation auto typing.", + "fullName": "Pause auto typing", + "functionType": "Action", + "name": "Pause", + "sentence": "Pause auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Resume auto typing after pause.", + "fullName": "Resume after pause", + "functionType": "Action", + "name": "Resume", + "sentence": "Resume auto typing of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Skip to the end of the text.", + "fullName": "Skip to the end of the text", + "functionType": "Action", + "name": "SkipToEnd", + "sentence": "Skip to the end of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "StrLength(Object.VariableString(__AutoTyping.txt_buffer))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Jump to a specific position in the text. Positions start at \"0\" and increase by one for every character.", + "fullName": "Jump to a specific position in the text", + "functionType": "Action", + "name": "JumpToPosition", + "sentence": "Jump to position _PARAM2_ in the text _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "GetArgumentAsNumber(\"CharacterIndex\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + }, + { + "description": "Character position", + "name": "CharacterIndex", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Start at the beginning of text.", + "fullName": "Start at the beginning of the text", + "functionType": "Action", + "name": "StartAtBeginning", + "sentence": "Start at the beginning of _PARAM0_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start at beginning", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__AutoTyping.write_index", + "=", + "0" + ] + }, + { + "type": { + "value": "BBText::SetBBText" + }, + "parameters": [ + "Object", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__AutoTyping.WriteTimer\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time between characters being typed. ", + "fullName": "Time between characters", + "functionType": "Action", + "name": "ChangeInterval", + "sentence": "Set the interval between characters of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AutoTyping::BBText_AutoTyping::SetPropertyInterval" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"interval\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + }, + { + "description": "Interval tme", + "name": "interval", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text character that was last displayed.", + "fullName": "Current character", + "functionType": "StringExpression", + "name": "CurrentCharacter", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentCharacter()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the index of the text character that was last displayed.", + "fullName": "Index of current text character", + "functionType": "Expression", + "name": "CurrentCharacterIndex", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__AutoTyping.write_index)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BBText::BBText", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AutoTyping::BBText_AutoTyping", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.05", + "type": "Number", + "label": "Interval between characters in seconds.", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Interval" + }, + { + "value": "", + "type": "Boolean", + "label": "Detect if a new text character was just displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CharacterJustAdded" + }, + { + "value": "", + "type": "String", + "label": "Text character that was most recently displayed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentCharacter" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file diff --git a/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.fnt b/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.fnt new file mode 100644 index 000000000..def784a82 --- /dev/null +++ b/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.fnt @@ -0,0 +1,95 @@ +info face="8-bitOperatorPlus8-Regular" size=23 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=10,10,10,10 spacing=5,5 +common lineHeight=23 base=14 scaleW=392 scaleH=387 pages=1 packed=0 +page id=0 file="8BitOperatorPlus8Regular_Edited.png" +chars count=91 +char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=8 page=0 chnl=15 +char id=33 x=364 y=111 width=26 height=38 xoffset=-10 yoffset=-11.98 xadvance=6 page=0 chnl=15 +char id=34 x=288 y=152 width=34 height=30 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=35 x=52 y=0 width=36 height=36 xoffset=-10 yoffset=-9.98 xadvance=16 page=0 chnl=15 +char id=36 x=210 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=37 x=0 y=339 width=36 height=36 xoffset=-10 yoffset=-9.98 xadvance=16 page=0 chnl=15 +char id=38 x=210 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=39 x=364 y=76 width=28 height=30 xoffset=-10 yoffset=-11.98 xadvance=8 page=0 chnl=15 +char id=40 x=327 y=203 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=41 x=327 y=246 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=42 x=0 y=210 width=38 height=34 xoffset=-10 yoffset=-9.98 xadvance=18 page=0 chnl=15 +char id=43 x=288 y=78 width=34 height=34 xoffset=-10 yoffset=-9.98 xadvance=14 page=0 chnl=15 +char id=44 x=364 y=41 width=28 height=30 xoffset=-10 yoffset=-1.99 xadvance=8 page=0 chnl=15 +char id=45 x=327 y=0 width=32 height=26 xoffset=-10 yoffset=-5.99 xadvance=12 page=0 chnl=15 +char id=46 x=364 y=236 width=26 height=26 xoffset=-10 yoffset=0 xadvance=6 page=0 chnl=15 +char id=47 x=288 y=222 width=32 height=40 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=48 x=52 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=49 x=327 y=31 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=50 x=52 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=51 x=52 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=52 x=52 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=53 x=52 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=54 x=52 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=55 x=52 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=56 x=93 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=57 x=93 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=58 x=364 y=197 width=26 height=34 xoffset=-10 yoffset=-7.98 xadvance=6 page=0 chnl=15 +char id=59 x=364 y=0 width=28 height=36 xoffset=-10 yoffset=-7.98 xadvance=8 page=0 chnl=15 +char id=61 x=288 y=117 width=34 height=30 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=63 x=210 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=64 x=0 y=294 width=36 height=40 xoffset=-10 yoffset=-11.98 xadvance=16 page=0 chnl=15 +char id=65 x=93 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=66 x=93 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=67 x=93 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=68 x=132 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=69 x=132 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=70 x=132 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=71 x=132 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=72 x=132 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=73 x=327 y=160 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=74 x=132 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=75 x=132 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=76 x=132 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=77 x=0 y=46 width=38 height=38 xoffset=-10 yoffset=-11.98 xadvance=18 page=0 chnl=15 +char id=78 x=132 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=79 x=171 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=80 x=171 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=81 x=0 y=249 width=36 height=40 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=82 x=171 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=83 x=171 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=84 x=171 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=85 x=171 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=86 x=171 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=87 x=0 y=89 width=38 height=38 xoffset=-10 yoffset=-11.98 xadvance=18 page=0 chnl=15 +char id=88 x=171 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=89 x=171 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=90 x=210 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=91 x=327 y=289 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=93 x=327 y=332 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=94 x=288 y=187 width=34 height=30 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=95 x=288 y=353 width=32 height=26 xoffset=-12 yoffset=2 xadvance=8 page=0 chnl=15 +char id=97 x=249 y=41 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=98 x=93 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=99 x=249 y=80 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=100 x=93 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=101 x=249 y=119 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=102 x=288 y=267 width=32 height=38 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=103 x=210 y=258 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=104 x=93 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=105 x=327 y=74 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=106 x=52 y=41 width=34 height=40 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=107 x=93 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=108 x=327 y=117 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=109 x=0 y=132 width=38 height=34 xoffset=-10 yoffset=-7.98 xadvance=18 page=0 chnl=15 +char id=110 x=249 y=158 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=111 x=249 y=197 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=112 x=210 y=299 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=113 x=210 y=340 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=114 x=249 y=236 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=115 x=249 y=275 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=116 x=288 y=310 width=32 height=38 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=117 x=249 y=314 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=118 x=249 y=353 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=119 x=0 y=171 width=38 height=34 xoffset=-10 yoffset=-7.98 xadvance=18 page=0 chnl=15 +char id=120 x=288 y=0 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=121 x=249 y=0 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=122 x=288 y=39 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=123 x=210 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=124 x=364 y=154 width=26 height=38 xoffset=-10 yoffset=-11.98 xadvance=6 page=0 chnl=15 +char id=125 x=210 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=8470 x=0 y=0 width=47 height=41 xoffset=-13 yoffset=-8 xadvance=22 page=0 chnl=15 diff --git a/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.png b/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.png new file mode 100644 index 000000000..84c5b5f00 Binary files /dev/null and b/examples/top-down-rpg/assets/8BitOperatorPlus8Regular_Edited.png differ diff --git a/examples/top-down-rpg/assets/ACgarRight1.png b/examples/top-down-rpg/assets/ACgarRight1.png new file mode 100644 index 000000000..c0532533a Binary files /dev/null and b/examples/top-down-rpg/assets/ACgarRight1.png differ diff --git a/examples/top-down-rpg/assets/ACgarRight2.png b/examples/top-down-rpg/assets/ACgarRight2.png new file mode 100644 index 000000000..2da3070de Binary files /dev/null and b/examples/top-down-rpg/assets/ACgarRight2.png differ diff --git a/examples/top-down-rpg/assets/ACgarRight3.png b/examples/top-down-rpg/assets/ACgarRight3.png new file mode 100644 index 000000000..9403bea79 Binary files /dev/null and b/examples/top-down-rpg/assets/ACgarRight3.png differ diff --git a/examples/top-down-rpg/assets/ACgarRight4.png b/examples/top-down-rpg/assets/ACgarRight4.png new file mode 100644 index 000000000..c235c98c8 Binary files /dev/null and b/examples/top-down-rpg/assets/ACgarRight4.png differ diff --git a/examples/top-down-rpg/assets/ACharDown1.png b/examples/top-down-rpg/assets/ACharDown1.png new file mode 100644 index 000000000..43ae72be7 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharDown1.png differ diff --git a/examples/top-down-rpg/assets/ACharDown2.png b/examples/top-down-rpg/assets/ACharDown2.png new file mode 100644 index 000000000..d9fd12b91 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharDown2.png differ diff --git a/examples/top-down-rpg/assets/ACharDown3.png b/examples/top-down-rpg/assets/ACharDown3.png new file mode 100644 index 000000000..f2aed14e2 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharDown3.png differ diff --git a/examples/top-down-rpg/assets/ACharDown4.png b/examples/top-down-rpg/assets/ACharDown4.png new file mode 100644 index 000000000..87dce8ca6 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharDown4.png differ diff --git a/examples/top-down-rpg/assets/ACharLeft1.png b/examples/top-down-rpg/assets/ACharLeft1.png new file mode 100644 index 000000000..97ffe9895 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharLeft1.png differ diff --git a/examples/top-down-rpg/assets/ACharLeft2.png b/examples/top-down-rpg/assets/ACharLeft2.png new file mode 100644 index 000000000..28adff446 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharLeft2.png differ diff --git a/examples/top-down-rpg/assets/ACharLeft3.png b/examples/top-down-rpg/assets/ACharLeft3.png new file mode 100644 index 000000000..699879ad6 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharLeft3.png differ diff --git a/examples/top-down-rpg/assets/ACharLeft4.png b/examples/top-down-rpg/assets/ACharLeft4.png new file mode 100644 index 000000000..e6d44f273 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharLeft4.png differ diff --git a/examples/top-down-rpg/assets/ACharUp1.png b/examples/top-down-rpg/assets/ACharUp1.png new file mode 100644 index 000000000..a03a9cfc0 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharUp1.png differ diff --git a/examples/top-down-rpg/assets/ACharUp2.png b/examples/top-down-rpg/assets/ACharUp2.png new file mode 100644 index 000000000..203a663ac Binary files /dev/null and b/examples/top-down-rpg/assets/ACharUp2.png differ diff --git a/examples/top-down-rpg/assets/ACharUp3.png b/examples/top-down-rpg/assets/ACharUp3.png new file mode 100644 index 000000000..a03a9cfc0 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharUp3.png differ diff --git a/examples/top-down-rpg/assets/ACharUp4.png b/examples/top-down-rpg/assets/ACharUp4.png new file mode 100644 index 000000000..f977e5d21 Binary files /dev/null and b/examples/top-down-rpg/assets/ACharUp4.png differ diff --git a/examples/top-down-rpg/assets/Attack.wav b/examples/top-down-rpg/assets/Attack.wav new file mode 100644 index 000000000..af49f6ebe Binary files /dev/null and b/examples/top-down-rpg/assets/Attack.wav differ diff --git a/examples/top-down-rpg/assets/Border.png b/examples/top-down-rpg/assets/Border.png new file mode 100644 index 000000000..ce7120f54 Binary files /dev/null and b/examples/top-down-rpg/assets/Border.png differ diff --git a/examples/top-down-rpg/assets/Border2.png b/examples/top-down-rpg/assets/Border2.png new file mode 100644 index 000000000..8f7e8ba82 Binary files /dev/null and b/examples/top-down-rpg/assets/Border2.png differ diff --git a/examples/top-down-rpg/assets/Bush1.png b/examples/top-down-rpg/assets/Bush1.png new file mode 100644 index 000000000..95119d6fa Binary files /dev/null and b/examples/top-down-rpg/assets/Bush1.png differ diff --git a/examples/top-down-rpg/assets/Creature_Enemy.png b/examples/top-down-rpg/assets/Creature_Enemy.png new file mode 100644 index 000000000..0bb8a4d2b Binary files /dev/null and b/examples/top-down-rpg/assets/Creature_Enemy.png differ diff --git a/examples/top-down-rpg/assets/Creature_Player.png b/examples/top-down-rpg/assets/Creature_Player.png new file mode 100644 index 000000000..d1ba0f54a Binary files /dev/null and b/examples/top-down-rpg/assets/Creature_Player.png differ diff --git a/examples/top-down-rpg/assets/Dock1.png b/examples/top-down-rpg/assets/Dock1.png new file mode 100644 index 000000000..c4f469d5c Binary files /dev/null and b/examples/top-down-rpg/assets/Dock1.png differ diff --git a/examples/top-down-rpg/assets/Enemy_Spawn_Location.png b/examples/top-down-rpg/assets/Enemy_Spawn_Location.png new file mode 100644 index 000000000..b466cec3a Binary files /dev/null and b/examples/top-down-rpg/assets/Enemy_Spawn_Location.png differ diff --git a/examples/top-down-rpg/assets/Grass1.png b/examples/top-down-rpg/assets/Grass1.png new file mode 100644 index 000000000..09e009523 Binary files /dev/null and b/examples/top-down-rpg/assets/Grass1.png differ diff --git a/examples/top-down-rpg/assets/Healthbar.png b/examples/top-down-rpg/assets/Healthbar.png new file mode 100644 index 000000000..e4a52ca8f Binary files /dev/null and b/examples/top-down-rpg/assets/Healthbar.png differ diff --git a/examples/top-down-rpg/assets/HealthbarBorder.png b/examples/top-down-rpg/assets/HealthbarBorder.png new file mode 100644 index 000000000..42331b27e Binary files /dev/null and b/examples/top-down-rpg/assets/HealthbarBorder.png differ diff --git a/examples/top-down-rpg/assets/House1.png b/examples/top-down-rpg/assets/House1.png new file mode 100644 index 000000000..43683d4f9 Binary files /dev/null and b/examples/top-down-rpg/assets/House1.png differ diff --git a/examples/top-down-rpg/assets/House2.png b/examples/top-down-rpg/assets/House2.png new file mode 100644 index 000000000..f7a2f65a0 Binary files /dev/null and b/examples/top-down-rpg/assets/House2.png differ diff --git a/examples/top-down-rpg/assets/HoverSound.wav b/examples/top-down-rpg/assets/HoverSound.wav new file mode 100644 index 000000000..6fdc8f3df Binary files /dev/null and b/examples/top-down-rpg/assets/HoverSound.wav differ diff --git a/examples/top-down-rpg/assets/Road1.png b/examples/top-down-rpg/assets/Road1.png new file mode 100644 index 000000000..cfecd2311 Binary files /dev/null and b/examples/top-down-rpg/assets/Road1.png differ diff --git a/examples/top-down-rpg/assets/RoadEdge1.png b/examples/top-down-rpg/assets/RoadEdge1.png new file mode 100644 index 000000000..bc320b462 Binary files /dev/null and b/examples/top-down-rpg/assets/RoadEdge1.png differ diff --git a/examples/top-down-rpg/assets/Talk.wav b/examples/top-down-rpg/assets/Talk.wav new file mode 100644 index 000000000..1eeab9781 Binary files /dev/null and b/examples/top-down-rpg/assets/Talk.wav differ diff --git a/examples/top-down-rpg/assets/Tree1.png b/examples/top-down-rpg/assets/Tree1.png new file mode 100644 index 000000000..9190d142e Binary files /dev/null and b/examples/top-down-rpg/assets/Tree1.png differ diff --git a/examples/top-down-rpg/assets/Tree2.png b/examples/top-down-rpg/assets/Tree2.png new file mode 100644 index 000000000..5b7164fa1 Binary files /dev/null and b/examples/top-down-rpg/assets/Tree2.png differ diff --git a/examples/top-down-rpg/assets/Water1.png b/examples/top-down-rpg/assets/Water1.png new file mode 100644 index 000000000..464ad954a Binary files /dev/null and b/examples/top-down-rpg/assets/Water1.png differ diff --git a/examples/top-down-rpg/assets/WaterCorner.png b/examples/top-down-rpg/assets/WaterCorner.png new file mode 100644 index 000000000..2dc109d91 Binary files /dev/null and b/examples/top-down-rpg/assets/WaterCorner.png differ diff --git a/examples/top-down-rpg/assets/WaterCorner2.png b/examples/top-down-rpg/assets/WaterCorner2.png new file mode 100644 index 000000000..764390c69 Binary files /dev/null and b/examples/top-down-rpg/assets/WaterCorner2.png differ diff --git a/examples/top-down-rpg/assets/WaterEdgeRight.png b/examples/top-down-rpg/assets/WaterEdgeRight.png new file mode 100644 index 000000000..2fe38ab97 Binary files /dev/null and b/examples/top-down-rpg/assets/WaterEdgeRight.png differ diff --git a/examples/top-down-rpg/assets/WaterEdgeUp.png b/examples/top-down-rpg/assets/WaterEdgeUp.png new file mode 100644 index 000000000..c71d55a3a Binary files /dev/null and b/examples/top-down-rpg/assets/WaterEdgeUp.png differ diff --git a/examples/top-down-rpg/thumbnail.png b/examples/top-down-rpg/thumbnail.png new file mode 100644 index 000000000..671d74797 Binary files /dev/null and b/examples/top-down-rpg/thumbnail.png differ