diff --git a/examples/health-with-shield/Preview.png b/examples/health-with-shield/Preview.png new file mode 100644 index 000000000..eaf2153fe Binary files /dev/null and b/examples/health-with-shield/Preview.png differ diff --git a/examples/health-with-shield/README.md b/examples/health-with-shield/README.md new file mode 100644 index 000000000..e50eeca0b --- /dev/null +++ b/examples/health-with-shield/README.md @@ -0,0 +1 @@ +Demonstrate the Health extension including a shield, regeneration, healing, and applying damage. \ No newline at end of file diff --git a/examples/health-with-shield/assets/audio/Fight.aac b/examples/health-with-shield/assets/audio/Fight.aac new file mode 100644 index 000000000..8b010a71d Binary files /dev/null and b/examples/health-with-shield/assets/audio/Fight.aac differ diff --git a/examples/health-with-shield/assets/audio/Healing.wav b/examples/health-with-shield/assets/audio/Healing.wav new file mode 100644 index 000000000..5bd7ac83e Binary files /dev/null and b/examples/health-with-shield/assets/audio/Healing.wav differ diff --git a/examples/health-with-shield/assets/audio/HitRock.wav b/examples/health-with-shield/assets/audio/HitRock.wav new file mode 100644 index 000000000..0ef08c23b Binary files /dev/null and b/examples/health-with-shield/assets/audio/HitRock.wav differ diff --git a/examples/health-with-shield/assets/audio/ShieldDown.wav b/examples/health-with-shield/assets/audio/ShieldDown.wav new file mode 100644 index 000000000..9c99adb4b Binary files /dev/null and b/examples/health-with-shield/assets/audio/ShieldDown.wav differ diff --git a/examples/health-with-shield/assets/audio/ShieldOnline.wav b/examples/health-with-shield/assets/audio/ShieldOnline.wav new file mode 100644 index 000000000..2cf1d65bb Binary files /dev/null and b/examples/health-with-shield/assets/audio/ShieldOnline.wav differ diff --git a/examples/health-with-shield/assets/images/Big Grey Meteor (3).png b/examples/health-with-shield/assets/images/Big Grey Meteor (3).png new file mode 100644 index 000000000..6e43369c3 Binary files /dev/null and b/examples/health-with-shield/assets/images/Big Grey Meteor (3).png differ diff --git a/examples/health-with-shield/assets/images/BlueplayerShip2-1.png b/examples/health-with-shield/assets/images/BlueplayerShip2-1.png new file mode 100644 index 000000000..7eecba7a6 Binary files /dev/null and b/examples/health-with-shield/assets/images/BlueplayerShip2-1.png differ diff --git a/examples/health-with-shield/assets/images/DarkMagicSmoke.png b/examples/health-with-shield/assets/images/DarkMagicSmoke.png new file mode 100644 index 000000000..8983ee814 Binary files /dev/null and b/examples/health-with-shield/assets/images/DarkMagicSmoke.png differ diff --git a/examples/health-with-shield/assets/images/Explosion3.png b/examples/health-with-shield/assets/images/Explosion3.png new file mode 100644 index 000000000..152e9af51 Binary files /dev/null and b/examples/health-with-shield/assets/images/Explosion3.png differ diff --git a/examples/health-with-shield/assets/images/ExplosionFog-Texture-2.png b/examples/health-with-shield/assets/images/ExplosionFog-Texture-2.png new file mode 100644 index 000000000..f5ca24716 Binary files /dev/null and b/examples/health-with-shield/assets/images/ExplosionFog-Texture-2.png differ diff --git a/examples/health-with-shield/assets/images/ExplosionTexture1.png b/examples/health-with-shield/assets/images/ExplosionTexture1.png new file mode 100644 index 000000000..e6705a76b Binary files /dev/null and b/examples/health-with-shield/assets/images/ExplosionTexture1.png differ diff --git a/examples/health-with-shield/assets/images/Glow.png b/examples/health-with-shield/assets/images/Glow.png new file mode 100644 index 000000000..22998b724 Binary files /dev/null and b/examples/health-with-shield/assets/images/Glow.png differ diff --git a/examples/health-with-shield/assets/images/Grey Button.png b/examples/health-with-shield/assets/images/Grey Button.png new file mode 100644 index 000000000..418973ac5 Binary files /dev/null and b/examples/health-with-shield/assets/images/Grey Button.png differ diff --git a/examples/health-with-shield/assets/images/Health_Panel-1.png b/examples/health-with-shield/assets/images/Health_Panel-1.png new file mode 100644 index 000000000..3c07bf9fc Binary files /dev/null and b/examples/health-with-shield/assets/images/Health_Panel-1.png differ diff --git a/examples/health-with-shield/assets/images/Medium Grey Meteor (1).png b/examples/health-with-shield/assets/images/Medium Grey Meteor (1).png new file mode 100644 index 000000000..92cd6b29b Binary files /dev/null and b/examples/health-with-shield/assets/images/Medium Grey Meteor (1).png differ diff --git a/examples/health-with-shield/assets/images/Moon-1.png b/examples/health-with-shield/assets/images/Moon-1.png new file mode 100644 index 000000000..ba0137e2c Binary files /dev/null and b/examples/health-with-shield/assets/images/Moon-1.png differ diff --git a/examples/health-with-shield/assets/images/Normal Potion Green_No Shadow.png b/examples/health-with-shield/assets/images/Normal Potion Green_No Shadow.png new file mode 100644 index 000000000..2b518da4e Binary files /dev/null and b/examples/health-with-shield/assets/images/Normal Potion Green_No Shadow.png differ diff --git a/examples/health-with-shield/assets/images/Normal Potion Green_Shadow.png b/examples/health-with-shield/assets/images/Normal Potion Green_Shadow.png new file mode 100644 index 000000000..e1beafa57 Binary files /dev/null and b/examples/health-with-shield/assets/images/Normal Potion Green_Shadow.png differ diff --git a/examples/health-with-shield/assets/images/Silver shield.png b/examples/health-with-shield/assets/images/Silver shield.png new file mode 100644 index 000000000..8db2cb927 Binary files /dev/null and b/examples/health-with-shield/assets/images/Silver shield.png differ diff --git a/examples/health-with-shield/assets/images/TopPanel-1.png b/examples/health-with-shield/assets/images/TopPanel-1.png new file mode 100644 index 000000000..8acda4d4b Binary files /dev/null and b/examples/health-with-shield/assets/images/TopPanel-1.png differ diff --git a/examples/health-with-shield/assets/images/Upgraded Potion Blue_No Shadow.png b/examples/health-with-shield/assets/images/Upgraded Potion Blue_No Shadow.png new file mode 100644 index 000000000..8114b7fde Binary files /dev/null and b/examples/health-with-shield/assets/images/Upgraded Potion Blue_No Shadow.png differ diff --git a/examples/health-with-shield/assets/images/Upgraded Potion Blue_Shadow.png b/examples/health-with-shield/assets/images/Upgraded Potion Blue_Shadow.png new file mode 100644 index 000000000..9fc0758f0 Binary files /dev/null and b/examples/health-with-shield/assets/images/Upgraded Potion Blue_Shadow.png differ diff --git a/examples/health-with-shield/assets/images/tiled_Purple background.png b/examples/health-with-shield/assets/images/tiled_Purple background.png new file mode 100644 index 000000000..aa3e4aaed Binary files /dev/null and b/examples/health-with-shield/assets/images/tiled_Purple background.png differ diff --git a/examples/health-with-shield/assets/images/tiled_black space.png b/examples/health-with-shield/assets/images/tiled_black space.png new file mode 100644 index 000000000..d6a07754a Binary files /dev/null and b/examples/health-with-shield/assets/images/tiled_black space.png differ diff --git a/examples/health-with-shield/health-with-shield.json b/examples/health-with-shield/health-with-shield.json new file mode 100644 index 000000000..3607d1d7e --- /dev/null +++ b/examples/health-with-shield/health-with-shield.json @@ -0,0 +1,29029 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.victrisgames.extensionhealth", + "pixelsRounding": false, + "projectUuid": "de16ecb3-6ff2-49eb-8453-5ef42e2f1640", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Extension: Health (with shield)", + "description": "Demonstrate the Health extension including a shield, armor, regeneration, healing, and applying damage.", + "author": "Victris Games", + "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": "Preview.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": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "categories": [], + "playableDevices": [ + "keyboard", + "mobile" + ], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/images/tiled_Purple background.png", + "kind": "image", + "metadata": "", + "name": "tiled_Purple background.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Abstract Platformer Pack (370 assets)/PNG/Backgrounds/tiled_Purple background.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Big Grey Meteor (3).png", + "kind": "image", + "metadata": "", + "name": "Big Grey Meteor (3).png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Space Shooter/PNG/Meteors/Big Grey Meteor (3).png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Medium Grey Meteor (1).png", + "kind": "image", + "metadata": "", + "name": "Medium Grey Meteor (1).png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Space Shooter/PNG/Meteors/Medium Grey Meteor (1).png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/BlueplayerShip2-1.png", + "kind": "image", + "metadata": "", + "name": "assets\\BlueplayerShip2-1.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/images/Health_Panel-1.png", + "kind": "image", + "metadata": "", + "name": "Health_Panel-1.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/images/Silver shield.png", + "kind": "image", + "metadata": "", + "name": "Silver shield.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Space Shooter/PNG/Power-ups/Silver shield.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Upgraded Potion Blue_No Shadow.png", + "kind": "image", + "metadata": "", + "name": "Upgraded Potion Blue_No Shadow.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/32x32 Fantasy Icons Pack v2/Icons/Healing Items/Upgraded Potion Blue_No Shadow.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Upgraded Potion Blue_Shadow.png", + "kind": "image", + "metadata": "", + "name": "Upgraded Potion Blue_Shadow.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/32x32 Fantasy Icons Pack v2/Icons/Healing Items/Upgraded Potion Blue_Shadow.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Moon-1.png", + "kind": "image", + "metadata": "", + "name": "assets\\Moon-1.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/images/TopPanel-1.png", + "kind": "image", + "metadata": "", + "name": "TopPanel-1.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/images/Normal Potion Green_No Shadow.png", + "kind": "image", + "metadata": "", + "name": "Normal Potion Green_No Shadow.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/32x32 Fantasy Icons Pack v2/Icons/Healing Items/Normal Potion Green_No Shadow.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Normal Potion Green_Shadow.png", + "kind": "image", + "metadata": "", + "name": "Normal Potion Green_Shadow.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/32x32 Fantasy Icons Pack v2/Icons/Healing Items/Normal Potion Green_Shadow.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/tiled_black space.png", + "kind": "image", + "metadata": "", + "name": "tiled_black space.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Space Shooter/Backgrounds/tiled_black space.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Grey Button.png", + "kind": "image", + "metadata": "", + "name": "Grey Button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Rolling Ball Pack/Interface/Grey Button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/ExplosionTexture1.png", + "kind": "image", + "metadata": "", + "name": "ExplosionTexture1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Particles/ExplosionTexture1.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/ExplosionFog-Texture-2.png", + "kind": "image", + "metadata": "", + "name": "ExplosionFog-Texture-2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Particles/ExplosionFog-Texture-2.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Explosion3.png", + "kind": "image", + "metadata": "", + "name": "Explosion3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Particles/PixiJS/Explosion3.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/DarkMagicSmoke.png", + "kind": "image", + "metadata": "", + "name": "DarkMagicSmoke.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Particles/DarkMagicSmoke.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/images/Glow.png", + "kind": "image", + "metadata": "", + "name": "Glow.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Particles/Glow.png", + "name": "gdevelop-asset-store" + } + }, + { + "file": "assets/audio/HitRock.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Explosion 9\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.12788258224508242,\\\"sustainPunch\\\":100,\\\"decay\\\":0.378384475872245,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":10000,\\\"frequencySweep\\\":-2100,\\\"frequencyDeltaSweep\\\":-2700,\\\"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\\\":2,\\\"flangerOffsetSweep\\\":-6,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":200}\",\"name\":\"HitRock\"}}", + "name": "HitRock.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/audio/ShieldOnline.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Powerup 41\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.36007630449412065,\\\"sustainPunch\\\":50,\\\"decay\\\":0.28924328712533254,\\\"tremoloDepth\\\":100,\\\"tremoloFrequency\\\":29.04870358649401,\\\"frequency\\\":915.8699079110495,\\\"frequencySweep\\\":2901.178770606689,\\\"frequencyDeltaSweep\\\":200,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"sine\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":760,\\\"vibratoFrequency\\\":99,\\\"squareDuty\\\":40,\\\"squareDutySweep\\\":70,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"ShieldOnline\"}}", + "name": "ShieldOnline.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/audio/ShieldDown.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Powerup 49\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.28924328712533254,\\\"sustainPunch\\\":0,\\\"decay\\\":0.1,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":1300,\\\"frequencySweep\\\":-733.0113135216982,\\\"frequencyDeltaSweep\\\":-45.95263172392002,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":0,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":0,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"triangle\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":949.6984336876809,\\\"vibratoFrequency\\\":490,\\\"squareDuty\\\":30,\\\"squareDutySweep\\\":-60,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"ShieldDown\"}}", + "name": "ShieldDown.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/audio/Healing.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Powerup 45\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.28924328712533254,\\\"sustainPunch\\\":0,\\\"decay\\\":0.17404619835517798,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":600,\\\"frequencySweep\\\":422.53976474187914,\\\"frequencyDeltaSweep\\\":1900,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":4,\\\"harmonicsFalloff\\\":0,\\\"waveform\\\":\\\"sine\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":60,\\\"squareDutySweep\\\":35,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":153.0160825206518,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"Healing\"}}", + "name": "Healing.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false + }, + { + "file": "assets/audio/Fight.aac", + "kind": "audio", + "metadata": "", + "name": "Fight.aac", + "preloadAsMusic": true, + "preloadAsSound": false, + "preloadInCache": false, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "Preview.png", + "kind": "image", + "metadata": "", + "name": "Preview.png", + "smoothed": true, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 0, + "disableInputWhenNotFocused": true, + "mangledName": "Extension_58_32Health", + "name": "Extension: Health", + "r": 0, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 0, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 16, + "gridHeight": 16, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.2, + "snap": true, + "zoomFactor": 0.4666666697502133, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "Panels", + "objects": [ + { + "name": "TopPanel" + }, + { + "name": "Shield_Panel" + }, + { + "name": "Health_Panel" + } + ] + }, + { + "name": "HUD", + "objects": [ + { + "name": "ShieldPoints_Text" + }, + { + "name": "Health_Text" + }, + { + "name": "DamageCooldownTitle_Text" + }, + { + "name": "ShieldTimeLeftTitle_Text" + }, + { + "name": "MaxHealth_Text" + }, + { + "name": "MaxShield_Text" + } + ] + } + ], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 42, + "layer": "UI", + "name": "Health_Text", + "persistentUuid": "2baf1dd0-a9b1-40b7-92b3-db07c8cbd8db", + "width": 495, + "x": 688, + "y": 943, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldPoints_Text", + "persistentUuid": "6a1a6823-f5f4-444d-9ba8-e403c9c71d0d", + "width": 0, + "x": 688, + "y": 847, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 34, + "layer": "UI", + "name": "MaxHealth_Text", + "persistentUuid": "93a23df5-c871-4951-8725-80507cb39883", + "width": 64, + "x": 272, + "y": 112, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldRegenRate_Text", + "persistentUuid": "27902d85-e7d1-4621-9b3b-b974da244e0e", + "width": 0, + "x": 1616, + "y": 368, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthRegenRate_Text", + "persistentUuid": "9a5b2e6a-4ae3-425d-a81a-d2a87710a225", + "width": 0, + "x": 48, + "y": 384, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthRegenRate_Slider", + "persistentUuid": "f6fe8023-5327-4d10-9668-d360693edafc", + "width": 0, + "x": 64, + "y": 428, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldRegenRate_Slider", + "persistentUuid": "7e81ed03-b489-4eb3-8bd0-378d6958bbe8", + "width": 0, + "x": 1635, + "y": 416, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MaxShieldPoints_Slider", + "persistentUuid": "29600e6d-a220-4fa9-9d92-1f0b22576a2c", + "width": 0, + "x": 1632, + "y": 156, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MaxShieldPoints_Text", + "persistentUuid": "1bc02f4e-468b-412c-b084-3342c7286fe5", + "width": 0, + "x": 1616, + "y": 112, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MaxHealthPoints_Text", + "persistentUuid": "42ad5367-23f2-4ac6-ac44-ea9d2a39d558", + "width": 0, + "x": 46, + "y": 112, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MaxHealthPoints_Slider", + "persistentUuid": "36ef4b73-8329-43c8-8120-a71c59564ca6", + "width": 0, + "x": 62, + "y": 156, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 1088, + "layer": "UI", + "locked": true, + "name": "Shield_Panel", + "persistentUuid": "ba8a6e80-d132-49f1-9375-81a30c185442", + "sealed": true, + "width": 352, + "x": 1568, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 1088, + "layer": "UI", + "locked": true, + "name": "Health_Panel", + "persistentUuid": "a5c55205-6dac-4f70-8d67-45bf5dfb2bae", + "sealed": true, + "width": 400, + "x": 0, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthBar_Slider", + "persistentUuid": "9142d346-33b6-4e34-9a1a-62d4c84e06fe", + "width": 0, + "x": 656, + "y": 959, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldBar_Slider", + "persistentUuid": "359a76c2-ab46-468d-9086-dd5bdf7f322e", + "width": 0, + "x": 656, + "y": 863, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthTitle_Text", + "persistentUuid": "9309c102-6374-4c8c-8e38-331955ad633b", + "width": 0, + "x": 128, + "y": 32, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldTitle_Text", + "persistentUuid": "8599a07b-37fd-49d5-be2b-99853a3f2cb0", + "width": 0, + "x": 1696, + "y": 32, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldTimer_Clock", + "persistentUuid": "22040b1c-54f2-4b59-b489-7ad8b1edef9f", + "width": 0, + "x": 592, + "y": 864, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "DamageCooldown_Clock", + "persistentUuid": "d1f3b3cd-b340-48ae-82c8-750c75e9525e", + "width": 0, + "x": 592, + "y": 959, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "SmallDamage_Text", + "persistentUuid": "00fd4d4f-3d9d-4849-9852-39c683f98dac", + "width": 0, + "x": 457, + "y": 14, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealAmount_Text", + "persistentUuid": "d6fb64ab-aa58-432e-b2f9-6b145c9ff4be", + "width": 0, + "x": 752, + "y": 14, + "zOrder": 32, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ActivateShieldText", + "persistentUuid": "497d6078-240b-42c6-93ba-a937da27dfaf", + "width": 0, + "x": 1068, + "y": 16, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "BigDamage_Text", + "persistentUuid": "9ea00ed4-fa29-4163-b650-ae78b2727767", + "width": 0, + "x": 1336, + "y": 16, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "BlockExcessDamage_Text", + "persistentUuid": "2a31bb06-3010-4c20-ad9e-c207a1b71fa2", + "width": 0, + "x": 1664, + "y": 640, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "BlockExcessDamage_Checkbox", + "persistentUuid": "13538b18-5f1c-46b6-9047-0966b6d7e705", + "width": 0, + "x": 1616, + "y": 656, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "DamageCooldownDuration_Text", + "persistentUuid": "979788f7-2994-4abb-b83d-8248a88bcd75", + "width": 0, + "x": 48, + "y": 224, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldDuration_Text", + "persistentUuid": "a116bf4d-a28d-4938-950f-5a94f8dabf19", + "width": 0, + "x": 1616, + "y": 240, + "zOrder": 38, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldDuration_Slider", + "persistentUuid": "f00439dd-ad3b-4898-bf31-d8138477503b", + "width": 0, + "x": 1632, + "y": 288, + "zOrder": 39, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "DamageCooldownDuration_Slider", + "persistentUuid": "326b9426-0c19-4b94-a554-8911144c41c6", + "width": 0, + "x": 64, + "y": 304, + "zOrder": 40, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "MaxShield_Text", + "persistentUuid": "bdb6ec43-8182-4263-b216-d390f0b755ac", + "width": 0, + "x": 1840, + "y": 112, + "zOrder": 41, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldTimeLeftTitle_Text", + "persistentUuid": "9c23760e-a535-4bac-9ff4-88c194b067ec", + "width": 0, + "x": 544, + "y": 768, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "DamageCooldownTitle_Text", + "persistentUuid": "6ac09165-fadb-4973-8d59-47b7ed6b956d", + "width": 0, + "x": 544, + "y": 1009, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "SmallDamage_Slider", + "persistentUuid": "77938149-485f-4aac-8d7f-6693be3cce94", + "width": 0, + "x": 448, + "y": 64, + "zOrder": 45, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "BigDamage_Slider", + "persistentUuid": "7c90b8fe-f33d-4161-b838-5db70f38a066", + "width": 0, + "x": 1344, + "y": 64, + "zOrder": 46, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Healing_Slider", + "persistentUuid": "0840724b-b665-44e8-a9fe-1bdf043b16e5", + "width": 0, + "x": 752, + "y": 64, + "zOrder": 47, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 96, + "layer": "UI", + "locked": true, + "name": "TopPanel", + "persistentUuid": "8d0ea100-ec83-4501-930d-9c26f1d0f776", + "sealed": true, + "width": 1200, + "x": 384, + "y": 0, + "zOrder": -1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "GreyButton", + "persistentUuid": "e665596c-5d02-4e66-9a66-bcfe64fe7a39", + "width": 0, + "x": 880, + "y": 502, + "zOrder": 49, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 46, + "layer": "UI", + "name": "Respawn_Text", + "persistentUuid": "c059676c-3e7a-4dc5-8e80-516a68bba757", + "width": 224, + "x": 897, + "y": 523, + "zOrder": 50, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldRegenDelay_Slider", + "persistentUuid": "2cd1c23c-ddc1-4770-8cdd-c75941feb137", + "width": 0, + "x": 1635, + "y": 560, + "zOrder": 52, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthRegenDelay_Slider", + "persistentUuid": "1f1db2b3-78ca-4640-96a4-dd5734232395", + "width": 0, + "x": 64, + "y": 560, + "zOrder": 53, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ShieldRegenDelay_Text", + "persistentUuid": "accb340a-9690-4891-9f3e-be87acd3cb6e", + "width": 0, + "x": 1616, + "y": 512, + "zOrder": 54, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthRegenDelay_Text", + "persistentUuid": "fde8a543-d7d4-489e-83eb-6165ca758de1", + "width": 0, + "x": 48, + "y": 512, + "zOrder": 55, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 90, + "customSize": false, + "height": 0, + "layer": "", + "locked": true, + "name": "Floaties", + "persistentUuid": "77f816da-42cd-414a-9e86-b46a716a19f8", + "sealed": true, + "width": 0, + "x": 1024, + "y": 160, + "zOrder": -50, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 992, + "layer": "", + "locked": true, + "name": "BlackSpace", + "persistentUuid": "6d81c40e-0315-468a-b63e-60b66c31baed", + "sealed": true, + "width": 1200, + "x": 384, + "y": 96, + "zOrder": -100, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "HealthRegenDelay_Clock", + "persistentUuid": "353f4627-9878-4b41-a02e-a710bedd86db", + "width": 0, + "x": 1344, + "y": 960, + "zOrder": 61, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "ShieldRegenDelay_Clock", + "persistentUuid": "9e9a9a39-1c95-4ffe-a48b-bcd01e989d45", + "width": 0, + "x": 1344, + "y": 864, + "zOrder": 62, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "ShieldRegenDelayTitle_Text", + "persistentUuid": "94356843-b0d7-4bd3-9824-f5a64fa0432f", + "width": 0, + "x": 1296, + "y": 768, + "zOrder": 64, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "HealthRegenDelayTitle_Text", + "persistentUuid": "e4d364db-eeb8-4734-aa72-20995eba0d31", + "width": 0, + "x": 1296, + "y": 1008, + "zOrder": 65, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "EnableOverHealing_Checkbox", + "persistentUuid": "97fa1266-13b0-4f84-bba9-441c5eca64c3", + "width": 0, + "x": 48, + "y": 624, + "zOrder": 68, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "AllowOverHealing_Text", + "persistentUuid": "17356f40-e5a4-4971-98af-2305037ed80a", + "width": 0, + "x": 96, + "y": 624, + "zOrder": 69, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthChanceToDodge_Text", + "persistentUuid": "284a016a-d0a4-4d53-ae04-49c77451e40f", + "width": 0, + "x": 48, + "y": 720, + "zOrder": 70, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "HealthChanceToDodge_Slider", + "persistentUuid": "9081c3a1-7da1-4cc3-a48b-ce810cac8ed2", + "width": 0, + "x": 64, + "y": 768, + "zOrder": 71, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ArmorFlatDamage_Text", + "persistentUuid": "8c2e506a-505e-452d-a6ff-03851a33545f", + "width": 0, + "x": 32, + "y": 836, + "zOrder": 72, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ArmorPercentDamage_Text", + "persistentUuid": "c931ebe2-9771-4a9f-8581-0e8344832695", + "width": 0, + "x": 16, + "y": 932, + "zOrder": 73, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ArmorFlatDamage_Slider", + "persistentUuid": "05f74f90-d54a-49f2-95d9-440a008c43c4", + "width": 0, + "x": 64, + "y": 880, + "zOrder": 74, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "ArmorPercentDamage_Slider", + "persistentUuid": "5860747f-302d-4b13-b84e-a7793190de0e", + "width": 0, + "x": 64, + "y": 976, + "zOrder": 75, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "e1fdbf90c8ff634b5d0c805cda0a168a64851891b3e9dcbddfd95f46efeb152b", + "name": "Ship", + "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": 1000, + "DamageCooldown": 0, + "MaxHealth": 1000, + "IsJustDamaged": false, + "CooldownActive": false, + "ShieldDuration": 5, + "ShieldPoints": 100, + "ShieldRegenRate": 0, + "HealthRegenRate": 0, + "HealthRegenDelay": 0, + "MaxShieldPoints": 100, + "ArmorPercentDamageReduction": 0.5 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "BlueplayerShip2", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\BlueplayerShip2-1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 31.99992561340332, + "y": 0 + }, + { + "x": 74.92445373535156, + "y": 56.187965393066406 + }, + { + "x": 31.174453735351562, + "y": 111 + }, + { + "x": 1.1823161840438843, + "y": 93.88450622558594 + }, + { + "x": 1.1823161840438843, + "y": 17.11564064025879 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "c2ce913ddbcd055c4e49a1c01b63aff1a3d59e4e1c1845db4c38aedda3712d3a", + "name": "Shield", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Glow", + "name": "Effect", + "doubleParameters": { + "distance": 15, + "innerStrength": 1, + "outerStrength": 2 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ], + "animations": [ + { + "name": "Moon", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Moon-1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "794ab341df538c9b3bdad418dfdcccc7be5d90f3d0b5929d6d528a542c6ed3ae", + "name": "Shield_Pickup", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 256 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Silver shield.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 14.796825408935547, + "y": 15.512234687805176 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "9b6b5f3290059fad407269a8e44d50f2d02230982c7440926a27e5f37c6396ea", + "name": "BigGreyMeteor3", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Big Grey Meteor (3).png", + "points": [], + "originPoint": { + "name": "origine", + "x": 44.5, + "y": 41.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 34.10023498535156, + "y": 1.0308077335357666 + }, + { + "x": 75.70401000976562, + "y": 13.214770317077637 + }, + { + "x": 89, + "y": 41.14873123168945 + }, + { + "x": 65.60023498535156, + "y": 82 + }, + { + "x": 16.27004623413086, + "y": 75.62042999267578 + }, + { + "x": 1.708726406097412, + "y": 55.11571502685547 + }, + { + "x": 1.114386796951294, + "y": 21.23835563659668 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "dd97de4214e64f4473be203b71ec4df5cd94db3560c9d59517ffb12aee6e316d", + "name": "MediumGreyMeteor1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 64 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Medium Grey Meteor (1).png", + "points": [], + "originPoint": { + "name": "origine", + "x": 21.0509033203125, + "y": 21.163326263427734 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 12.057193756103516, + "y": 1.1523191928863525 + }, + { + "x": 39.26316833496094, + "y": 2.501375675201416 + }, + { + "x": 43, + "y": 29.482507705688477 + }, + { + "x": 21.950275421142578, + "y": 43 + }, + { + "x": 5.986438751220703, + "y": 36.452632904052734 + }, + { + "x": 0, + "y": 17.11615562438965 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "a1e62f5a19d1fe476e2ad0b8977768d020cc1dc55423427f79a486664cebb631", + "name": "Healing", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 256 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "Shadow", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Upgraded Potion Blue_Shadow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 16.00058937072754, + "y": 15.481721878051758 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "No Shadow", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Upgraded Potion Blue_No Shadow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 16.00058937072754, + "y": 15.481721878051758 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "7f1e458664c45af37063bbf13caf318e5637ce1ead9bb104ba41caff5af091ae", + "name": "Poison", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "No Shadow", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Normal Potion Green_No Shadow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Shadow", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Normal Potion Green_Shadow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "additive": true, + "assetStoreId": "ee9e34df96c454414c9236df0d3a721e60b9a34cca8f123ecbefcd58a6671833", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 600, + "emitterForceMin": 200, + "flow": 300, + "maxParticleNb": 300, + "name": "BasicFlame", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 40, + "particleBlue2": 0, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 122, + "particleGreen2": 0, + "particleLifeTimeMax": 0.20000001788139343, + "particleLifeTimeMin": 0.10000000149011612, + "particleRed1": 255, + "particleRed2": 255, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 15, + "rendererParam2": 1, + "rendererType": "Point", + "tags": "", + "tank": -1, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 1, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Health_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Health: 000 / 999", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "MaxHealth_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "0000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "MaxShield_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "0000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "SmallDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "+5 damage", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BigDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "+75 damage", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HealAmount_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "+100 healing", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ActivateShieldText", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Activate \n Shield", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "CooldownRemaining_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "0.00", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BlockExcessDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Block excess damage\nwhen shield breaks?", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "AllowOverHealing_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Allow over-healing?", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "MaxShieldPoints_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Max Shield Points:", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "DamageCooldownDuration_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Damage Cooldown \nDuration: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ShieldDuration_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Shield Duration: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "MaxHealthPoints_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Max Health Points:", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ShieldRegenRate_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Shield Regen Rate: 00", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ShieldRegenDelay_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Shield Regen Delay: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HealthRegenDelay_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Health Regen Delay: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HealthChanceToDodge_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Chance to dodge: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ArmorFlatDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Flat Damage Reduction: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ArmorPercentDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Percent Damage Reduction: 000", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HealthRegenRate_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Health Regen Rate: 00", + "font": "", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ShieldTimeLeft_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "1.23", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": true, + "name": "Damage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "123", + "font": "", + "characterSize": 30, + "color": { + "b": 28, + "g": 231, + "r": 248 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": true, + "name": "ShieldDamage_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "123", + "font": "", + "characterSize": 30, + "color": { + "b": 254, + "g": 19, + "r": 144 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Heal_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "+123", + "font": "", + "characterSize": 30, + "color": { + "b": 0, + "g": 255, + "r": 54 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "ShieldTimeLeftTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": " Shield \nDuration", + "font": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "ShieldRegenDelayTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": " Shield \nRegen Delay", + "font": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "HealthRegenDelayTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": " Health \nRegen Delay", + "font": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "DamageCooldownTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": " Damage\nCooldown", + "font": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Instructions", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Mouse scroll wheel: Increase or decrease the max health of ship\n\nDown key: Damage ship (40 points)\nUp arrow key: Heal ship (1 point)\n\nClick on ship: Activate (or renew) shield (based on Max Shield Points)\n\nPage Up/Down: Increase or decrease shield", + "font": "", + "characterSize": 20, + "color": { + "b": 226, + "g": 144, + "r": 74 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ShieldPoints_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Shield: 000 / 999", + "font": "", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "name": "BlockExcessDamage_Checkbox", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Checkbox", + "type": "Checkbox::Checkbox", + "Checked": false, + "HaloRadiusHover": 0, + "HaloOpacityHover": 64, + "HaloOpacityClick": 128, + "Enabled": true, + "IsBeingPressed": false, + "NeedRedraw": true, + "IsHovered": false, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.3, + "TargetHaloRadius": 0, + "ToggleChanged": false, + "PrimaryColor": " 24;119;211", + "SecondaryColor": "255;255;255", + "SideLength": 24, + "LineWidth": 5, + "BorderThickness": 2, + "HaloRadiusPressed": 0 + } + ], + "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": "", + "name": "EnableOverHealing_Checkbox", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Checkbox", + "type": "Checkbox::Checkbox", + "Checked": false, + "HaloRadiusHover": 0, + "HaloOpacityHover": 64, + "HaloOpacityClick": 128, + "Enabled": true, + "IsBeingPressed": false, + "NeedRedraw": true, + "IsHovered": false, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.3, + "TargetHaloRadius": 0, + "ToggleChanged": false, + "PrimaryColor": " 24;119;211", + "SecondaryColor": "255;255;255", + "SideLength": 24, + "LineWidth": 5, + "BorderThickness": 2, + "HaloRadiusPressed": 0 + } + ], + "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": "", + "name": "HealthRegenRate_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 30, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "HealthChanceToDodge_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ArmorFlatDamage_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 50, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ArmorPercentDamage_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ShieldRegenRate_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 30, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ShieldDuration_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 10, + "TickSpacing": 0.5, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ShieldRegenDelay_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 5, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "HealthRegenDelay_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 5, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "DamageCooldownDuration_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 5, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "MaxShieldPoints_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 100, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "MaxHealthPoints_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1000, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "SmallDamage_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 50, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "BigDamage_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 100, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "Healing_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 100, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "HealthBar_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 100, + "TickSpacing": 0, + "ThumbShape": "rectangle", + "ThumbWidth": 1, + "ThumbHeight": 61, + "ThumbColor": " 24;119;211", + "ThumbOpacity": 255, + "TrackLength": 600, + "TrackThickness": 64, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 0, + "HaloOpacityHover": 0, + "HaloOpacityClick": 0, + "RoundedTrack": false, + "Enabled": false, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ShieldBar_Slider", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 100, + "TickSpacing": 0, + "ThumbShape": "rectangle", + "ThumbWidth": 1, + "ThumbHeight": 61, + "ThumbColor": "144;19;254", + "ThumbOpacity": 255, + "TrackLength": 600, + "TrackThickness": 64, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 0, + "HaloOpacityHover": 0, + "HaloOpacityClick": 0, + "RoundedTrack": false, + "Enabled": false, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "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": "", + "name": "ShieldTimer_Clock", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "fillColor": { + "b": 254, + "g": 19, + "r": 144 + }, + "outlineColor": { + "b": 254, + "g": 19, + "r": 144 + }, + "absoluteCoordinates": false, + "clearBetweenFrames": true + }, + { + "assetStoreId": "", + "name": "HealthRegenDelay_Clock", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "fillColor": { + "b": 226, + "g": 144, + "r": 74 + }, + "outlineColor": { + "b": 226, + "g": 144, + "r": 74 + }, + "absoluteCoordinates": false, + "clearBetweenFrames": true + }, + { + "assetStoreId": "", + "name": "ShieldRegenDelay_Clock", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "fillColor": { + "b": 254, + "g": 19, + "r": 144 + }, + "outlineColor": { + "b": 254, + "g": 19, + "r": 144 + }, + "absoluteCoordinates": false, + "clearBetweenFrames": true + }, + { + "assetStoreId": "", + "name": "DamageCooldown_Clock", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "fillColor": { + "b": 226, + "g": 144, + "r": 74 + }, + "outlineColor": { + "b": 226, + "g": 144, + "r": 74 + }, + "absoluteCoordinates": false, + "clearBetweenFrames": true + }, + { + "assetStoreId": "653519df871cb169057a6348a2ee25ced783ccbf0e9925de08cb28460c37d2b5", + "height": 128, + "name": "Shield_Panel", + "tags": "", + "texture": "tiled_Purple background.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "name": "Health_Panel", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Health_Panel", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Health_Panel-1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "HealthTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Health", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Respawn_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 3, + "thickness": 3 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Respawn", + "font": "", + "characterSize": 50, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "ShieldTitle_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Shield", + "font": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "name": "TopPanel", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "TopPanel", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "TopPanel-1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "2d701679df0e067e63e657f3a7de8b0c076c1c0db19e7c6070c186b28a611df2", + "height": 128, + "name": "BlackSpace", + "tags": "", + "texture": "tiled_black space.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "4283cd912472536d81de38a4ca8fa96a297a652c53bab71b9f974f9e7fecc251", + "name": "GreyButton", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 6, + "thickness": 6 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Grey Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 30, + "emitterForceMin": 10, + "flow": 10000, + "maxParticleNb": 300, + "name": "Floaties", + "particleAlpha1": 196, + "particleAlpha2": 196, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 255, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 255, + "particleGreen2": 255, + "particleLifeTimeMax": 130, + "particleLifeTimeMin": 100, + "particleRed1": 255, + "particleRed2": 255, + "particleSize1": 100, + "particleSize2": 100, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 1, + "rendererParam2": 1, + "rendererType": "Point", + "tags": "", + "tank": -1, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 1000, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": true, + "assetStoreId": "0313bde459d2aa5257fbd978abe8ced6c994ae649f95adefa900388b5a7f2e4e", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 220, + "emitterForceMin": 120, + "flow": 100, + "maxParticleNb": 300, + "name": "BasicExplosionEnergySparks", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 167, + "particleBlue2": 119, + "particleGravityX": 0, + "particleGravityY": 80, + "particleGreen1": 40, + "particleGreen2": 0, + "particleLifeTimeMax": 1.5, + "particleLifeTimeMin": 0.5, + "particleRed1": 255, + "particleRed2": 72, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 4, + "rendererParam2": 8, + "rendererType": "Point", + "tags": "", + "tank": 35, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 12, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": true, + "assetStoreId": "0313bde459d2aa5257fbd978abe8ced6c994ae649f95adefa900388b5a7f2e4e", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 100, + "emitterForceMin": 80, + "flow": 100, + "maxParticleNb": 300, + "name": "BasicExplosionSmooth", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 8, + "particleBlue2": 36, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 8, + "particleGreen2": 36, + "particleLifeTimeMax": 1.5, + "particleLifeTimeMin": 0.5, + "particleRed1": 8, + "particleRed2": 36, + "particleSize1": 10, + "particleSize2": 120, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 80, + "rendererParam2": 8, + "rendererType": "Quad", + "tags": "", + "tank": 25, + "textureParticleName": "ExplosionTexture1.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": true, + "assetStoreId": "0313bde459d2aa5257fbd978abe8ced6c994ae649f95adefa900388b5a7f2e4e", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 90, + "emitterForceMin": 50, + "flow": 100, + "maxParticleNb": 300, + "name": "BasicExplosionEnergy", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 194, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 232, + "particleGreen2": 0, + "particleLifeTimeMax": 1.5, + "particleLifeTimeMin": 0.5, + "particleRed1": 40, + "particleRed2": 97, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 120, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 30, + "textureParticleName": "ExplosionFog-Texture-2.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": false, + "assetStoreId": "ceade84d2cc0571dc97ba3ad034dc7b7766670668e8a16c247d32a8a4c0f55ed", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 10, + "emitterForceMin": 10, + "flow": 800, + "maxParticleNb": 100, + "name": "Explosion3", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 155, + "particleBlue2": 12, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 155, + "particleGreen2": 15, + "particleLifeTimeMax": 0.5, + "particleLifeTimeMin": 0.25, + "particleRed1": 155, + "particleRed2": 16, + "particleSize1": 200, + "particleSize2": 120, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 1, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 30, + "textureParticleName": "Explosion3.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 10, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": true, + "assetStoreId": "edb6923baf2b0b51dac8f4ce53b1ec10a09243ca57fb694722d79eb5ed6a62b7", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 80, + "emitterForceMin": 40, + "flow": 100, + "maxParticleNb": 300, + "name": "Magic2", + "particleAlpha1": 128, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 254, + "particleBlue2": 254, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 19, + "particleGreen2": 19, + "particleLifeTimeMax": 0.4000000059604645, + "particleLifeTimeMin": 0.20000000298023224, + "particleRed1": 144, + "particleRed2": 144, + "particleSize1": 0, + "particleSize2": 40, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 1, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 20, + "textureParticleName": "DarkMagicSmoke.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ] + }, + { + "additive": true, + "assetStoreId": "edb6923baf2b0b51dac8f4ce53b1ec10a09243ca57fb694722d79eb5ed6a62b7", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 90, + "emitterForceMin": 50, + "flow": 60, + "maxParticleNb": 300, + "name": "ShieldSparks", + "particleAlpha1": 204, + "particleAlpha2": 204, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 254, + "particleBlue2": 254, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 19, + "particleGreen2": 19, + "particleLifeTimeMax": 1, + "particleLifeTimeMin": 0.5, + "particleRed1": 144, + "particleRed2": 144, + "particleSize1": 20, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 2, + "rendererParam2": 2, + "rendererType": "Quad", + "tags": "", + "tank": -1, + "textureParticleName": "Glow.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 30, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 128 + }, + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ] + }, + { + "additive": true, + "assetStoreId": "edb6923baf2b0b51dac8f4ce53b1ec10a09243ca57fb694722d79eb5ed6a62b7", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 90, + "emitterForceMin": 50, + "flow": 60, + "maxParticleNb": 300, + "name": "HealSparks", + "particleAlpha1": 204, + "particleAlpha2": 204, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 226, + "particleBlue2": 226, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 144, + "particleGreen2": 144, + "particleLifeTimeMax": 1, + "particleLifeTimeMin": 0.5, + "particleRed1": 74, + "particleRed2": 74, + "particleSize1": 20, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 2, + "rendererParam2": 2, + "rendererType": "Quad", + "tags": "", + "tank": -1, + "textureParticleName": "Glow.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 30, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 128 + }, + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ] + }, + { + "additive": true, + "assetStoreId": "edb6923baf2b0b51dac8f4ce53b1ec10a09243ca57fb694722d79eb5ed6a62b7", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 200, + "emitterForceMin": 200, + "flow": 10000, + "maxParticleNb": 300, + "name": "HealCollected", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 226, + "particleBlue2": 226, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 144, + "particleGreen2": 144, + "particleLifeTimeMax": 0.75, + "particleLifeTimeMin": 0.75, + "particleRed1": 74, + "particleRed2": 74, + "particleSize1": 20, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 2, + "rendererParam2": 2, + "rendererType": "Quad", + "tags": "", + "tank": 200, + "textureParticleName": "Glow.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 1, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 128 + }, + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": false + } + ] + } + ], + "events": [ + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "User interface", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Initialize game", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayMusic" + }, + "parameters": [ + "", + "Fight.aac", + "yes", + "50", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "SpawnShip" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "MaxHealthPoints_Slider", + "DraggableSliderControl", + "1000", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "HealthRegenRate_Slider", + "DraggableSliderControl", + "0", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "DamageCooldownDuration_Slider", + "DraggableSliderControl", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "SmallDamage_Slider", + "DraggableSliderControl", + "5", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Healing_Slider", + "DraggableSliderControl", + "100", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "BigDamage_Slider", + "DraggableSliderControl", + "75", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "MaxShieldPoints_Slider", + "DraggableSliderControl", + "100", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "ShieldRegenRate_Slider", + "DraggableSliderControl", + "0", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "ShieldDuration_Slider", + "DraggableSliderControl", + "0", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update text", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Health_Text", + "=", + "\"Health: \" + ToString(ceil(Ship.Health::Health())) + \" / \"+ ToString(Ship.Health::MaxHealth())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "MaxHealth_Text", + "=", + "ToString(Ship.Health::MaxHealth())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CooldownRemaining_Text", + "=", + "ToString(roundTo(Ship.Health::DamageCooldownRemaining(), 1))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "HealthRegenRate_Text", + "=", + "\"Health Regen Rate: \" + ToString(Ship.Health::HealthRegenRate())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "DamageCooldownDuration_Text", + "=", + "\"Damage Cooldown\" + NewLine() +\n\"Duration: \" + ToString(roundTo(Ship.Health::DamageCooldownDuration(),1))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "HealthRegenDelay_Text", + "=", + "\"Health Regen Delay: \" + ToString(roundTo(Ship.Health::HealthRegenDelay(),1))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "HealthChanceToDodge_Text", + "=", + "\"Chance To Dodge: \" + ToString(roundTo(Ship.Health::ChanceToDodge(),2))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ArmorPercentDamage_Text", + "=", + "\"Percent Damage Reduction: \" + ToString(roundTo(Ship.Health::PercentDamageReduction(),2))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ArmorFlatDamage_Text", + "=", + "\"Flat Damage Reduction: \" + ToString(roundTo(Ship.Health::FlatDamageReduction(),2))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "HealAmount_Text", + "=", + "\"+\" + ToString(Healing_Slider.DraggableSliderControl::Value()) + \" healing\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "SmallDamage_Text", + "=", + "\"+\" + ToString(SmallDamage_Slider.DraggableSliderControl::Value()) + \" damage\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "BigDamage_Text", + "=", + "\"+\" + ToString(BigDamage_Slider.DraggableSliderControl::Value()) + \" damage\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "MaxShield_Text", + "=", + "ToString(Ship.Health::MaxShield())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldRegenRate_Text", + "=", + "\"Shield Regen Rate: \" + ToString(Ship.Health::ShieldRegenRate())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldPoints_Text", + "=", + "\"Shield: \" + ToString(ceil(Ship.Health::ShieldPoints())) + \" / \"+ ToString(Ship.Health::MaxShield())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldDuration_Text", + "=", + "\"Shield Duration: \" + ToString(roundTo( Ship.Health::ShieldDuration(),1))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldTimeLeft_Text", + "=", + "ToString(roundTo(Ship.Health::ShieldTimeRemaining(), 1))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldRegenDelay_Text", + "=", + "\"Shield Regen Delay: \" + ToString(roundTo(Ship.Health::ShieldRegenDelay(),1))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CooldownRemaining_Text", + "=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "CooldownRemaining_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CooldownRemaining_Text", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "CooldownRemaining_Text", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldTimeLeft_Text", + "=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "ShieldTimeLeft_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldTimeLeft_Text", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "ShieldTimeLeft_Text", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Respawn button", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "GreyButton", + "\"144;19;254\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "GreyButton" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "GreyButton", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "GreyButton", + "\"Effect\"", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "GreyButton", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.5" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "SpawnShip" + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisSurObjet" + }, + "parameters": [ + "GreyButton", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "GreyButton", + "\"Effect\"", + "no" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship movement", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "MouseX(\"\",0)", + "<", + "Ship.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "BlackSpace", + "", + "", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Ship" + ] + }, + { + "type": { + "value": "RotateTowardAngle" + }, + "parameters": [ + "Ship", + "270 - 30", + "300", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Ship", + "180", + "30", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AngleOfDisplacement" + }, + "parameters": [ + "Ship", + "0", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "Ship" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "MouseX(\"\",0)", + ">", + "Ship.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "BlackSpace", + "", + "", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Ship" + ] + }, + { + "type": { + "value": "RotateTowardAngle" + }, + "parameters": [ + "Ship", + "270 + 30", + "300", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Ship", + "0", + "30", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AngleOfDisplacement" + }, + "parameters": [ + "Ship", + "180", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "Ship" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "inverted": true, + "value": "MouseButtonPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "RotateTowardAngle" + }, + "parameters": [ + "Ship", + "270", + "300", + "" + ] + }, + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "Ship" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BoundingBoxLeft" + }, + "parameters": [ + "Ship", + "<", + "Health_Panel.BoundingBoxRight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "Ship" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Ship", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BoundingBoxRight" + }, + "parameters": [ + "Ship", + ">", + "Shield_Panel.BoundingBoxLeft()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "Ship" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Ship", + "-", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Ship" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "BasicFlame", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Visible" + }, + "parameters": [ + "Ship" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "BasicFlame" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Spawn items", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "\"SpawnBigRocks\"", + "2", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BigGreyMeteor3", + "BigDamage_Text.CenterX()", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "BigGreyMeteor3", + "90", + "200", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "\"SpawnSmallRocks\"", + "0.5", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "MediumGreyMeteor1", + "SmallDamage_Text.CenterX()", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "MediumGreyMeteor1", + "90", + "400", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "BigGreyMeteor3", + "10", + "" + ] + }, + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "MediumGreyMeteor1", + "-10", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "\"SpawnShield\"", + "3", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Shield_Pickup", + "ActivateShieldText.CenterX()", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Shield_Pickup", + "90", + "200", + "1" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Shield_Pickup", + "\"144;19;254\"" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Shield_Pickup", + "=", + "2" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "ShieldSparks", + "Shield_Pickup.CenterX()", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "ShieldSparks", + "Sticker", + "Shield_Pickup", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "\"SpawnHeal\"", + "6", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Healing", + "HealAmount_Text.CenterX()", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Healing", + "90", + "150", + "1" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Healing", + "=", + "2" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Healing", + "ShakeObject_PositionAngleScale", + "", + "0", + "0", + "30", + "0", + "1", + "yes", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "HealSparks", + "Healing.CenterX()", + "Healing.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "HealSparks", + "Sticker", + "Healing", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + }, + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Health", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Damage cooldown", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Flash::Flash::Flash" + }, + "parameters": [ + "Ship", + "Flash", + "Ship.Health::DamageCooldownDuration()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw damage cooldown", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::DamageCooldownDuration()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "DamageCooldownTitle_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::DamageCooldownDuration()", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "DamageCooldownTitle_Text", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "DamageCooldown_Clock", + "0", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::PathArc" + }, + "parameters": [ + "DamageCooldown_Clock", + "0", + "0", + "32", + "0", + "360 * (Ship.Health::DamageCooldownRemaining() / Ship.Health::DamageCooldownDuration())", + "" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::closePath" + }, + "parameters": [ + "DamageCooldown_Clock" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Allow over-healing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "EnableOverHealing_Checkbox", + "Checkbox", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::AllowOverHealing" + }, + "parameters": [ + "Ship", + "Health", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "EnableOverHealing_Checkbox", + "Checkbox", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::AllowOverHealing" + }, + "parameters": [ + "Ship", + "Health", + "no", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw health regen delay", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::HealthRegenDelay()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "HealthRegenDelayTitle_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::HealthRegenDelay()", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "HealthRegenDelayTitle_Text", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "HealthRegenDelay_Clock", + "0", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::PathArc" + }, + "parameters": [ + "HealthRegenDelay_Clock", + "0", + "0", + "32", + "0", + "360 * (Ship.Health::TimeSinceLastHit() / Ship.Health::HealthRegenDelay())", + "" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::closePath" + }, + "parameters": [ + "HealthRegenDelay_Clock" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Health Sliders", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetMaxHealth" + }, + "parameters": [ + "Ship", + "Health", + "MaxHealthPoints_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetCooldownDuration" + }, + "parameters": [ + "Ship", + "Health", + "DamageCooldownDuration_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetHealthRegenRate" + }, + "parameters": [ + "Ship", + "Health", + "HealthRegenRate_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetHealthRegenDelay" + }, + "parameters": [ + "Ship", + "Health", + "HealthRegenDelay_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetChanceToDodge" + }, + "parameters": [ + "Ship", + "Health", + "HealthChanceToDodge_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetFlatDamageReduction" + }, + "parameters": [ + "Ship", + "Health", + "ArmorFlatDamage_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetPercentDamageReduction" + }, + "parameters": [ + "Ship", + "Health", + "ArmorPercentDamage_Slider.DraggableSliderControl::Value()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValueMax" + }, + "parameters": [ + "HealthBar_Slider", + "DraggableSliderControl", + "max(Ship.Health::MaxHealth(),Ship.Health::Health())", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "HealthBar_Slider", + "DraggableSliderControl", + "Ship.Health::Health()", + "" + ] + } + ] + } + ], + "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": "Block excess damage", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "BlockExcessDamage_Checkbox", + "Checkbox", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetShieldBlockExcessDamage" + }, + "parameters": [ + "Ship", + "Health", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "BlockExcessDamage_Checkbox", + "Checkbox", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetShieldBlockExcessDamage" + }, + "parameters": [ + "Ship", + "Health", + "no", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Animation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Shield", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Shield" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw shield duration clock", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::ShieldDuration()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "ShieldTimer_Clock" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "ShieldTimeLeftTitle_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::ShieldDuration()", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "ShieldTimeLeftTitle_Text", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "ShieldTimer_Clock", + "" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "ShieldTimer_Clock", + "0", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::PathArc" + }, + "parameters": [ + "ShieldTimer_Clock", + "0", + "0", + "32", + "0", + "360 * (Ship.Health::ShieldTimeRemaining() / Ship.Health::ShieldDuration())", + "" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::closePath" + }, + "parameters": [ + "ShieldTimer_Clock" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw shield regen delay clock", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::ShieldRegenDelay()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "ShieldRegenDelayTitle_Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::ShieldRegenDelay()", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "ShieldRegenDelayTitle_Text", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "ShieldRegenDelay_Clock", + "0", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::PathArc" + }, + "parameters": [ + "ShieldRegenDelay_Clock", + "0", + "0", + "32", + "0", + "360 * (Ship.Health::TimeSinceLastHit() / Ship.Health::ShieldRegenDelay())", + "" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::closePath" + }, + "parameters": [ + "ShieldRegenDelay_Clock" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shield Sliders", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetMaxShieldPoints" + }, + "parameters": [ + "Ship", + "Health", + "MaxShieldPoints_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetShieldDuration" + }, + "parameters": [ + "Ship", + "Health", + "ShieldDuration_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetShieldRegenRate" + }, + "parameters": [ + "Ship", + "Health", + "ShieldRegenRate_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Health::Health::SetShieldRegenDelay" + }, + "parameters": [ + "Ship", + "Health", + "ShieldRegenDelay_Slider.DraggableSliderControl::Value()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValueMax" + }, + "parameters": [ + "ShieldBar_Slider", + "DraggableSliderControl", + "Ship.Health::MaxShield()", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "ShieldBar_Slider", + "DraggableSliderControl", + "Ship.Health::ShieldPoints()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + }, + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Collisions", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship hits small damage", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Ship", + "MediumGreyMeteor1", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MediumGreyMeteor1", + "" + ] + }, + { + "type": { + "value": "CameraShake::CameraShake" + }, + "parameters": [ + "", + "5", + "5", + "\"\"", + "", + "", + "", + "", + "", + "", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Explosion3", + "MediumGreyMeteor1.CenterX()", + "MediumGreyMeteor1.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HitRock.wav", + "", + "25", + "RandomFloatInRange(1.0,1.5)" + ] + }, + { + "type": { + "value": "Health::Health::Hit" + }, + "parameters": [ + "Ship", + "Health", + "SmallDamage_Slider.DraggableSliderControl::Value()", + "", + "", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Ship", + "ShakeObject_PositionAngleScale", + "", + "0", + "0", + "10", + "", + "", + "", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship hits big damage", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Ship", + "BigGreyMeteor3", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BigGreyMeteor3", + "" + ] + }, + { + "type": { + "value": "CameraShake::CameraShake" + }, + "parameters": [ + "", + "10", + "10", + "\"\"", + "", + "0.5", + "0", + "0", + "0.08", + "", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Explosion3", + "BigGreyMeteor3.CenterX()", + "BigGreyMeteor3.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "HitRock.wav", + "", + "40", + "0.8" + ] + }, + { + "type": { + "value": "Health::Health::Hit" + }, + "parameters": [ + "Ship", + "Health", + "BigDamage_Slider.DraggableSliderControl::Value()", + "", + "", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Ship", + "ShakeObject_PositionAngleScale", + "", + "0", + "0", + "20", + "", + "", + "", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship hits shield", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Ship", + "Shield_Pickup", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ShieldOnline.wav", + "", + "40", + "1" + ] + }, + { + "type": { + "value": "Health::Health::ActivateShield" + }, + "parameters": [ + "Ship", + "Health", + "Ship.Health::MaxShield()", + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Sticker::IsStuck" + }, + "parameters": [ + "", + "ShieldSparks", + "Sticker", + "Shield_Pickup", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "ShieldSparks", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Shield_Pickup", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship collects heal potion", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Ship", + "Healing", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::Heal" + }, + "parameters": [ + "Ship", + "Health", + "Healing_Slider.DraggableSliderControl::Value()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "HealCollected", + "Healing.X()", + "Healing.Y()", + "\"\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Sticker::IsStuck" + }, + "parameters": [ + "", + "HealSparks", + "Sticker", + "Healing", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "HealSparks", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Healing", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsJustHealed" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "Healing.wav", + "", + "50", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Heal_Text", + "Ship.X()", + "Ship.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Heal_Text", + "=", + "\"+\" + ToString(round(Ship.Health::PreviousHealAmount()))" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Heal_Text", + "=", + "Ship.CenterX()" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Heal_Text", + "Tween", + "\"FadeOut\"", + "0", + "\"easeInQuad\"", + "1500", + "yes" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionYTween" + }, + "parameters": [ + "Heal_Text", + "Tween", + "\"SlideUp\"", + "Heal_Text.Y() - 100", + "\"easeOutCirc\"", + "1500", + "no" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Ship logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsDead" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BasicExplosionEnergySparks", + "Ship.CenterX()", + "Ship.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BasicExplosionSmooth", + "Ship.CenterX()", + "Ship.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BasicExplosionEnergy", + "Ship.CenterX()", + "Ship.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Ship", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Shield", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BasicFlame", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "HUD" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Respawn_Text", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GreyButton", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsJustDamaged" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Damage_Text", + "Ship.X()", + "Ship.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Damage_Text", + "=", + "ToString(round(Ship.Health::PreviousDamageTaken()))" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Damage_Text", + "=", + "Ship.CenterX() + 24" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Damage_Text", + "Tween", + "\"FadeOut\"", + "0", + "\"easeInQuad\"", + "1500", + "yes" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionYTween" + }, + "parameters": [ + "Damage_Text", + "Tween", + "\"SlideUp\"", + "Damage_Text.Y() - 100", + "\"easeOutCirc\"", + "1500", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsJustDodged" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Damage_Text", + "Ship.X() - 48", + "Ship.Y() - 64", + "\"\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Damage_Text", + "=", + "\"Dodged!\"" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Damage_Text", + "=", + "Ship.CenterX()" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Damage_Text", + "Tween", + "\"FadeOut\"", + "0", + "\"easeInQuad\"", + "1500", + "yes" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionYTween" + }, + "parameters": [ + "Damage_Text", + "Tween", + "\"SlideUp\"", + "Damage_Text.Y() - 100", + "\"easeOutCirc\"", + "1500", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsShieldJustDamaged" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "ShieldDamage_Text", + "Ship.X()", + "Ship.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ShieldDamage_Text", + "=", + "ToString(round(Ship.Health::PreviousDamageToShield()))" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "ShieldDamage_Text", + "=", + "Ship.CenterX() - 24" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "ShieldDamage_Text", + "Tween", + "\"FadeOut\"", + "0", + "\"easeInQuad\"", + "1500", + "yes" + ] + }, + { + "type": { + "value": "Tween::AddObjectPositionYTween" + }, + "parameters": [ + "ShieldDamage_Text", + "Tween", + "\"SlideUp\"", + "ShieldDamage_Text.Y() - 100", + "\"easeOutCirc\"", + "1500", + "no" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shield destroyed (or expired)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Ship.Health::ShieldDuration()", + ">", + "0" + ] + }, + { + "type": { + "value": "Health::Health::IsShieldJustDamaged" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + } + ] + }, + { + "type": { + "inverted": true, + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Ship", + "Health", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ShieldDown.wav", + "", + "10", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Magic2", + "Ship.CenterX()", + "Ship.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "Magic2", + "Sticker", + "Ship", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 32, + "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": 15926864, + "ambientLightColorG": 6043600, + "ambientLightColorR": 16004880, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "UI", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "Checkbox", + "type": "Checkbox::Checkbox" + }, + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl" + }, + { + "name": "Flash", + "type": "Flash::Flash" + }, + { + "name": "Health", + "type": "Health::Health" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + }, + { + "name": "Sticker", + "type": "Sticker::Sticker" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Extension: Health", + "lastChangeTimeStamp": 0, + "name": "SpawnShip", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create ship", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create ship", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Ship", + "CameraCenterX()", + "640", + "\"\"" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Ship", + "=", + "100" + ] + }, + { + "type": { + "value": "Health::Health::SetCurrentHealth" + }, + "parameters": [ + "Ship", + "Health", + "1000", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create Flame jet", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BasicFlame", + "Ship.X()", + "Ship.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "BasicFlame", + "=", + "Ship.BoundingBoxLeft()", + "=", + "Ship.CenterY()" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "BasicFlame", + "=", + "180" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "BasicFlame", + "=", + "Ship.ZOrder() - 1" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "BasicFlame", + "Sticker", + "Ship", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shield", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Shield", + "Ship.CenterX()", + "Ship.CenterY()", + "\"\"" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Shield", + "=", + "32" + ] + }, + { + "type": { + "value": "ChangeBlendMode" + }, + "parameters": [ + "Shield", + "3" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Shield", + "=", + "Ship.ZOrder() - 1" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Shield", + "\"144;19;254\"" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Shield", + "=", + "Ship.CenterX()", + "=", + "Ship.CenterY()" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "Shield", + "Sticker", + "Ship", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "HUD", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Respawn_Text" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "GreyButton" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "", + "description": "Select one or more methods of shaking:\n- Position: Shake the X and/or Y position of the object \n- Angle: Shake the angle (rotation) of the object \n- Scale: Shake the scale of the object (must be a sprite)\n\nControl how the object shakes:\n- Amplitude: How far the object moves during each shake\n- Duration: Amount of time to shake the object\n- Time between shakes: Amount of time between each movement of the object\n- Keep shaking until stopped (boolean)\n\nTips:\n- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)\n- To make the single-shake move in the opposite direction, use negative numbers \n- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" \n- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)\n- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. \n- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", + "extensionNamespace": "", + "fullName": "Shake Object (position, angle, scale)", + "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "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", + "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", + "group": "", + "name": "ShakeObject_PositionAngle", + "private": false, + "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_. Wait _PARAM6_ seconds between shakes. Keep shaking until stopped: _PARAM7_", + "events": [ + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of shake (in seconds) (Default: 0.5) ", + "longDescription": "", + "name": "Duration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerX", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerY", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "longDescription": "", + "name": "PowerAngle", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "", + "name": "TimeBetweenShakes", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "sentence": "", + "events": [ + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop any shaking of object that was initiated by the Shake Object extension.", + "fullName": "Stop shaking the object", + "functionType": "Action", + "group": "", + "name": "StopShaking", + "private": false, + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "group": "", + "name": "IsShaking", + "private": false, + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [] + }, + { + "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", + "group": "", + "name": "ShakeObject_PositionAngleScale", + "private": false, + "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_, and scale amplitude _PARAM6_. Wait _PARAM7_ seconds between shakes. Keep shaking until stopped: _PARAM8_", + "events": [ + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of shake (in seconds) (Default: 0.5)", + "longDescription": "", + "name": "Duration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerX", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerY", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "longDescription": "", + "name": "PowerAngle", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of scale shake (in percent change) (For example: 5)", + "longDescription": "", + "name": "PowerScale", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "", + "name": "TimeBetweenShakes", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "sentence": "", + "events": [ + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "group": "", + "name": "StopShaking", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "group": "", + "name": "IsShaking", + "private": false, + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "D8H", + "category": "", + "description": "This extension can be useful for:\n* Stick an accessory to a moving object,\n* Animate a skeleton.", + "extensionNamespace": "", + "fullName": "Stick objects to others", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN0aWNrZXItb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik01LjUgMkMzLjYgMiAyIDMuNiAyIDUuNVYxOC41QzIgMjAuNCAzLjYgMjIgNS41IDIySDE2TDIyIDE2VjUuNUMyMiAzLjYgMjAuNCAyIDE4LjUgMkg1LjVNNS44IDRIMTguM0MxOS4zIDQgMjAuMSA0LjggMjAuMSA1LjhWMTVIMTguNkMxNi43IDE1IDE1LjEgMTYuNiAxNS4xIDE4LjVWMjBINS44QzQuOCAyMCA0IDE5LjIgNCAxOC4yVjUuOEM0IDQuOCA0LjggNCA1LjggNCIgLz48L3N2Zz4=", + "name": "Sticker", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sticker-outline.svg", + "shortDescription": "Behavior to stick objects to other objects - so that they follow the position and rotation of the object they are stuck to.", + "version": "0.3.4", + "origin": { + "identifier": "Sticker", + "name": "gdevelop-extension-store" + }, + "tags": [ + "sticker", + "stick", + "follow", + "skeleton", + "joint" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if the object is stuck to another object.", + "fullName": "Is stuck to another object", + "functionType": "Condition", + "group": "", + "name": "IsStuck", + "private": false, + "sentence": "_PARAM1_ is stuck to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const stickerBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\n/** @type {Hashtable} */\nconst stickerObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");\n/** @type {Hashtable} */\nconst basisObjectsLists = eventsFunctionContext.getObjectsLists(\"BasisObject\");\n\neventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(\n (stickerObject, basisObject, stickerBehaviorName) => {\n const behavior = stickerObject.getBehavior(stickerBehaviorName);\n return behavior.basisObject === basisObject;\n },\n stickerObjectsLists,\n basisObjectsLists,\n false,\n stickerBehaviorName\n);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Sticker", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "objectList" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Sticker behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Basis", + "longDescription": "", + "name": "BasisObject", + "optional": false, + "supplementaryInformation": "", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", + "fullName": "Sticker", + "name": "Sticker", + "objectType": "", + "eventsFunctions": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onCreated", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst object = objects[0];\nconst behavior = object.getBehavior(behaviorName);\n\n// Set up the scene sticker objects list - if not done already.\nif (!runtimeScene.__allStickers)\n runtimeScene.__allStickers = new Set();\n\n// Set up the behavior extra methods - if not done already.\nconst prototype = Object.getPrototypeOf(behavior);\nif (!prototype.updateRelativeCoordinates) {\n // Unstick from deleted objects.\n gdjs.registerObjectDeletedFromSceneCallback(function (runtimeScene, deletedObject) {\n if (!runtimeScene.__allStickers) return;\n\n for (const sticker of runtimeScene.__allStickers) {\n if (sticker.basisObject === deletedObject) {\n sticker.basisObject = null;\n }\n }\n });\n\n /**\n * Update the coordinates in the basisObject basis.\n * \n * It uses the basisObject coordinates from the previous frame.\n * This way, the sticker can move relatively to it and still\n * follow basisObject.\n * \n * @param {gdjs.RuntimeObject} basisObject\n */\n prototype.updateRelativeCoordinates = function (basisObject) {\n const object = this.owner;\n\n // Update relative coordinates\n this.relativeX = object.getX() - this.basisOldX;\n this.relativeY = object.getY() - this.basisOldY;\n if (!this._getOnlyFollowPosition()) {\n this.relativeAngle = object.getAngle() - this.basisOldAngle;\n this.relativeWidth = object.getWidth() / this.basisOldWidth;\n this.relativeHeight = object.getHeight() / this.basisOldHeight;\n const deltaX = object.getCenterXInScene() - this.basisOldCenterXInScene;\n const deltaY = object.getCenterYInScene() - this.basisOldCenterYInScene;\n const angle = this.basisOldAngle * Math.PI / 180;\n this.relativeRotatedX = (deltaX * Math.cos(angle) + deltaY * Math.sin(angle)) / this.basisOldWidth;\n this.relativeRotatedY = (-deltaX * Math.sin(angle) + deltaY * Math.cos(angle)) / this.basisOldHeight;\n\n // Save initial values to avoid calculus and rounding errors\n this.basisOriginalWidth = basisObject.getWidth();\n this.basisOriginalHeight = basisObject.getHeight();\n this.basisOriginalAngle = basisObject.getAngle();\n }\n }\n\n /**\n * Copy the coordinates to use it the next frame.\n * @param basisObject {gdjs.RuntimeObject}\n */\n prototype.updateOldCoordinates = function (basisObject) {\n const object = this.owner;\n\n this.ownerOldX = object.getX();\n this.ownerOldY = object.getY();\n\n this.basisOldX = basisObject.getX();\n this.basisOldY = basisObject.getY();\n\n if (!this._getOnlyFollowPosition()) {\n this.ownerOldAngle = object.getAngle();\n this.ownerOldWidth = object.getWidth();\n this.ownerOldHeight = object.getHeight();\n\n this.basisOldAngle = basisObject.getAngle();\n this.basisOldWidth = basisObject.getWidth();\n this.basisOldHeight = basisObject.getHeight();\n this.basisOldCenterXInScene = basisObject.getCenterXInScene();\n this.basisOldCenterYInScene = basisObject.getCenterYInScene();\n }\n }\n /**\n * Follow the basisObject (called in doStepPostEvents).\n * \n * This method is also called by children to ensure\n * parents are updated first.\n */\n prototype.followBasisObject = function () {\n if (this.followingDoneThisFrame) {\n return;\n }\n this.followingDoneThisFrame = true;\n /** @type {gdjs.RuntimeObject} */\n const basisObject = this.basisObject;\n if (basisObject) {\n // If the behavior on the basis object has a different name,\n // the objects will still follow their basis objects\n // but frame delays could happen.\n if (basisObject.hasBehavior(behaviorName)) {\n const basisBehavior = basisObject.getBehavior(behaviorName);\n if (basisBehavior.type === this.type) {\n // Follow parents 1st to avoid frame delays\n basisBehavior.followBasisObject();\n }\n }\n\n const object = this.owner;\n\n if (this._getOnlyFollowPosition()) {\n if (object.getX() !== this.ownerOldX\n || object.getY() !== this.ownerOldY) {\n this.updateRelativeCoordinates(basisObject);\n }\n\n if (this.basisOldX !== basisObject.getX() ||\n this.basisOldY !== basisObject.getY()) {\n object.setPosition(\n basisObject.getX() + this.relativeX,\n basisObject.getY() + this.relativeY);\n }\n } else {\n if (object.getX() !== this.ownerOldX\n || object.getY() !== this.ownerOldY\n || object.getAngle() !== this.ownerOldAngle\n || object.getWidth() !== this.ownerOldWidth\n || object.getHeight() !== this.ownerOldHeight) {\n this.updateRelativeCoordinates(basisObject);\n }\n\n // Follow basisObject\n if (basisObject.getAngle() === this.basisOriginalAngle && this.basisOriginalAngle === 0) {\n if (basisObject.getWidth() === this.basisOriginalWidth ||\n basisObject.getHeight() === this.basisOriginalHeight) {\n if (this.basisOldX !== basisObject.getX() ||\n this.basisOldY !== basisObject.getY()) {\n object.setPosition(\n basisObject.getX() + this.relativeX,\n basisObject.getY() + this.relativeY);\n }\n } else {\n object.setPosition(\n basisObject.getX() + this.relativeRotatedX * basisObject.getWidth(),\n basisObject.getY() + this.relativeRotatedY * basisObject.getHeight());\n }\n } else {\n object.setAngle(basisObject.getAngle() + this.relativeAngle);\n\n const deltaX = this.relativeRotatedX * basisObject.getWidth();\n const deltaY = this.relativeRotatedY * basisObject.getHeight();\n const angle = -basisObject.getAngle() * Math.PI / 180;\n object.setX(basisObject.getCenterXInScene() + object.getX() - object.getCenterXInScene() + deltaX * Math.cos(angle) + deltaY * Math.sin(angle));\n object.setY(basisObject.getCenterYInScene() + object.getY() - object.getCenterYInScene() - deltaX * Math.sin(angle) + deltaY * Math.cos(angle));\n }\n // Unproportional dimensions changes won't work as expected\n // if the object angle is not null but nothing more can be done\n // because there is no full affine transformation on objects.\n if (basisObject.getWidth() !== this.basisOriginalWidth) {\n object.setWidth(this.relativeWidth * basisObject.getWidth());\n }\n if (basisObject.getHeight() !== this.basisOriginalHeight) {\n object.setHeight(this.relativeHeight * basisObject.getHeight());\n }\n }\n\n this.updateOldCoordinates(basisObject);\n }\n }\n}\n\n// Register this object as a sticker.\nruntimeScene.__allStickers.add(behavior);\n", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst object = objects[0];\nconst behavior = object.getBehavior(behaviorName);\n\nbehavior.followingDoneThisFrame = false;", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst object = objects[0];\nconst behavior = object.getBehavior(behaviorName);\n\nbehavior.followBasisObject();", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stick on another object.", + "fullName": "Stick", + "functionType": "Action", + "group": "", + "name": "Stick", + "private": false, + "sentence": "Stick _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const object = objects[0];\nconst behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst basisObjects = eventsFunctionContext.getObjects(\"BasisObject\");\n\nif (basisObjects.length === 0) return;\nconst basisObject = basisObjects[0];\n\nconst behavior = object.getBehavior(behaviorName);\n\nbehavior.basisObject = basisObject;\nbehavior.updateOldCoordinates(basisObject);\nbehavior.updateRelativeCoordinates(basisObject);\n", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Object to stick to", + "longDescription": "", + "name": "BasisObject", + "optional": false, + "supplementaryInformation": "", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Unstick from the object it was stuck to.", + "fullName": "Unstick", + "functionType": "Action", + "group": "", + "name": "Unstick", + "private": false, + "sentence": "Unstick _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const object = objects[0];\nconst behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst behavior = object.getBehavior(behaviorName);\n\nbehavior.basisObject = null;", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onDestroy", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\nconst object = objects[0];\nconst behavior = object.getBehavior(behaviorName);\n\nif (runtimeScene.__allStickers)\n runtimeScene.__allStickers.delete(behavior);\n", + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Only follow the position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "OnlyFollowPosition" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "westboy31, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "", + "description": "Ideal for explosions, hit/impacts, earthquake, etc.\n\nSelect one or more methods of shaking:\n- Position: Shake the X and/or Y position of the camera \n- Angle: Shake the rotation of the camera \n- Zoom: Shake the zoom level of the camera \n\nControl how the camera shakes:\n- Amplitude: How far the camera moves during each shake\n- Duration: Amount of time to shake the camera\n- Time between shakes: Amount of time between each change of the movement of the camera\n- Keep shaking until stopped (boolean)\n\nTips:\n- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)\n- To make the single-shake move in the opposite direction, use negative numbers \n- To repeat a single-shake effect in a loop, add a condition \"Camera is not shaking\" \n- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)\n- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. \n- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing\n", + "extensionNamespace": "", + "fullName": "Camera Shake", + "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", + "name": "CameraShake", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", + "shortDescription": "Shake the camera on the specified layer using one or more methods of shaking (position, angle, zoom).", + "version": "2.6.6", + "origin": { + "identifier": "CameraShake", + "name": "gdevelop-extension-store" + }, + "tags": [ + "shaking", + "camera", + "effect", + "screen", + "shake", + "zoom", + "position", + "rotate" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "m4hBMBTUilft4s1V4FQQPakVDGx1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom).", + "fullName": "Camera Shake", + "functionType": "Action", + "group": "", + "name": "CameraShake", + "private": false, + "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera Shake", + "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": "ResetTimer" + }, + "parameters": [ + "", + "\"__CameraShake_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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "=", + "GetArgumentAsNumber(\"PowerX\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "=", + "GetArgumentAsNumber(\"PowerY\")" + ] + }, + { + "type": { + "value": "ModVarGlobalTxt" + }, + "parameters": [ + "__CameraShake_Layer", + "=", + "GetArgumentAsString(\"Layer\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_Camera", + "=", + "GetArgumentAsNumber(\"Camera\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_PowerAngle", + "=", + "GetArgumentAsNumber(\"PowerAngle\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_PowerZoom", + "=", + "GetArgumentAsNumber(\"PowerZoom\")" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_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": "SetGlobalVariableAsBoolean" + }, + "parameters": [ + "__CameraShake_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShakeForever\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetGlobalVariableAsBoolean" + }, + "parameters": [ + "__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "=", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_TimeBetweenShakes", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "<", + "GlobalVariable(__CameraShake_TimeBetweenShakes)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "=", + "GlobalVariable(__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of shaking on the X axis (pixels) (For example: 5)", + "longDescription": "", + "name": "PowerX", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of shaking on the Y axis (pixels) (For example: 5)", + "longDescription": "", + "name": "PowerY", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Layer (base layer if empty)", + "longDescription": "", + "name": "Layer", + "optional": false, + "supplementaryInformation": "", + "type": "layer" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Camera index (Default: 0)", + "longDescription": "", + "name": "Camera", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration (seconds) (Default: 0.5)", + "longDescription": "", + "name": "Duration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Angle rotation amplitude (degrees) (For example: 2)", + "longDescription": "", + "name": "PowerAngle", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Zoom amplitude (percent change) (For example: 3)", + "longDescription": "", + "name": "PowerZoom", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amount of time between shakes (seconds) (Default: 0.08)", + "longDescription": "", + "name": "TimeBetweenShakes", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onScenePostEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera Shake", + "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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep shaking forever (if desired)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GlobalVariableAsBoolean" + }, + "parameters": [ + "__CameraShake_ShakeForever", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_Duration", + "=", + "100" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_InitialShake", + "=", + "1" + ] + }, + { + "type": { + "value": "Timer" + }, + "parameters": [ + "", + "GlobalVariable(__CameraShake_TimeBetweenShakes)", + "\"__CameraShake_ShakeTimer\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"__CameraShake_ShakeTimer\"" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RotateCamera" + }, + "parameters": [ + "", + "-", + "GlobalVariable(__CameraShake_AngleTravelled)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerZoom", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "Object", + "-", + "GlobalVariable(__CameraShake_DisplacementTravelledX)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + }, + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "Object", + "-", + "GlobalVariable(__CameraShake_DisplacementTravelledY)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ZoomTravelled", + "=", + "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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_InitialShake", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementX", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementY", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_InitialShake", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementX", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX) * RandomWithStep(-1, 1, 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementY", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_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 counter-clockwise", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "DisplacementAngle = ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementAngle", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, rotate clockwise (this includes the initial shake and can be used for a one shake effect)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "DisplacementAngle = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementAngle", + "=", + "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Zoom shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerZoom", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate camera zoom displacement, with linear decay over time", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ZoomDisplacement = ((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 zoom", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementZoom", + "=", + "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (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": "ZoomDisplacement = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude * 1/100", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementZoom", + "=", + "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_InitialShake", + "=", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move camera", + "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": "ModVarScene" + }, + "parameters": [ + "__CameraShake_PercentTimeElapsedThisFrame", + "=", + "min(1,TimeDelta()/GlobalVariable(__CameraShake_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": "Timer" + }, + "parameters": [ + "", + "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", + "\"__CameraShake_ShakeTimer\"" + ] + } + ], + "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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "-", + "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + }, + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "-", + "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ], + "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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledX", + "-", + "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledY", + "-", + "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_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": [ + "GlobalVariable(__CameraShake_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RotateCamera" + }, + "parameters": [ + "", + "+", + "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "" + ] + } + ], + "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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_AngleTravelled", + "+", + "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change zoom", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GlobalVariable(__CameraShake_PowerZoom)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) + round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ], + "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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ZoomTravelled", + "+", + "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_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": "Timer" + }, + "parameters": [ + "", + "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", + "\"__CameraShake_ShakeTimer\"" + ] + } + ], + "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": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "+", + "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + }, + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "+", + "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the amount of change to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledX", + "+", + "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledY", + "+", + "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_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": [ + "GlobalVariable(__CameraShake_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RotateCamera" + }, + "parameters": [ + "", + "-", + "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the amount of change to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_AngleTravelled", + "-", + "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change zoom", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GlobalVariable(__CameraShake_PowerZoom)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the amount of change to calculate drift", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ZoomTravelled", + "-", + "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_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 stop shaking has been requested", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Timer" + }, + "parameters": [ + "", + "GlobalVariable(__CameraShake_Duration)", + "\"__CameraShake_DurationTimer\"" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "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 drift from previous shake", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RotateCamera" + }, + "parameters": [ + "", + "-", + "GlobalVariable(__CameraShake_AngleTravelled)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerZoom", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "Object", + "-", + "GlobalVariable(__CameraShake_DisplacementTravelledX)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + }, + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "Object", + "-", + "GlobalVariable(__CameraShake_DisplacementTravelledY)", + "GlobalVariableString(__CameraShake_Layer)", + "GlobalVariable(__CameraShake_Camera)" + ] + } + ] + }, + { + "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": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ZoomTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeCounter", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if camera is shaking.", + "fullName": "Check if camera is shaking", + "functionType": "Condition", + "group": "", + "name": "IsShaking", + "private": false, + "sentence": " Camera is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Stop shaking the camera.", + "fullName": "Stop shaking the camera", + "functionType": "Action", + "group": "", + "name": "StopShaking", + "private": false, + "sentence": "Stop shaking the camera", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraShake::IsShaking" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "__CameraShake_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "VegeTato, arthuro555", + "category": "", + "description": "Convenience conditions, actions and behaviors for timers to trigger a condition every X seconds.", + "extensionNamespace": "", + "fullName": "Repeat every X seconds", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", + "name": "RepeatEveryXSeconds", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/repeat.svg", + "shortDescription": "This allows to trigger an event every X seconds.", + "version": "0.1.0", + "origin": { + "identifier": "RepeatEveryXSeconds", + "name": "gdevelop-extension-store" + }, + "tags": [ + "repeat", + "timer", + "time", + "convenience" + ], + "authorIds": [ + "ZgrsWuRTAkXgeuPV9bo0zuEcA2w1", + "IRIhkkTTl2UHhfjrLTTH5GYwkYu1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Triggers every X seconds.", + "fullName": "Repeat every X seconds", + "functionType": "Condition", + "group": "", + "name": "Repeat", + "private": false, + "sentence": "Repeat timer _PARAM1_ every _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "player", + "GetArgumentAsString(\"timerName\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Timer" + }, + "parameters": [ + "player", + "GetArgumentAsNumber(\"time\")", + "GetArgumentAsString(\"timerName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "player", + "GetArgumentAsString(\"timerName\")" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "The name of the timer to loop", + "longDescription": "", + "name": "timerName", + "optional": false, + "supplementaryInformation": "", + "type": "string" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "The time in seconds between each trigger", + "longDescription": "", + "name": "time", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Triggers every X seconds X amount of times.", + "fullName": "Repeat every X seconds in X number", + "functionType": "Condition", + "group": "", + "name": "RepeatXTimes", + "private": false, + "sentence": "Repeat timer _PARAM1_ every _PARAM2_ seconds _PARAM3_ times", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "player", + "GetArgumentAsString(\"timerName\")" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RepeatEveryXSeconds_.Counter[GetArgumentAsString(\"timerName\")]", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Timer" + }, + "parameters": [ + "player", + "GetArgumentAsNumber(\"time\")", + "GetArgumentAsString(\"timerName\")" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"limit\")", + "=", + "-1" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__RepeatEveryXSeconds_.Counter[GetArgumentAsString(\"timerName\")]", + "<", + "GetArgumentAsNumber(\"limit\")" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "player", + "GetArgumentAsString(\"timerName\")" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RepeatEveryXSeconds_.Counter[GetArgumentAsString(\"timerName\")]", + "+", + "1" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "The name of the timer to loop", + "longDescription": "", + "name": "timerName", + "optional": false, + "supplementaryInformation": "", + "type": "string" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "The time in seconds between each trigger", + "longDescription": "", + "name": "time", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "The limit of loops", + "longDescription": "The condition will trigger at most this amount of times. Make it -1 for looping forever.", + "name": "limit", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Allows to repeat an object timer every X seconds.", + "fullName": "Repeat every X seconds", + "name": "RepeatTimer", + "objectType": "", + "eventsFunctions": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onCreated", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTimerName()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Triggers every X seconds, where X is defined in the behavior properties.", + "fullName": "Repeat every X seconds", + "functionType": "Condition", + "group": "", + "name": "Repeat", + "private": false, + "sentence": "Recurring timer _PARAM1_ of _PARAM0_ has triggered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTimerName()", + "Object.Behavior::PropertyTimerLength()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::PropertyLimit" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "-1" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::PropertyCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyLimit()" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTimerName()" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pauses a recurring timer.", + "fullName": "Pause a recurring timer", + "functionType": "Action", + "group": "", + "name": "Pause", + "private": false, + "sentence": "Pause recurring timer _PARAM1_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTimerName()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Resumes a paused recurring timer.", + "fullName": "Resume a recurring timer", + "functionType": "Action", + "group": "", + "name": "Resume", + "private": false, + "sentence": "Resume recurring timer _PARAM1_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTimerName()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Allows to trigger the recurring timer X times again.", + "fullName": "Reset the limit", + "functionType": "Action", + "group": "", + "name": "ResetLimit", + "private": false, + "sentence": "Allow to trigger the recurring timer _PARAM1_ of _PARAM0_ X times again", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "MyTimer", + "type": "String", + "label": "The name of the timer to repeat", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "TimerName" + }, + { + "value": "1", + "type": "Number", + "label": "The time between each trigger (in seconds)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "TimerLength" + }, + { + "value": "-1", + "type": "Number", + "label": "How many times should the timer trigger? -1 for forever.", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Limit" + }, + { + "value": "0", + "type": "Number", + "label": "An internal counter", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Counter" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", + "category": "Input", + "description": "Draws a draggable slider that users can move to select a numerical value.\nThe value range, tick spacing, and the appearance of the slider can be defined with properties.\n\nHow to use:\n- Add this behavior a **Shape Painter** object\n- Place an instance of that shape painter on the screen where you want the slider to appear\n- Use the \"Value\" expression to find the Value based on the position of the slider\n\nTips:\n- You can disable the slider to prevent a user from interacting with it\n- You can set the Value of the slider and the slider will move to the correct position\n\nFurther details can be found in [this tutorial video](https://youtu.be/iiTUwdAT_hs).\n\nBreaking changes (1.0.0)\n- Track thickness and length properties replaced track width and height. These 2 properties must be set again if they were different from the default size.\n- Hidden sliders can be dragged. The \"enable\" action must be used to disable them.\n", + "extensionNamespace": "", + "fullName": "Draggable slider", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", + "name": "DraggableSliderControl", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/UI Essentials/UI Essentials_sliders_options.svg", + "shortDescription": "A draggable slider that users can move to select a numerical value.", + "version": "1.0.4", + "origin": { + "identifier": "DraggableSliderControl", + "name": "gdevelop-extension-store" + }, + "tags": [ + "draggable", + "slider", + "shape painter", + "ui", + "widget" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Draggable slider", + "name": "DraggableSliderControl", + "objectType": "PrimitiveDrawing::Drawer", + "eventsFunctions": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onCreated", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure object doesn't get re-drawn every frame", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use correct min value (instead of always starting at 0)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMin()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set track height function (which enforces valid thumb sizes)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTrackThickness()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start halo at same size as thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight()/2,Object.Behavior::PropertyThumbWidth()/2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::IsEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Track where the mouse is (in relation to object)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingX(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingY(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move slider when being dragged", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMouseX()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "End sliding and update variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update \"Value\" based on the location of the thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyValueMin() + (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin()) * Object.Behavior::PropertyThumbOffset() / Object.Behavior::PropertyTrackLength()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo even more when pressed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1.25 * Object.Behavior::PropertyHaloRadius()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect mouse clicks near track, start dragging", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset hover detection ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo when hovered", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "Object.Behavior::PropertyThumbOffset() - Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyThumbOffset() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "- Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shrink halo to zero when not hovered", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw slider only when halo is not at final size", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "Object.Layer()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Drawer::ClearShapes" + }, + "parameters": [ + "Object" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Inactive track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set inactive track parameters (by default, use thumb color)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyInactiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyInactiveTrackOpacity()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw inactive track", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "-Object.Behavior::PropertyTrackThickness() / 2", + "Object.Behavior::PropertyTrackLength()", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (inactive side)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTrackLength()", + "0", + "Object.Behavior::PropertyTrackThickness() / 2", + "270", + "90", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Active track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set active track parameters (by default, use thumb color)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyActiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyActiveTrackOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw active track (2 pixels bigger than property) ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "-(Object.Behavior::PropertyTrackThickness() / 2 + 1)", + "Object.Behavior::PropertyThumbOffset()", + "Object.Behavior::PropertyTrackThickness() / 2 + 1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (active side)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "0", + "0", + "1 + Object.Behavior::PropertyTrackThickness() / 2", + "90", + "270", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Halo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare halo", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw halo (it will grow or shrink as needed)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityHover()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityClick()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Thumb", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare thumb settings", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyThumbOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Circle thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"circle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "ceil(max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight())/2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Rectangle thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset() - (Object.Behavior::PropertyThumbWidth() / 2)", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyThumbOffset() + (Object.Behavior::PropertyThumbWidth() / 2)", + "Object.Behavior::PropertyThumbHeight() / 2" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider is being dragged.", + "fullName": "Being dragged", + "functionType": "Condition", + "group": "Slider", + "name": "IsBeingDragged", + "private": false, + "sentence": "_PARAM0_ is being dragged", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider interations are enabled.", + "fullName": "Interactions enabled", + "functionType": "Condition", + "group": "Slider", + "name": "IsEnabled", + "private": false, + "sentence": "Interactions of _PARAM0_ are enabled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the slider. Users cannot interact while it is disabled.", + "fullName": "Enable interactions", + "functionType": "Action", + "group": "Slider", + "name": "SetEnabled", + "private": false, + "sentence": "Enable interactions of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset halo size (so halo won't appear when slider gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Enable", + "longDescription": "", + "name": "Enable", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "The value of the slider (based on position of the thumb).", + "fullName": "Slider value", + "functionType": "Expression", + "group": "Slider", + "name": "Value", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the value of a slider (this will move the thumb to the correct position).", + "fullName": "Slider value", + "functionType": "Action", + "group": "Slider", + "name": "SetValue", + "private": false, + "sentence": "Change the value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyTickSpacing()) * Object.Behavior::PropertyTickSpacing()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyValueMin()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMin()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyValueMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMax()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the proper offset (it moves the slider)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTrackLength() * (Object.Behavior::PropertyValue() - Object.Behavior::PropertyValueMin()) / (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Slider value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "ValueMin", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValueMin()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetValueMin", + "private": false, + "sentence": "Change the minimum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMin\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Minimum value", + "longDescription": "", + "name": "ValueMin", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The maximum value of a slider.", + "fullName": "Slider maximum value", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "ValueMax", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValueMax()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the maximum value of a slider.", + "fullName": "Slider maximum value", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetValueMax", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMax\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Maximum value", + "longDescription": "", + "name": "ValueMax", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "TickSpacing", + "private": false, + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTickSpacing()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Tick spacing", + "longDescription": "", + "name": "TickSpacing", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetTickSpacing", + "private": false, + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TickSpacing\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Tick spacing", + "longDescription": "", + "name": "TickSpacing", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change length of track.", + "fullName": "Track length", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackLength", + "private": false, + "sentence": "Change track length of _PARAM0_ to _PARAM2_px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb to correct place (based on new track size)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyValue()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Track width", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change thickness of track.", + "fullName": "Track thickness", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackThickness", + "private": false, + "sentence": "Change track thickness of _PARAM0_ to _PARAM2_px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Track thickness", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change width of thumb.", + "fullName": "Thumb width", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbWidth", + "private": false, + "sentence": "Change thumb width of _PARAM0_ to _PARAM2_px", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Thumb width", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change height of thumb.", + "fullName": "Thumb height", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbHeight", + "private": false, + "sentence": "Change thumb height of _PARAM0_ to _PARAM2_px", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Thumb height", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change radius of the halo around the thumb. This size is also used to detect interaction with the slider.", + "fullName": "Halo radius", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloRadius", + "private": false, + "sentence": "Change halo radius of _PARAM0_ to _PARAM2_px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo radius", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change shape of thumb (circle or rectangle).", + "fullName": "Thumb shape", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbShape", + "private": false, + "sentence": "Change shape of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Shape\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "New thumb shape", + "longDescription": "", + "name": "Shape", + "optional": false, + "supplementaryInformation": "[\"circle\",\"rectangle\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Make track use rounded ends.", + "fullName": "Rounded track ends", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetRoundedTrack", + "private": false, + "sentence": "Draw _PARAM0_ with a rounded track: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Rounded track", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of thumb.", + "fullName": "Thumb opacity", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbOpacity", + "private": false, + "sentence": "Change thumb opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Thumb opacity", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of inactive track.", + "fullName": "Inactive track opacity", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetInactiveTrackOpacity", + "private": false, + "sentence": "Change inactive track opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Inactive track opacity", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of active track.", + "fullName": "Active track opacity", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetActiveTrackOpacity", + "private": false, + "sentence": "Change active track opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Active track opacity", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the color of the track that is LEFT of the thumb.", + "fullName": "Active track color ", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetActiveTrackColor", + "private": false, + "sentence": "Change active track color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Active track color", + "longDescription": "", + "name": "Color", + "optional": false, + "supplementaryInformation": "", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the color of the track that is RIGHT of the thumb.", + "fullName": "Inactive track color", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetInactiveTrackColor", + "private": false, + "sentence": "Change inactive track color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Inactive track color", + "longDescription": "", + "name": "Color", + "optional": false, + "supplementaryInformation": "", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the thumb color to a specific value.", + "fullName": "Thumb color", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbColor", + "private": false, + "sentence": "Change thumb color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbColor" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Thumb color", + "longDescription": "", + "name": "Color", + "optional": false, + "supplementaryInformation": "", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Update the hitbox.", + "fullName": "Update hitbox", + "functionType": "Action", + "group": "Private", + "name": "UpdateHitbox", + "private": true, + "sentence": "Update the hitbox of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::SetRotationCenter" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTrackLength() / 2", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::SetRectangularCollisionMask" + }, + "parameters": [ + "Object", + "-Object.Behavior::PropertyThumbWidth() / 2", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyThumbWidth() / 2", + "Object.Behavior::PropertyThumbHeight() / 2" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ValueMin" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ValueMax" + }, + { + "value": "0", + "type": "Number", + "label": "Tick spacing", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "TickSpacing" + }, + { + "value": "circle", + "type": "Choice", + "label": "Thumb shape", + "description": "", + "group": "Thumb", + "extraInformation": [ + "circle", + "rectangle" + ], + "hidden": false, + "name": "ThumbShape" + }, + { + "value": "20", + "type": "Number", + "label": "Thumb width", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbWidth" + }, + { + "value": "20", + "type": "Number", + "label": "Thumb height", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbHeight" + }, + { + "value": " 24;119;211", + "type": "Color", + "label": "Thumb Color", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbColor" + }, + { + "value": "255", + "type": "Number", + "label": "Thumb opacity", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbOpacity" + }, + { + "value": "200", + "type": "Number", + "label": "Track length", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "TrackLength" + }, + { + "value": "4", + "type": "Number", + "label": "Track thickness", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "TrackThickness" + }, + { + "value": "", + "type": "String", + "label": "Inactive track color (thumb color by default)", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "InactiveTrackColor" + }, + { + "value": "96", + "type": "Number", + "label": "Inactive track opacity", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "InactiveTrackOpacity" + }, + { + "value": " ", + "type": "String", + "label": "Active track color (thumb color by default)", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "ActiveTrackColor" + }, + { + "value": "255", + "type": "Number", + "label": "Active track opacity", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "ActiveTrackOpacity" + }, + { + "value": "24", + "type": "Number", + "label": "Halo size (hover)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloRadius" + }, + { + "value": "32", + "type": "Number", + "label": "Halo opacity (hover)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityHover" + }, + { + "value": "64", + "type": "Number", + "label": "Halo opacity (pressed)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityClick" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rounded track ends", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "RoundedTrack" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable interactions", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Enabled" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsBeingDragged" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Value" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ThumbOffset" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "NeedRedraw" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentHaloRadius" + }, + { + "value": "0.2", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HaloGrowSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetHaloRadius" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", + "category": "", + "description": "Users can click on the checkbox to add and remove the checkmark. \n\nHow to use:\n- Add this extension to a shape painter object\n- Use condition \"Is checked\" to find out the state of the checkbox\n\nTips:\n- Checkbox state can also be changed by an action.\n- Checkbox can be disabled so that users cannot interact with it \n- To remove halo, Set \"halo hover\" and \"halo pressed\" opacity to 0", + "extensionNamespace": "", + "fullName": "Checkbox", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", + "name": "Checkbox", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/checkbox-marked.svg", + "shortDescription": "Checkbox that can be toggled by a left-click or touch.", + "version": "0.1.0", + "origin": { + "identifier": "Checkbox", + "name": "gdevelop-extension-store" + }, + "tags": [ + "checkbox", + "shape painter", + "ui", + "widget", + "toggle", + "switch" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Checkbox that can be toggled by a left-click or touch.", + "fullName": "Checkbox", + "name": "Checkbox", + "objectType": "PrimitiveDrawing::Drawer", + "eventsFunctions": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onCreated", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure object doesn't get re-drawn every frame", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start halo at same size as thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Checkbox logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo even more when pressed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusPressed()" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect press ending", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect hover and touch/click", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect mouse clicks near checkbox", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::ToggleChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset hover detection ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo when hovered", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusHover()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shrink halo to zero when not hovered", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw checkbox only when halo is not at final size", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Checkbox drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "Object.Layer()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Drawer::ClearShapes" + }, + "parameters": [ + "Object" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Fix inputs", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Fix inputs that create malformed checkboxes", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertySideLength()", + "<", + "10" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertySideLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "10" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyLineWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()", + ">", + "Object.Behavior::PropertySideLength()/3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyLineWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusHover()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusPressed()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusHover() * 1.1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw Halo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set halo radius, if not specified", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyHaloRadiusHover" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetHaloRadiusHover" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertySideLength()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if halo is bigger than checkbox", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertySideLength()/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare halo", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw halo (it will grow or shrink as needed)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityHover()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityClick()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw checkbox square", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change shape painter based on properties", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySecondaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineSize" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyBorderThickness()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "255" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "0", + "Object.Behavior::PropertySideLength()", + "Object.Behavior::PropertySideLength()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw checkmark", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare color of checkmark", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySecondaryColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw left-side of checkmark", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength() * 1/10", + "Object.Behavior::PropertySideLength() * 1/2", + "Object.Behavior::PropertySideLength() * 1/3", + "Object.Behavior::PropertySideLength() * 3/4", + "Object.Behavior::PropertyLineWidth()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw right-side of checkmark", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength() * 1/3 - (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", + "Object.Behavior::PropertySideLength() * 3/4 + (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", + "Object.Behavior::PropertySideLength() * 9/10", + "Object.Behavior::PropertySideLength() * 2/10", + "Object.Behavior::PropertyLineWidth()" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the checkbox.", + "fullName": "Check (or uncheck) the checkbox", + "functionType": "Action", + "group": "Checkbox state", + "name": "SetChecked", + "private": false, + "sentence": "Add checkmark to _PARAM0_: _PARAM2_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"State\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyChecked" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMin\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"State\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Check the checkbox?", + "longDescription": "", + "name": "State", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable interactions with the checkbox. Users cannot interact while it is disabled.", + "fullName": "Enable interactions with checkbox", + "functionType": "Action", + "group": "Checkbox behavior", + "name": "SetEnabled", + "private": false, + "sentence": "Enable interactions of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop dragging (so the checkbox won't be dragging when it gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset halo size (so halo won't appear when checkbox gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Enable", + "longDescription": "", + "name": "Enable", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "If checked, change to unchecked. If unchecked, change to checked.", + "fullName": "Toggle checkmark", + "functionType": "Action", + "group": "", + "name": "ToggleChecked", + "private": false, + "sentence": "Toggle checkmark on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyToggleChanged" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyToggleChanged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyToggleChanged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the primary color of checkbox.", + "fullName": "Primary color of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetPrimaryColor", + "private": false, + "sentence": "Change the primary color of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyPrimaryColor" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Primary color", + "longDescription": "", + "name": "Color", + "optional": false, + "supplementaryInformation": "", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the secondary color of checkbox.", + "fullName": "Secondary color of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetSecondaryColor", + "private": false, + "sentence": "Change the secondary color of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertySecondaryColor" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Secondary color", + "longDescription": "", + "name": "Color", + "optional": false, + "supplementaryInformation": "", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo opacity when pressed.", + "fullName": "Halo opacity when pressed", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloOpacityPressed", + "private": false, + "sentence": "Change the halo opacity of _PARAM0_ when pressed: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloOpacityClick" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo opacity", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo opacity when hovered.", + "fullName": "Halo opacity when hovered", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloOpacityHover", + "private": false, + "sentence": "Change the halo opacity of _PARAM0_ when hovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloOpacityHover" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo opacity", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo radius when pressed.", + "fullName": "Halo radius when pressed", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloRadiusPressed", + "private": false, + "sentence": "Change the halo radius of _PARAM0_ when pressed: _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo radius", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo radius when hovered. This size is also used to detect interaction with the checkbox.", + "fullName": "Halo radius when hovered", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloRadiusHover", + "private": false, + "sentence": "Change the halo radius of _PARAM0_ when hovered: _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo radius", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the border thickness of checkbox.", + "fullName": "Border thickness of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetBorderThickness", + "private": false, + "sentence": "Change the border thickness of _PARAM0_: _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyBorderThickness" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Track thickness", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the side length of checkbox.", + "fullName": "Side length of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetSideLength", + "private": false, + "sentence": "Change the side length of _PARAM0_: _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertySideLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Track width (px)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the line width of checkmark.", + "fullName": "Line width of checkmark", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetLineWidth", + "private": false, + "sentence": "Change the line width of _PARAM0_: _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyLineWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Line width (px)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the checkbox is checked.", + "fullName": "Is checked", + "functionType": "Condition", + "group": "Checkbox state", + "name": "IsChecked", + "private": false, + "sentence": "_PARAM0_ is checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the checkbox interations are enabled.", + "fullName": "Interactions enabled", + "functionType": "Condition", + "group": "Checkbox", + "name": "IsEnabled", + "private": false, + "sentence": "Interactions of _PARAM0_ are enabled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the color used to draw the outline of the checkbox (when unchecked) and the fill color (when checked).", + "fullName": "Primary color of checkbox", + "functionType": "StringExpression", + "group": "Checkbox appearance", + "name": "PrimaryColor", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPrimaryColor()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the color used to fill the checkbox (when unchecked) and to draw the checkmark (when checked).", + "fullName": "Secondary color of checkbox", + "functionType": "StringExpression", + "group": "Checkbox appearance", + "name": "SecondaryColor", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertySecondaryColor()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the radius of the halo while the checkbox is touched or clicked.", + "fullName": "Halo radius while touched or clicked", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloRadiusPressed", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusPressed()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the opacity of the halo while the checkbox is touched or clicked.", + "fullName": "Halo opacity (while touched or clicked)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloOpacityPressed", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::HaloOpacityPressed()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the radius of the halo when the mouse is hovering near the checkbox.", + "fullName": "Halo radius (during hover)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloRadiusHover", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusHover()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the opacity of the halo when the mouse is hovering near the checkbox.", + "fullName": "Halo opacity (during hover)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloOpacityHover", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHaloOpacityHover()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the line width of checkmark (pixels).", + "fullName": "Line width", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "LineWidth", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the side length of checkbox (pixels).", + "fullName": "Side length ", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "SideLength", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertySideLength()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the border thickness of checkbox (pixels).", + "fullName": "Border thickness", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "BorderThickness", + "private": false, + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyBorderThickness()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the checkbox is being pressed by mouse or touch.", + "fullName": "Checkbox is being pressed", + "functionType": "Condition", + "group": "Checkbox", + "name": "IsBeingPressed", + "private": false, + "sentence": "_PARAM0_ is being pressed by mouse or touch", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Update the hitbox.", + "fullName": "Update hitbox", + "functionType": "Action", + "group": "Private", + "name": "UpdateHitbox", + "private": true, + "sentence": "Update the hitbox of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::SetRotationCenter" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertySideLength()/2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Include border in the collision mask", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::SetRectangularCollisionMask" + }, + "parameters": [ + "Object", + "-Object.Behavior::BorderThickness()/2", + "-Object.Behavior::BorderThickness()/2", + "Object.Behavior::PropertySideLength() + Object.Behavior::BorderThickness()/2", + "Object.Behavior::PropertySideLength() + Object.Behavior::BorderThickness()/2" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Boolean", + "label": "Checked", + "description": "", + "group": "Checkbox state", + "extraInformation": [], + "hidden": false, + "name": "Checked" + }, + { + "value": "", + "type": "Number", + "label": "Halo size (hover). If blank, this is set to \"SideLength\".", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "HaloRadiusHover" + }, + { + "value": "64", + "type": "Number", + "label": "Halo opacity (hover)", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityHover" + }, + { + "value": "128", + "type": "Number", + "label": "Halo opacity (pressed)", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityClick" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable interactions", + "description": "", + "group": "Checkbox state", + "extraInformation": [], + "hidden": false, + "name": "Enabled" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsBeingPressed" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "NeedRedraw" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentHaloRadius" + }, + { + "value": "0.3", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HaloGrowSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetHaloRadius" + }, + { + "value": "", + "type": "Boolean", + "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ToggleChanged" + }, + { + "value": " 24;119;211", + "type": "Color", + "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "PrimaryColor" + }, + { + "value": "255;255;255", + "type": "Color", + "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "SecondaryColor" + }, + { + "value": "24", + "type": "Number", + "label": "Length of each side (px) Minimum: 10", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "SideLength" + }, + { + "value": "5", + "type": "Number", + "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "LineWidth" + }, + { + "value": "2", + "type": "Number", + "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "BorderThickness" + }, + { + "value": "", + "type": "Number", + "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", + "description": "", + "group": "Checkbox appearance", + "extraInformation": [], + "hidden": false, + "name": "HaloRadiusPressed" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian", + "category": "", + "description": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nAfter adding this to an object, you have to **trigger the effect** by using the **Flash action**.", + "extensionNamespace": "", + "fullName": "Flash (blink)", + "helpPath": "", + "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", + "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": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make the specified object(s) blink for the given duration.", + "fullName": "Flash (blink)", + "functionType": "Action", + "group": "", + "name": "Flash", + "private": false, + "sentence": "Make _PARAM0_ blink for _PARAM2_ seconds", + "events": [ + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of the blinking, in seconds", + "longDescription": "", + "name": "FlashDuration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the specified objects are flashing.", + "fullName": "Is object flashing", + "functionType": "Condition", + "group": "", + "name": "IsFlashing", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onOwnerRemovedFromScene", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onDeActivate", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop the flashing of the specified object.", + "fullName": "Stop flashing", + "functionType": "Action", + "group": "", + "name": "Stop", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "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" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian", + "category": "General", + "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)", + "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", + "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": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "onCreated", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Points of damage", + "longDescription": "", + "name": "DamageValue", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "yes", + "description": "Shield can reduce damage taken", + "longDescription": "", + "name": "UseShield", + "optional": true, + "supplementaryInformation": "", + "type": "yesorno" + }, + { + "codeOnly": false, + "defaultValue": "yes", + "description": "Armor can reduce damage taken", + "longDescription": "", + "name": "UseArmor", + "optional": true, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "New health value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Heal the object by increasing its health points.", + "fullName": "Heal object", + "functionType": "Action", + "group": "Health", + "name": "Heal", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Points to heal (will be added to object health)", + "longDescription": "", + "name": "HealValue", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the object maximum health points.", + "fullName": "Maximum health points", + "functionType": "Action", + "group": "Health configuration", + "name": "SetMaxHealth", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Maximum health", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the rate of health regeneration.", + "fullName": "Rate of health regeneration", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHealthRegenRate", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Rate of regen", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "Action", + "group": "Health configuration", + "name": "SetCooldownDuration", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of damage cooldown (seconds)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Delay (seconds)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage", + "functionType": "Action", + "group": "Health configuration", + "name": "SetChanceToDodge", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Chance to dodge (Range: 0 to 1)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Flat reduction from armor", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Percent damage reduction from armor", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Allow over-healing", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Hit at least once", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Just damaged", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Trigger damage cooldown.", + "fullName": "Trigger damage cooldown", + "functionType": "Action", + "group": "Health", + "name": "TriggerDamageCooldown", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if health was just damaged previously in the events.", + "fullName": "Is health just damaged", + "functionType": "Condition", + "group": "Health", + "name": "IsJustDamaged", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object was just healed previously in the events.", + "fullName": "Is just healed", + "functionType": "Condition", + "group": "Health", + "name": "IsJustHealed", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is considered dead (no health points).", + "fullName": "Is dead", + "functionType": "Condition", + "group": "Health", + "name": "IsDead", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Maximum health points of the object.", + "fullName": "Maximum health points", + "functionType": "Expression", + "group": "Health", + "name": "MaxHealth", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxHealth()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "Expression", + "group": "Health", + "name": "DamageCooldownDuration", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDamageCooldown()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Current health points of the object.", + "fullName": "Health points", + "functionType": "Expression", + "group": "Health", + "name": "Health", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentHealth()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Delay before health regeneration starts after last being hit (seconds).", + "fullName": "Health regeneration delay", + "functionType": "Expression", + "group": "Health", + "name": "HealthRegenDelay", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenDelay()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rate of health regeneration (points per second).", + "fullName": "Rate of health regeneration", + "functionType": "Expression", + "group": "Health", + "name": "HealthRegenRate", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenRate()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Time before damage cooldown ends (seconds).", + "fullName": "Time remaining in damage cooldown", + "functionType": "Expression", + "group": "Health", + "name": "DamageCooldownRemaining", + "private": false, + "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\"))" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Time since last hit (seconds).", + "fullName": "Time since last hit", + "functionType": "Expression", + "group": "Health", + "name": "TimeSinceLastHit", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage", + "functionType": "Expression", + "group": "Health", + "name": "ChanceToDodge", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyChanceToDodge()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFlatDamageReduction()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Percent damage reduction from armor. Range: 0 to 1.", + "fullName": "Percent damage reduction from armor", + "functionType": "Expression", + "group": "Health", + "name": "PercentDamageReduction", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPercentDamageReduction()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Health damage taken from most recent hit.", + "fullName": "Health damage taken from most recent hit", + "functionType": "Expression", + "group": "Health", + "name": "PreviousDamageTaken", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDamageToBeApplied()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShield", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Maximum shield", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change current shield points. Will not trigger damage cooldown.", + "fullName": "Shield points", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldPoints", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Shield points", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change rate of shield regeneration.", + "fullName": "Shield regeneration rate", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldRegenRate", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Regeneration rate (points per second)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change delay before shield regeneration starts after being hit.", + "fullName": "Shield regeneration delay", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldRegenDelay", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Regeneration delay (seconds)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Shield duration (seconds)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Renew shield duration to it's full value.", + "fullName": "Renew shield duration", + "functionType": "Action", + "group": "Shield configuration", + "name": "RenewShieldDuration", + "private": false, + "sentence": "Renew the shield duration on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.ShieldDuration\"" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Shield points", + "longDescription": "", + "name": "ShieldPoints", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "yes", + "description": "Renew shield duration", + "longDescription": "", + "name": "RenewShieldDuration", + "optional": true, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change maximum shield points.", + "fullName": "Max shield points ", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShieldPoints", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Shield points", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Block excess damage", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "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", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if incoming damage was just dodged.", + "fullName": "Damage was just dodged", + "functionType": "Condition", + "group": "Health", + "name": "IsJustDodged", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the shield is active (based on shield points and duration).", + "fullName": "Is shield active", + "functionType": "Condition", + "group": "Shield", + "name": "IsShieldActive", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "Expression", + "group": "Shield", + "name": "MaxShield", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Duration of the shield (seconds).", + "fullName": "Duration of shield", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldDuration", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Delay before shield regeneration starts after being hit (seconds).", + "fullName": "Shield regeneration delay", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldRegenDelay", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldRegenDelay()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Rate of shield regeneration (points per second).", + "fullName": "Rate of shield regeneration", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldRegenRate", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldRegenRate()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Time before the shield duration ends (seconds).", + "fullName": "Time before shield duration ends", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldTimeRemaining", + "private": false, + "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\"))" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Current shield points of the object.", + "fullName": "Shield points", + "functionType": "Expression", + "group": "Shield", + "name": "ShieldPoints", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentShieldPoints()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Shield damage taken from most recent hit.", + "fullName": "Shield damage taken from most recent hit", + "functionType": "Expression", + "group": "Health", + "name": "PreviousDamageToShield", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShieldDamageTaken()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Health points gained from previous heal.", + "fullName": "Health points gained from previous heal", + "functionType": "Expression", + "group": "Health", + "name": "PreviousHealAmount", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealToBeApplied()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "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" + } + ] + } + ], + "eventsBasedObjects": [] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file