From ff339d46fd9e464265948dd88cb1ea2765827405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 23 Aug 2023 21:27:22 +0200 Subject: [PATCH 1/2] Replace some animation actions. --- examples/top-down-rpg/top-down-rpg.json | 579 ++++++++++++------------ 1 file changed, 278 insertions(+), 301 deletions(-) diff --git a/examples/top-down-rpg/top-down-rpg.json b/examples/top-down-rpg/top-down-rpg.json index 142226674..ee58bdd5e 100644 --- a/examples/top-down-rpg/top-down-rpg.json +++ b/examples/top-down-rpg/top-down-rpg.json @@ -8,6 +8,8 @@ }, "properties": { "adaptGameResolutionAtRuntime": false, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.topdownrpg", @@ -73,9 +75,14 @@ "showGDevelopSplash": true, "showProgressBar": true }, + "watermark": { + "placement": "bottom-left", + "showWatermark": true + }, "authorIds": [ "9MGDlUQAh8QUilno4JPycekjRCJ3" ], + "authorUsernames": [], "categories": [ "rpg" ], @@ -563,7 +570,8 @@ "r": 0 }, "absoluteCoordinates": false, - "clearBetweenFrames": true + "clearBetweenFrames": true, + "antialiasing": "none" }, { "assetStoreId": "", @@ -2525,6 +2533,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", "tags": "", @@ -3185,6 +3194,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "NPC", "tags": "", @@ -3245,6 +3255,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Dock1", "tags": "", @@ -3286,6 +3297,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Tree1", "tags": "", @@ -3327,6 +3339,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Tree2", "tags": "", @@ -3368,6 +3381,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Bush1", "tags": "", @@ -3409,6 +3423,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "House1", "tags": "", @@ -3450,6 +3465,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "House2", "tags": "", @@ -3491,6 +3507,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "CornerWater", "tags": "", @@ -3532,6 +3549,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "WaterCorner2", "tags": "", @@ -3645,6 +3663,7 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "CollisionDetect", "tags": "", @@ -3930,6 +3949,7 @@ "content": {}, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -3964,6 +3984,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -4000,6 +4021,7 @@ } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "e91e41d6c290f6c774e486052d91033556b332dac944b44f4dd0d68692fcbc95", "name": "TargetRoundButton", "tags": "", @@ -4279,10 +4301,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Player", + "Animation", + "=", "\"Up\"" ] } @@ -4305,10 +4329,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Player", + "Animation", + "=", "\"Down\"" ] } @@ -4331,10 +4357,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Player", + "Animation", + "=", "\"Right\"" ] } @@ -4357,10 +4385,12 @@ "actions": [ { "type": { - "value": "SetAnimationName" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Player", + "Animation", + "=", "\"Left\"" ] } @@ -4383,10 +4413,11 @@ "actions": [ { "type": { - "value": "PauseAnimation" + "value": "AnimatableCapability::AnimatableBehavior::PauseAnimation" }, "parameters": [ - "Player" + "Player", + "Animation" ] }, { @@ -4417,10 +4448,11 @@ "actions": [ { "type": { - "value": "PlayAnimation" + "value": "AnimatableCapability::AnimatableBehavior::PlayAnimation" }, "parameters": [ - "Player" + "Player", + "Animation" ] } ] @@ -4760,9 +4792,14 @@ "ambientLightColorB": 0, "ambientLightColorG": 19942824, "ambientLightColorR": 16, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -4782,9 +4819,14 @@ "ambientLightColorB": 13920576, "ambientLightColorG": 6050880, "ambientLightColorR": 11874240, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Dialogue", + "renderingType": "", "visibility": false, "cameras": [], "effects": [] @@ -4793,9 +4835,14 @@ "ambientLightColorB": 15350824, "ambientLightColorG": 6062928, "ambientLightColorR": 15732720, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "UI", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -4804,9 +4851,14 @@ "ambientLightColorB": 8799112, "ambientLightColorG": 6050880, "ambientLightColorR": 12506048, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Transition", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -4815,9 +4867,14 @@ "ambientLightColorB": 15506000, "ambientLightColorG": 6062928, "ambientLightColorR": 17727712, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Collision", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -4828,14 +4885,34 @@ "name": "BitmapText_AutoTyping", "type": "AutoTyping::BitmapText_AutoTyping" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FlashTransitionPainter", "type": "FlashTransitionPainter::FlashTransitionPainter" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, { "name": "MultitouchButton", "type": "SpriteMultitouchJoystick::MultitouchButton" }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" @@ -5074,6 +5151,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Enemy", "tags": "", @@ -5163,6 +5241,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", "tags": "", @@ -5481,6 +5560,7 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "House2", "tags": "", @@ -5731,6 +5811,7 @@ } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Background", "tags": "", @@ -6492,9 +6573,14 @@ "ambientLightColorB": 22078880, "ambientLightColorG": 6050880, "ambientLightColorR": 14081096, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -6503,9 +6589,14 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -6525,9 +6616,14 @@ "ambientLightColorB": 11858072, "ambientLightColorG": 6050880, "ambientLightColorR": 21777048, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Dialogue", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -6536,9 +6632,14 @@ "ambientLightColorB": 21829640, "ambientLightColorG": 6050880, "ambientLightColorR": 22048576, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "UI", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -6549,6 +6650,10 @@ "name": "BitmapText_AutoTyping", "type": "AutoTyping::BitmapText_AutoTyping" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "Flash", "type": "Flash::Flash" @@ -6557,10 +6662,26 @@ "name": "FlashTransitionPainter", "type": "FlashTransitionPainter::FlashTransitionPainter" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, { "name": "Health", "type": "Health::Health" }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" @@ -7423,8 +7544,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7503,8 +7623,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7982,8 +8101,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10875,6 +10993,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Thumb", "tags": "", @@ -10898,6 +11017,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Border", "tags": "", @@ -10994,8 +11114,7 @@ "textG": 0, "textR": 0 }, - "comment": "This is done after the events to allow users to read the previous value at the end of the change.", - "comment2": "" + "comment": "This is done after the events to allow users to read the previous value at the end of the change." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11647,8 +11766,7 @@ "textG": 0, "textR": 0 }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11676,8 +11794,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Create the child-object instances." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11778,8 +11895,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label over the bar.", - "comment2": "" + "comment": "Create the label over the bar." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11861,8 +11977,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -12077,8 +12192,7 @@ "textG": 0, "textR": 0 }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" + "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14104,8 +14218,7 @@ "textG": 0, "textR": 0 }, - "comment": "Health", - "comment2": "" + "comment": "Health" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14168,8 +14281,7 @@ "textG": 0, "textR": 0 }, - "comment": "Correct any values above maximum limits", - "comment2": "" + "comment": "Correct any values above maximum limits" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14284,8 +14396,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shield", - "comment2": "" + "comment": "Shield" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14381,8 +14492,7 @@ "textG": 0, "textR": 0 }, - "comment": "Correct any values above maximum limits", - "comment2": "" + "comment": "Correct any values above maximum limits" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14539,8 +14649,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only consider incoming damage when damage cooldown is not active", - "comment2": "" + "comment": "Only consider incoming damage when damage cooldown is not active" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14590,8 +14699,7 @@ "textG": 0, "textR": 0 }, - "comment": "No damage will be applied when dodged", - "comment2": "" + "comment": "No damage will be applied when dodged" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14773,8 +14881,7 @@ "textG": 0, "textR": 0 }, - "comment": "If shield is active, damage the shield first", - "comment2": "" + "comment": "If shield is active, damage the shield first" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14842,8 +14949,7 @@ "textG": 0, "textR": 0 }, - "comment": "If damage is less than shield, subtract damage from shield.", - "comment2": "" + "comment": "If damage is less than shield, subtract damage from shield." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14906,8 +15012,7 @@ "textG": 0, "textR": 0 }, - "comment": "If damage is greater than shield, conditionally apply excess damage based on property", - "comment2": "" + "comment": "If damage is greater than shield, conditionally apply excess damage based on property" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14986,8 +15091,7 @@ "textG": 0, "textR": 0 }, - "comment": "Apply excess damage only if shield does not block excess damage", - "comment2": "" + "comment": "Apply excess damage only if shield does not block excess damage" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15180,8 +15284,7 @@ "textG": 0, "textR": 0 }, - "comment": "If MaxHealth is set, prevent health from going above it", - "comment2": "" + "comment": "If MaxHealth is set, prevent health from going above it" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15260,8 +15363,7 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Health is not set, do not enforce Max Health", - "comment2": "" + "comment": "If Max Health is not set, do not enforce Max Health" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15302,8 +15404,7 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Health is set and Overhealing is not allowed", - "comment2": "" + "comment": "If Max Health is set and Overhealing is not allowed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15354,8 +15455,7 @@ "textG": 0, "textR": 0 }, - "comment": "Perform heal", - "comment2": "" + "comment": "Perform heal" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15384,8 +15484,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update healing trigger", - "comment2": "" + "comment": "Update healing trigger" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15462,8 +15561,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure Current Health does not exceed new Max Health", - "comment2": "" + "comment": "Make sure Current Health does not exceed new Max Health" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16021,8 +16119,7 @@ "textG": 0, "textR": 0 }, - "comment": "Mark that the object was hit at least once (used for initial state of damage cooldown)", - "comment2": "" + "comment": "Mark that the object was hit at least once (used for initial state of damage cooldown)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16103,8 +16200,7 @@ "textG": 0, "textR": 0 }, - "comment": "This condition is used to prevent \"damage cooldown\" from being active when the game starts.", - "comment2": "" + "comment": "This condition is used to prevent \"damage cooldown\" from being active when the game starts." }, { "type": "BuiltinCommonInstructions::Standard", @@ -17556,8 +17652,7 @@ "textG": 0, "textR": 0 }, - "comment": "To be considered \"active\", a shield must have positive points AND not exceed duration", - "comment2": "" + "comment": "To be considered \"active\", a shield must have positive points AND not exceed duration" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17586,8 +17681,7 @@ "textG": 0, "textR": 0 }, - "comment": "Don't check the timer when duration is zero (or negative)", - "comment2": "" + "comment": "Don't check the timer when duration is zero (or negative)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18328,8 +18422,7 @@ "textG": 0, "textR": 0 }, - "comment": "Disable effect when the game starts.", - "comment2": "" + "comment": "Disable effect when the game starts." }, { "type": "BuiltinCommonInstructions::Standard", @@ -18389,8 +18482,7 @@ "textG": 0, "textR": 0 }, - "comment": "Avoid default parameter of painter that could make the extension doesn't work.", - "comment2": "" + "comment": "Avoid default parameter of painter that could make the extension doesn't work." }, { "type": "BuiltinCommonInstructions::Standard", @@ -18452,8 +18544,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initialise position of painter. \nIncrement or decrement \"_TimeProgressionEffect\" depending on direction.", - "comment2": "" + "comment": "Initialise position of painter. \nIncrement or decrement \"_TimeProgressionEffect\" depending on direction." }, { "type": "BuiltinCommonInstructions::Standard", @@ -18503,8 +18594,7 @@ "textG": 0, "textR": 0 }, - "comment": "Here this the paints functions of different effect depending on the type chosen by the user.\nDetect the direction of the animation and its end.", - "comment2": "" + "comment": "Here this the paints functions of different effect depending on the type chosen by the user.\nDetect the direction of the animation and its end." }, { "type": "BuiltinCommonInstructions::Comment", @@ -18516,8 +18606,7 @@ "textG": 0, "textR": 0 }, - "comment": "Type 1 : flash effect. ", - "comment2": "" + "comment": "Type 1 : flash effect. " }, { "type": "BuiltinCommonInstructions::Standard", @@ -18693,8 +18782,7 @@ "textG": 0, "textR": 0 }, - "comment": "Type 2 : screen come from top then return.", - "comment2": "" + "comment": "Type 2 : screen come from top then return." }, { "type": "BuiltinCommonInstructions::Standard", @@ -18902,8 +18990,7 @@ "textG": 0, "textR": 0 }, - "comment": "Type 3 : screen come from left then return.", - "comment2": "" + "comment": "Type 3 : screen come from left then return." }, { "type": "BuiltinCommonInstructions::Standard", @@ -19111,8 +19198,7 @@ "textG": 0, "textR": 0 }, - "comment": "Type 4 : a circle scale up from the middle then scale down.", - "comment2": "" + "comment": "Type 4 : a circle scale up from the middle then scale down." }, { "type": "BuiltinCommonInstructions::Standard", @@ -19319,8 +19405,7 @@ "textG": 0, "textR": 0 }, - "comment": "The repeat 5 times is used to have clean and smooth edges , especially for circle.\n", - "comment2": "" + "comment": "The repeat 5 times is used to have clean and smooth edges , especially for circle.\n" } ], "parameters": [ @@ -19355,8 +19440,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset variables.", - "comment2": "" + "comment": "Reset variables." }, { "type": "BuiltinCommonInstructions::Standard", @@ -19431,8 +19515,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred.\nIf user doesn't assign value to timer we take a default value (0.2).", - "comment2": "" + "comment": "Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred.\nIf user doesn't assign value to timer we take a default value (0.2)." }, { "type": "BuiltinCommonInstructions::Standard", @@ -19748,8 +19831,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when the animation ends with a timer which is initialised in PaintEffect function.", - "comment2": "" + "comment": "Detect when the animation ends with a timer which is initialised in PaintEffect function." }, { "type": "BuiltinCommonInstructions::Standard", @@ -19979,8 +20061,7 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -20030,8 +20111,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" + "comment": "Make sure the cursor position is only checked once per frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -20095,8 +20175,7 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { "type": "BuiltinCommonInstructions::Standard", @@ -21110,8 +21189,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -21191,8 +21269,7 @@ "textG": 0, "textR": 0 }, - "comment": "Place the label over the backgrounds.", - "comment2": "" + "comment": "Place the label over the backgrounds." }, { "type": "BuiltinCommonInstructions::Standard", @@ -21323,8 +21400,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -21689,8 +21765,7 @@ "textG": 0, "textR": 0 }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" + "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." }, { "type": "BuiltinCommonInstructions::Standard", @@ -22633,8 +22708,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22661,8 +22735,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22735,8 +22808,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22789,8 +22861,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22860,8 +22931,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22902,8 +22972,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -22944,8 +23013,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23065,8 +23133,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23124,8 +23191,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23202,8 +23268,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23300,8 +23365,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23355,8 +23419,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23404,8 +23467,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -23417,8 +23479,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23507,8 +23568,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23599,8 +23659,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -23629,8 +23688,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -23642,8 +23700,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23683,8 +23740,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -23696,8 +23752,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23739,8 +23794,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23783,8 +23837,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23813,8 +23866,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23843,8 +23895,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23913,8 +23964,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23956,8 +24006,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -23996,8 +24045,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24030,8 +24078,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24059,8 +24106,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24129,8 +24175,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24172,8 +24217,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24212,8 +24256,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24263,8 +24306,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24349,8 +24391,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24447,8 +24488,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24652,8 +24692,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24680,8 +24719,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24765,8 +24803,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24819,8 +24856,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24890,8 +24926,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24932,8 +24967,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -24974,8 +25008,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25101,8 +25134,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25160,8 +25192,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25239,8 +25270,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25365,8 +25395,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25431,8 +25460,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25480,8 +25508,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25493,8 +25520,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25583,8 +25609,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25675,8 +25700,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -25705,8 +25729,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25718,8 +25741,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25759,8 +25781,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25772,8 +25793,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25815,8 +25835,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Scale shake", - "comment2": "" + "comment": "Calculate Scale shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25845,8 +25864,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate object scale displacement, with linear decay over time", - "comment2": "" + "comment": "Calculate object scale displacement, with linear decay over time" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25858,8 +25876,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25871,8 +25888,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every even shake, increase scale", - "comment2": "" + "comment": "Every even shake, increase scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25912,8 +25928,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, decrease scale", - "comment2": "" + "comment": "Every \"odd\" shake, decrease scale" }, { "type": "BuiltinCommonInstructions::Comment", @@ -25925,8 +25940,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25968,8 +25982,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26012,8 +26025,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26042,8 +26054,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26072,8 +26083,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26142,8 +26152,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26185,8 +26194,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26225,8 +26233,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26257,8 +26264,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26297,8 +26303,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26331,8 +26336,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26360,8 +26364,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26430,8 +26433,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26473,8 +26475,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26513,8 +26514,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26545,8 +26545,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26585,8 +26584,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26636,8 +26634,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26722,8 +26719,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -26848,8 +26844,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27098,8 +27093,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update private properties through setters to check their values and initialize state.", - "comment2": "" + "comment": "Update private properties through setters to check their values and initialize state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -27332,8 +27326,7 @@ "textG": 0, "textR": 0 }, - "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice.", - "comment2": "" + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." }, { "type": "BuiltinCommonInstructions::Standard", @@ -27395,8 +27388,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration", - "comment2": "" + "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27434,8 +27426,7 @@ "textG": 0, "textR": 0 }, - "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough.", - "comment2": "" + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." }, { "type": "BuiltinCommonInstructions::Standard", @@ -27784,8 +27775,7 @@ "textG": 0, "textR": 0 }, - "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed.", - "comment2": "" + "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed." }, { "type": "BuiltinCommonInstructions::Standard", @@ -29332,8 +29322,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode.", - "comment2": "" + "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode." }, { "type": "BuiltinCommonInstructions::Standard", @@ -29402,8 +29391,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use the object center when no delay is asked.", - "comment2": "" + "comment": "Use the object center when no delay is asked." }, { "type": "BuiltinCommonInstructions::Standard", @@ -29539,8 +29527,7 @@ "textG": 0, "textR": 0 }, - "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting.", - "comment2": "" + "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting." }, { "infiniteLoopWarning": true, @@ -29625,8 +29612,7 @@ "textG": 0, "textR": 0 }, - "comment": "Don't move the camera if there is not enough history.", - "comment2": "" + "comment": "Don't move the camera if there is not enough history." }, { "type": "BuiltinCommonInstructions::Standard", @@ -29693,8 +29679,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))", - "comment2": "" + "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29753,8 +29738,7 @@ "textG": 0, "textR": 0 }, - "comment": "The time with delay is now between the first 2 indexes", - "comment2": "" + "comment": "The time with delay is now between the first 2 indexes" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30199,8 +30183,7 @@ "textG": 0, "textR": 0 }, - "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions.", - "comment2": "" + "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions." }, { "infiniteLoopWarning": true, @@ -30342,8 +30325,7 @@ "textG": 0, "textR": 0 }, - "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must.", - "comment2": "" + "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must." }, { "type": "BuiltinCommonInstructions::Standard", @@ -30599,8 +30581,7 @@ "textG": 0, "textR": 0 }, - "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))", - "comment2": "" + "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30822,8 +30803,7 @@ "textG": 0, "textR": 0 }, - "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX", - "comment2": "" + "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30925,8 +30905,7 @@ "textG": 0, "textR": 0 }, - "comment": "Axis permutation to avoid a ratio between 2 numbers near 0.", - "comment2": "" + "comment": "Axis permutation to avoid a ratio between 2 numbers near 0." }, { "type": "BuiltinCommonInstructions::Standard", @@ -31023,8 +31002,7 @@ "textG": 0, "textR": 0 }, - "comment": "Permute back axis", - "comment2": "" + "comment": "Permute back axis" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31245,8 +31223,7 @@ "textG": 0, "textR": 0 }, - "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)", - "comment2": "" + "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)" }, { "type": "BuiltinCommonInstructions::Standard", From 5f9a0672503439eb07d1348bf53e872eb35c2be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 23 Aug 2023 21:32:02 +0200 Subject: [PATCH 2/2] Update extensions. --- examples/top-down-rpg/top-down-rpg.json | 7252 +++++++++++++++++------ 1 file changed, 5345 insertions(+), 1907 deletions(-) diff --git a/examples/top-down-rpg/top-down-rpg.json b/examples/top-down-rpg/top-down-rpg.json index ee58bdd5e..0cf569228 100644 --- a/examples/top-down-rpg/top-down-rpg.json +++ b/examples/top-down-rpg/top-down-rpg.json @@ -6704,18 +6704,20 @@ "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", - "helpPath": "https://wiki.gdevelop.io/gdevelop5/extensions/multitouch-joystick/start", + "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.1.0", + "version": "1.2.2", "description": [ "Multitouch joysticks can be used the same way as physical gamepads:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters" + "- Controls mapping for top-down movement and platformer characters", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." ], "origin": { "identifier": "SpriteMultitouchJoystick", @@ -6729,7 +6731,10 @@ "touchscreen", "twin stick", "shooter", - "virtual" + "virtual", + "platformer", + "platform", + "top-down" ], "authorIds": [ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", @@ -7595,7 +7600,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" }, { "description": "Direction", @@ -7674,8 +7680,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "supplementaryInformation": "MultitouchJoystick::MultitouchJoystick", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" }, { "description": "Direction", @@ -7688,9 +7694,10 @@ }, { "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", "events": [ { @@ -7702,7 +7709,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + "SpriteMultitouchJoystick::StickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" ] } ] @@ -7720,7 +7727,48 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" } ], "objectGroups": [] @@ -7771,9 +7819,50 @@ }, { "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", "sentence": "", "events": [ { @@ -7803,7 +7892,8 @@ { "description": "Joystick name", "name": "JoystickIdentifier", - "type": "string" + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" } ], "objectGroups": [] @@ -7851,6 +7941,86 @@ } ], "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * cos(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * sin(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [ @@ -7977,16 +8147,6 @@ "Behavior", "" ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Resumed!!!\"", - "", - "" - ] } ] }, @@ -8202,7 +8362,7 @@ "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", + "description": "the joystick force (from 0 to 1).", "fullName": "Joystick force", "functionType": "ExpressionAndCondition", "name": "JoystickForce", @@ -8392,6 +8552,86 @@ ], "objectGroups": [] }, + { + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (4-way movement)", @@ -9630,8 +9870,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" ] } ] @@ -9659,8 +9899,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "sign(SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "sign(SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" ] } ] @@ -10255,6 +10495,15 @@ "Object", "" ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] } ] } @@ -10471,11 +10720,11 @@ "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", "functionType": "Condition", "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "sentence": "Stick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -10514,10 +10763,11 @@ "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "the joystick force", "events": [ { @@ -10529,7 +10779,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickForce()" + "Border.MultitouchJoystick::JoystickForce()" ] } ] @@ -10544,21 +10794,121 @@ "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, "sentence": "", "events": [ { @@ -10570,7 +10920,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickAngle()" + "Border.MultitouchJoystick::JoystickAngle()" ] } ] @@ -10585,12 +10935,41 @@ "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" - }, + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" } ], "objectGroups": [] @@ -13561,390 +13940,626 @@ ] }, { - "author": "@4ian", - "category": "Visual effect", + "author": "@4ian, Entropy, VegeTato", + "category": "", "extensionNamespace": "", - "fullName": "Flash (blink)", + "fullName": "Flash object", "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", + "shortDescription": "Make an object flash visibility (blink), color tint, object effect, or opacity (fade).", + "version": "1.1.1", "description": [ - "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.", - "After adding this to an object, you have to **trigger the effect** by using the **Flash action**." + "Make an object flash for a period of time so that it alternates between two different states.", + "Includes the ability to flash visibility (blink), color tint, object effect, or opacity (fade).", + "", + "After adding a behavior to an object, you **trigger the effect** by using the **Flash action**.", + "", + "This can be used to:", + "- Let players know they are invincible after being hit", + "- Catch player attention on the interface (for instance a \"press start\" text)", + "" ], "origin": { "identifier": "Flash", "name": "gdevelop-extension-store" }, "tags": [ + "tween", "flash", "blink", "visible", "invisible", "hit", - "damage" + "damage", + "fade", + "effect", + "color", + "tint" ], "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "q8ubdigLvIRXLxsJDDTaokO41mc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "eventsFunctions": [ { - "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": "Color tint applied to an object.", + "fullName": "Color tint applied to an object", + "functionType": "ExpressionAndCondition", + "name": "ColorTint", + "sentence": "Color tint applied to _PARAM1_", + "events": [ { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Return the color string for the tint applied to the object" + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.SpriteRuntimeObject} */\r", + "const tintedObject = objects[0];\r", + "const tint = tintedObject.getColor();\r", + "eventsFunctionContext.returnValue = tint;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a color tint is applied to an object.", + "fullName": "Is a color tint applied to an object", + "functionType": "StringExpression", + "name": "IsTinted", + "sentence": "_PARAM1_ is color tinted", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "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", - "" - ] - } - ] - } + "type": { + "inverted": true, + "value": "Flash::ColorTint" + }, + "parameters": [ + "", + "=", + "\"255;255;255\"", + "Object", + "" ] } ], - "parameters": [ + "actions": [ { - "description": "Object", - "name": "Object", - "type": "object" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle an object effect.", + "fullName": "Toggle an object effect", + "functionType": "Action", + "name": "ToggleEffect", + "sentence": "Toggle effect _PARAM2_ on _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")", + "" + ] }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Flash::Flash", - "type": "behavior" + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] } ], - "objectGroups": [] + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" }, { - "description": "Make the specified object(s) blink for the given duration.", - "fullName": "Flash (blink)", - "functionType": "Action", - "name": "Flash", - "sentence": "Make _PARAM0_ blink for _PARAM2_ seconds", + "description": "Effect name to toggle", + "name": "EffectName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle color tint between the starting tint and a given value.", + "fullName": "Toggle a color tint", + "functionType": "Action", + "name": "ToggleColorTint", + "private": true, + "sentence": "Toggle color tint _PARAM2_ on _PARAM1_", + "events": [ + { + "colorB": 35, + "colorG": 166, + "colorR": 245, + "creationTime": 0, + "name": "Note: This function cannot be \"public\" until it properly handles objects without a starting color tint variable (NULL)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Swap between the starting tint and the given value", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Egal" + "value": "SetObjectVariableAsBoolean" }, "parameters": [ - "GetArgumentAsNumber(\"FlashDuration\")", - ">", - "0" + "Object", + "__Flash_ColorTintToggled", + "False" ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ResetObjectTimer" + "value": "Flash::ColorTint" }, "parameters": [ + "", + "=", + "Object.VariableString(__FlashColor_StartingTint)", "Object", - "\"FlashDurationTimer\"" + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "Flash::Flash::SetPropertyFlashDuration" + "value": "ChangeColor" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"FlashDuration\")" + "GetArgumentAsString(\"ColorTint\")" ] }, { "type": { - "value": "Flash::Flash::SetPropertyIsFlashing" + "value": "SetObjectVariableAsBoolean" }, "parameters": [ "Object", - "Behavior", - "yes" + "__Flash_ColorTintToggled", + "True" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Flash::Flash", - "type": "behavior" - }, - { - "description": "Duration of the blinking, in seconds", - "name": "FlashDuration", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the specified objects are flashing.", - "fullName": "Is object flashing", - "functionType": "Condition", - "name": "IsFlashing", - "sentence": "_PARAM0_ is flashing", - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "SetReturnBoolean" + "value": "ObjectVariableAsBoolean" }, "parameters": [ + "Object", + "__Flash_ColorTintToggled", "False" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "Flash::Flash::PropertyIsFlashing" + "inverted": true, + "value": "Flash::ColorTint" }, "parameters": [ + "", + "=", + "Object.VariableString(__FlashColor_StartingTint)", "Object", - "Behavior" + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "ChangeColor" }, "parameters": [ - "True" + "Object", + "Object.VariableString(__FlashColor_StartingTint)" ] } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Flash::Flash", - "type": "behavior" - } - ], - "objectGroups": [] + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" }, { - "fullName": "", - "functionType": "Action", - "name": "onOwnerRemovedFromScene", - "sentence": "", - "events": [ + "description": "Color tint", + "name": "ColorTint", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle object visibility.", + "fullName": "Toggle object visibility", + "functionType": "Action", + "name": "ToggleVisibility", + "sentence": "Toggle visibility of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Flash::Flash::Stop" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" ] } ], - "parameters": [ + "actions": [ { - "description": "Object", - "name": "Object", - "type": "object" + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Flash::Flash", - "type": "behavior" + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "True" + ] } - ], - "objectGroups": [] + ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Make the object flash (blink) for a period of time so it alternates between visible and invisible.", + "fullName": "Flash visibility (blink)", + "name": "Flash", + "objectType": "", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onDeActivate", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Flash::Flash::Stop" + "value": "Flash::Flash::PropertyIsFlashing" }, "parameters": [ "Object", - "Behavior", - "" + "Behavior" ] } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"", + ">", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::ToggleVisibility" + }, + "parameters": [ + "", + "Object", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } ] } ], @@ -13964,31 +14579,34 @@ "objectGroups": [] }, { - "description": "Stop the flashing of the specified object.", - "fullName": "Stop flashing", + "description": "Make an object flash (blink) visibility for a period of time.", + "fullName": "Flash visibility (blink)", "functionType": "Action", - "name": "Stop", - "sentence": "Stop flashing _PARAM0_", + "name": "Flash", + "sentence": "Make _PARAM0_ flash (blink) for _PARAM2_ seconds", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Flash::Flash::PropertyIsFlashing" + "inverted": true, + "value": "Flash::Flash::IsFlashing" }, "parameters": [ "Object", - "Behavior" + "Behavior", + "" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Flash::ToggleVisibility" }, "parameters": [ + "", "Object", "" ] @@ -14000,7 +14618,42 @@ "parameters": [ "Object", "Behavior", - "no" + "yes" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" ] } ] @@ -14017,129 +14670,81 @@ "name": "Behavior", "supplementaryInformation": "Flash::Flash", "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" } ], "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" + "description": "Check if an object is flashing visibility.", + "fullName": "Is object flashing visibility", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "FlashDuration" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "@4ian", - "category": "Game mechanic", - "extensionNamespace": "", - "fullName": "Health points and damage", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", - "name": "Health", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/heart-half-full.svg", - "shortDescription": "Manage health points and damage, including a protective shield and armor.", - "version": "0.1.0", - "description": [ - "Manage health points including a protective shield and armor. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.", - "", - "Damage calculations are performed in this order:", - "", - "Incoming Damage -> Is Damage Cooldown active? -> Chance to Dodge -> Flat Damage Reduction -> Percent Damage Reduction -> Damage to Shield -> Damage to Health", - "", - "How to use:", - "", - "- Set desired values in behavior properties", - "- To apply damage use “Apply damage to an object”", - "- To heal health, use “Heal object” action", - "- To activate the shield, use “Activate shield” action", - "- Health and shield regeneration will happen automatically based on properties", - " ", - "Tips:", - "", - "- While damage cooldown is active, no damage will be applied to health or shield (the object is invincible)", - "- Try using the “Blink” extension while damage cooldown is active", - "- Use the “Is just damaged” or \"Is just healed\" conditions to trigger sound and visual effects", - "", - "Health properties:", - "", - "- Starting health points", - "- Maximum health points. Use \"0\" for no maximum", - "- Damage cooldown (seconds) Use \"0\" for no cooldown", - "- Rate of health regeneration (points per second)", - "- Delay before health regeneration starts after being hit (seconds)", - "- Allow heals to increase health above max health (regen will never exceed max health)", - "", - "Shield properties:", - "", - "- Max shield points. Use \"0\" for no maximum", - "- Duration of shield (seconds) Use \"0\" to make shield permanent", - "- Rate of shield regeneration (points per second)", - "- Delay before shield regeneration starts after being hit (seconds)", - "- Block excess damage when shield is broken (yes/no)" - ], - "origin": { - "identifier": "Health", - "name": "gdevelop-extension-store" - }, - "tags": [ - "health", - "life", - "damage", - "hit", - "heal", - "shield", - "regeneration", - "armor" - ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", - "xpwUwByyImTDcHEqDUqfyg0oRBt1", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" - ], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Manage health (life) points including a protective shield and armor.", - "fullName": "Health", - "name": "Health", - "objectType": "", - "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onCreated", + "name": "onDeActivate", "sentence": "", "events": [ { @@ -14148,22 +14753,88 @@ "actions": [ { "type": { - "value": "ResetObjectTimer" + "value": "Flash::Flash::Stop" }, "parameters": [ "Object", - "\"__Health.TimeSinceLastHit\"" + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing visibility (blink) of an object.", + "fullName": "Stop flashing visibility (blink)", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing visibility of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] }, { "type": { - "value": "Health::Health::SetCurrentHealth" + "value": "Flash::Flash::SetPropertyIsFlashing" }, "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyHealth()", - "" + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"" ] } ] @@ -14178,138 +14849,119 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Health::Health", + "supplementaryInformation": "Flash::Flash", "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time during which object is invisible)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "colorB": 224, - "colorG": 16, - "colorR": 189, - "creationTime": 0, - "name": "Health", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Regeneration", + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make an object flash a color tint for a period of time.", + "fullName": "Flash color tint", + "name": "FlashColor", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Health" - }, { "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\"", + "\"Flash_Color_Timer\"", ">", - "Object.Behavior::PropertyHealthRegenDelay()" + "Object.Behavior::PropertyHalfPeriodTime()" ] } ], "actions": [ { "type": { - "value": "Health::Health::SetPropertyCurrentHealth" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "Behavior", - "+", - "Object.Behavior::PropertyHealthRegenRate() * TimeDelta()" + "\"Flash_Color_Timer\"" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Correct any values above maximum limits" }, { - "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()" - ] - } + "type": { + "value": "Flash::ToggleColorTint" + }, + "parameters": [ + "", + "Object", + "Object.Behavior::PropertyTintColor()", + "" ] } ] @@ -14322,42 +14974,45 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reset triggers", + "name": "Stop flashing", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Health::Health::SetPropertyIsHealthJustDamaged" + "value": "Flash::FlashColor::PropertyFlashDuration" }, "parameters": [ "Object", "Behavior", - "no" + ">", + "0" ] }, { "type": { - "value": "Health::Health::SetPropertyIsJustHealed" + "value": "CompareObjectTimer" }, "parameters": [ "Object", - "Behavior", - "no" + "\"Flash_Color_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" ] - }, + } + ], + "actions": [ { "type": { - "value": "Health::Health::SetPropertyIsJustDodged" + "value": "Flash::FlashColor::Stop" }, "parameters": [ "Object", "Behavior", - "no" + "" ] } ] @@ -14365,534 +15020,2453 @@ ], "parameters": [] } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash a color tint for a period of time.", + "fullName": "Flash color tint", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash the color tint _PARAM3_ for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__FlashColor_StartingTint", + "=", + "Flash::ColorTint(Object)" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"" + ] + }, + { + "type": { + "value": "Flash::ToggleColorTint" + }, + "parameters": [ + "", + "Object", + "GetArgumentAsString(\"ColorTint\")", + "" + ] + }, + { + "type": { + "value": "Flash::FlashColor::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] }, { - "colorB": 224, - "colorG": 16, - "colorR": 189, - "creationTime": 0, - "name": "Shield", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "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" - }, - { - "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" - }, - { - "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": [] + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] }, { - "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": [] + "type": { + "value": "Flash::FlashColor::SetPropertyTintColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"ColorTint\")" + ] }, { - "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": [] + "type": { + "value": "Flash::FlashColor::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] } - ], - "parameters": [] + ] } ], "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Health::Health", + "supplementaryInformation": "Flash::FlashColor", "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Color tint", + "name": "ColorTint", + "type": "color" } ], "objectGroups": [] }, { - "description": "Apply damage to the object. Shield and armor can reduce this damage if enabled.", - "fullName": "Apply damage to an object", - "functionType": "Action", - "group": "Health", - "name": "Hit", - "sentence": "Apply _PARAM2_ points of damage to _PARAM0_ (Damage can be reduced by Shield: _PARAM3_, Armor: _PARAM4_)", + "description": "Check if an object is flashing a color tint.", + "fullName": "Is object flashing a color tint", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing a color tint", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Incoming damage", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnBoolean" }, - "comment": "Only consider incoming damage when damage cooldown is not active" + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashColor::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing a color tint on an object.", + "fullName": "Stop flashing color tint", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing color tint _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashColor::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { - "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\")" - ] - } - ], + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "Object.VariableString(__FlashColor_StartingTint)" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "\"255;255;255\"", + "type": "String", + "label": "Tint color", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TintColor" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Flash opacity smoothly (fade) in a repeating loop.", + "fullName": "Flash opacity smothly (fade)", + "name": "FlashOpacity", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashOpacity::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Chance to dodge", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Tween::HasFinished" }, - "comment": "No damage will be applied when dodged" + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"", + "Object.Behavior::PropertyStartingOpacity()", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] }, { - "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" - ] - } + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Damage reduction from Armor", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "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": [] - } + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" ] } ], - "parameters": [] - }, + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"", + "Object.Behavior::PropertyTargetOpacity()", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply damage to shield", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Flash::FlashOpacity::PropertyFlashDuration" }, - "comment": "If shield is active, damage the shield first" + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"UseShield\"" - ] + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Opacity_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash opacity smoothly (fade) in a repeating loop.", + "fullName": "Flash opacity (fade)", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash opacity smoothly to _PARAM4_ in a loop for _PARAM3_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashOpacity::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyStartingOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Opacity()" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"", + "GetArgumentAsNumber(\"TargetOpacity\")", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Opacity_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyTargetOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetOpacity\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + }, + { + "description": "Tween behavior (required)", + "name": "TweenBehavior", + "supplementaryInformation": "Tween::TweenBehavior", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Target opacity", + "name": "TargetOpacity", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing opacity.", + "fullName": "Is object flashing opacity", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing opacity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing opacity of an object.", + "fullName": "Stop flashing opacity", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing opacity of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashOpacity::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyStartingOpacity()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Tween Behavior (required)", + "description": "", + "group": "", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "hidden": false, + "name": "TweenBehavior" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes), in seconds", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Target opacity (Range: 0 - 255)", + "description": "Opacity will fade between the starting value and a target value", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetOpacity" + }, + { + "value": "", + "type": "Number", + "unit": "Dimensionless", + "label": "Starting opacity", + "description": "Opacity will fade between the starting value and a target value", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "StartingOpacity" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make the object flash an effect for a period of time.", + "fullName": "Flash effect", + "name": "FlashEffect", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"", + ">", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "Flash::ToggleEffect" + }, + "parameters": [ + "", + "Object", + "Object.Behavior::PropertyEffectName()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash an effect for a period of time.", + "fullName": "Flash effect", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash the effect _PARAM3_ for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop flashing existing effects if the effect name changed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::PropertyEffectName" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashColor_StartingState", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashColor_StartingState", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::ToggleEffect" + }, + "parameters": [ + "", + "Object", + "GetArgumentAsString(\"EffectName\")", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyEffectName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"EffectName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Name of effect", + "name": "EffectName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing an effect.", + "fullName": "Is object flashing an effect", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing an effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing an effect of an object.", + "fullName": "Stop flashing an effect", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing an effect on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashEffect_StartingState", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyEffectName()", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashEffect_StartingState", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyEffectName()", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes), in seconds", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "", + "type": "String", + "label": "Name of effect", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "EffectName" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "Health points and damage", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", + "name": "Health", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/heart-half-full.svg", + "shortDescription": "Manage health points and damage, including a protective shield and armor.", + "version": "0.3.0", + "description": [ + "Manage health points including a protective shield and armor. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.", + "", + "Damage calculations are performed in this order:", + "", + "Incoming Damage -> Is Damage Cooldown active? -> Chance to Dodge -> Flat Damage Reduction -> Percent Damage Reduction -> Damage to Shield -> Damage to Health", + "", + "How to use:", + "", + "- Set desired values in behavior properties", + "- To apply damage use “Apply damage to an object”", + "- To heal health, use “Heal object” action", + "- To activate the shield, use “Activate shield” action", + "- Health and shield regeneration will happen automatically based on properties", + " ", + "Tips:", + "", + "- While damage cooldown is active, no damage will be applied to health or shield (the object is invincible)", + "- Try using the “Blink” extension while damage cooldown is active", + "- Use the “Is just damaged” or \"Is just healed\" conditions to trigger sound and visual effects", + "", + "Health properties:", + "", + "- Starting health points", + "- Maximum health points. Use \"0\" for no maximum", + "- Damage cooldown (seconds) Use \"0\" for no cooldown", + "- Rate of health regeneration (points per second)", + "- Delay before health regeneration starts after being hit (seconds)", + "- Allow heals to increase health above max health (regen will never exceed max health)", + "", + "Shield properties:", + "", + "- Max shield points. Use \"0\" for no maximum", + "- Duration of shield (seconds) Use \"0\" to make shield permanent", + "- Rate of shield regeneration (points per second)", + "- Delay before shield regeneration starts after being hit (seconds)", + "- Block excess damage when shield is broken (yes/no)", + "", + "The top-down RPG example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://top-down-rpg))." + ], + "origin": { + "identifier": "Health", + "name": "gdevelop-extension-store" + }, + "tags": [ + "health", + "life", + "damage", + "hit", + "heal", + "shield", + "regeneration", + "armor" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "xpwUwByyImTDcHEqDUqfyg0oRBt1", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Manage health (life) points including a protective shield and armor.", + "fullName": "Health", + "name": "Health", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__Health.TimeSinceLastHit\"" + ] + }, + { + "type": { + "value": "Health::Health::SetCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyHealth()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Health", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Regeneration", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Health" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMaxShieldPoints()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Remove shield points if shield expired", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Health::Health::IsShieldActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentShieldPoints" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset damage trigger", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsShieldJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Apply damage to the object. Shield and armor can reduce this damage if enabled.", + "fullName": "Apply damage to an object", + "functionType": "Action", + "group": "Health", + "name": "Hit", + "sentence": "Apply _PARAM2_ points of damage to _PARAM0_ (Damage can be reduced by Shield: _PARAM3_, Armor: _PARAM4_)", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Incoming damage", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Only consider incoming damage when damage cooldown is not active" + }, + { + "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" + }, + { + "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" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UseShield\"" + ] }, { "type": { @@ -15140,79 +17714,767 @@ "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": [] + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply damage to health", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyDamageToBeApplied" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetJustDamaged" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + }, + { + "type": { + "value": "Health::Health::TriggerDamageCooldown" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyCurrentHealth() - Object.Behavior::PropertyDamageToBeApplied()", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Points of damage", + "name": "DamageValue", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Shield can reduce damage taken", + "name": "UseShield", + "optional": true, + "type": "yesorno" + }, + { + "defaultValue": "yes", + "description": "Armor can reduce damage taken", + "name": "UseArmor", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "current health points of the object.", + "fullName": "Health points", + "functionType": "ExpressionAndCondition", + "group": "Health", + "name": "Health", + "sentence": "health points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentHealth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the health points of the object. Will not trigger damage cooldown.", + "fullName": "Change health points", + "functionType": "Action", + "group": "Health", + "name": "SetHealth", + "sentence": "Change the health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If MaxHealth is set, prevent health from going above it" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyMaxHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyCurrentHealth(), Object.Behavior::PropertyMaxHealth())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "New health value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the health points of the object. Will not trigger damage cooldown.", + "fullName": "Change health points (deprecated)", + "functionType": "Action", + "group": "Health configuration", + "name": "SetCurrentHealth", + "private": true, + "sentence": "Change the health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetHealth" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "New health value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Heal the object by increasing its health points.", + "fullName": "Heal object", + "functionType": "Action", + "group": "Health", + "name": "Heal", + "sentence": "Heal _PARAM0_ with _PARAM2_ health points", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Heal", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If Max Health is not set, do not enforce Max Health" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyIsJustHealed" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } ], - "parameters": [] + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Points to heal (will be added to object health)", + "name": "HealValue", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum health points of the object.", + "fullName": "Maximum health points", + "functionType": "ExpressionAndCondition", + "group": "Health configuration", + "name": "MaxHealth", + "sentence": "the maximum health points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxHealth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxHealth", + "name": "SetMaxHealthOp", + "sentence": "", + "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" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::MaxHealth()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyCurrentHealth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::MaxHealth()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Maximum health", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the object maximum health points.", + "fullName": "Maximum health points (deprecated)", + "functionType": "Action", + "group": "Health configuration", + "name": "SetMaxHealth", + "private": true, + "sentence": "Change the maximum health of _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetMaxHealthOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Maximum health", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the rate of health regeneration (points per second).", + "fullName": "Rate of health regeneration", + "functionType": "ExpressionAndCondition", + "group": "Health configuration", + "name": "HealthRegenRate", + "sentence": "the rate of health regeneration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenRate()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HealthRegenRate", + "name": "SetHealthRegenRateOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyHealthRegenRate" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Rate of regen", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the rate of health regeneration.", + "fullName": "Rate of health regeneration (deprecated)", + "functionType": "Action", + "group": "Health configuration", + "name": "SetHealthRegenRate", + "private": true, + "sentence": "Change the rate of health regen of _PARAM0_ to _PARAM2_ points per second", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetHealthRegenRateOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] } ], "parameters": [ @@ -15228,34 +18490,20 @@ "type": "behavior" }, { - "description": "Points of damage", - "name": "DamageValue", + "description": "Rate of regen", + "name": "Value", "type": "expression" - }, - { - "defaultValue": "yes", - "description": "Shield can reduce damage taken", - "name": "UseShield", - "optional": true, - "type": "yesorno" - }, - { - "defaultValue": "yes", - "description": "Armor can reduce damage taken", - "name": "UseArmor", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Change the health points of the object. Will not trigger damage cooldown.", - "fullName": "Change health points", - "functionType": "Action", + "description": "the duration of damage cooldown (seconds).", + "fullName": "Damage cooldown", + "functionType": "ExpressionAndCondition", "group": "Health configuration", - "name": "SetCurrentHealth", - "sentence": "Change the health of _PARAM0_ to _PARAM2_ points", + "name": "DamageCooldownDuration", + "sentence": "the duration of damage cooldown", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15263,54 +18511,53 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyCurrentHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "Object.Behavior::PropertyDamageCooldown()" ] } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "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" + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DamageCooldownDuration", + "name": "SetCooldownDurationOp", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Health::Health::PropertyMaxHealth" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Health::Health::SetPropertyCurrentHealth" + "value": "Health::Health::SetPropertyDamageCooldown" }, "parameters": [ "Object", "Behavior", "=", - "min(Object.Behavior::PropertyCurrentHealth(), Object.Behavior::PropertyMaxHealth())" + "GetArgumentAsNumber(\"Value\")" ] } ] @@ -15329,7 +18576,7 @@ "type": "behavior" }, { - "description": "New health value", + "description": "Duration of damage cooldown (seconds)", "name": "Value", "type": "expression" } @@ -15337,173 +18584,117 @@ "objectGroups": [] }, { - "description": "Heal the object by increasing its health points.", - "fullName": "Heal object", + "description": "Change the duration of damage cooldown (seconds).", + "fullName": "Damage cooldown (deprecated)", "functionType": "Action", - "group": "Health", - "name": "Heal", - "sentence": "Heal _PARAM0_ with _PARAM2_ health points", + "group": "Health configuration", + "name": "SetCooldownDuration", + "private": true, + "sentence": "Change the duration of damage cooldown on _PARAM0_ to _PARAM2_ seconds", "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" - }, - { - "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" - }, - { - "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::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Health::Health::SetCooldownDurationOp" }, - "comment": "Perform heal" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Health::Health::SetPropertyCurrentHealth" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "Object.Behavior::PropertyHealToBeApplied()" - ] - } + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Duration of damage cooldown (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the delay before health regeneration starts after last being hit (seconds).", + "fullName": "Health regeneration delay", + "functionType": "ExpressionAndCondition", + "group": "Health configuration", + "name": "HealthRegenDelay", + "sentence": "the health regeneration delay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnNumber" }, - "comment": "Update healing trigger" - }, + "parameters": [ + "Object.Behavior::PropertyHealthRegenDelay()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HealthRegenDelay", + "name": "SetHealthRegenDelayOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Health::Health::SetPropertyIsJustHealed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } + "type": { + "value": "Health::Health::SetPropertyHealthRegenDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -15519,20 +18710,21 @@ "type": "behavior" }, { - "description": "Points to heal (will be added to object health)", - "name": "HealValue", + "description": "Delay (seconds)", + "name": "Value", "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the object maximum health points.", - "fullName": "Maximum health points", + "description": "Change the delay before health regeneration starts after being hit.", + "fullName": "Health regeneration delay (deprecated)", "functionType": "Action", "group": "Health configuration", - "name": "SetMaxHealth", - "sentence": "Change the maximum health of _PARAM0_ to _PARAM2_ points", + "name": "SetHealthRegenDelay", + "private": true, + "sentence": "Change the health regeneration delay on _PARAM0_ to _PARAM2_ seconds", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15540,54 +18732,100 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyMaxHealth" + "value": "Health::Health::SetHealthRegenDelayOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "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" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" }, + { + "description": "Delay (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the chance to dodge incoming damage (range: 0 to 1).", + "fullName": "Dodge chance", + "functionType": "ExpressionAndCondition", + "group": "Health configuration", + "name": "ChanceToDodge", + "sentence": "the chance to dodge incoming damage", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Health::Health::PropertyCurrentHealth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::MaxHealth()" + "Object.Behavior::PropertyChanceToDodge()" ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ChanceToDodge", + "name": "SetChanceToDodgeOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "Health::Health::SetPropertyCurrentHealth" + "value": "Health::Health::SetPropertyChanceToDodge" }, "parameters": [ "Object", "Behavior", "=", - "Object.Behavior::MaxHealth()" + "GetArgumentAsNumber(\"Value\")" ] } ] @@ -15606,7 +18844,7 @@ "type": "behavior" }, { - "description": "Maximum health", + "description": "Chance to dodge (Range: 0 to 1)", "name": "Value", "type": "expression" } @@ -15614,12 +18852,13 @@ "objectGroups": [] }, { - "description": "Change the rate of health regeneration.", - "fullName": "Rate of health regeneration", + "description": "Change the chance to dodge incoming damage.", + "fullName": "Chance to dodge incoming damage (deprecated)", "functionType": "Action", "group": "Health configuration", - "name": "SetHealthRegenRate", - "sentence": "Change the rate of health regen of _PARAM0_ to _PARAM2_ points per second", + "name": "SetChanceToDodge", + "private": true, + "sentence": "Change the chance to dodge on _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15627,13 +18866,14 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyHealthRegenRate" + "value": "Health::Health::SetChanceToDodgeOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] @@ -15652,7 +18892,7 @@ "type": "behavior" }, { - "description": "Rate of regen", + "description": "Chance to dodge (Range: 0 to 1)", "name": "Value", "type": "expression" } @@ -15660,12 +18900,12 @@ "objectGroups": [] }, { - "description": "Change the duration of damage cooldown (seconds).", - "fullName": "Damage cooldown", - "functionType": "Action", + "description": "the flat damage reduction from the armor. Incoming damage is reduced by this value.", + "fullName": "Armor flat damage reduction", + "functionType": "ExpressionAndCondition", "group": "Health configuration", - "name": "SetCooldownDuration", - "sentence": "Change the duration of damage cooldown on _PARAM0_ to _PARAM2_ seconds", + "name": "FlatDamageReduction", + "sentence": "the armor flat damage reduction", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15673,7 +18913,47 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyDamageCooldown" + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFlatDamageReduction()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FlatDamageReduction", + "name": "SetFlatDamageReductionOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetPropertyFlatDamageReduction" }, "parameters": [ "Object", @@ -15698,7 +18978,7 @@ "type": "behavior" }, { - "description": "Duration of damage cooldown (seconds)", + "description": "Flat reduction from armor", "name": "Value", "type": "expression" } @@ -15706,12 +18986,13 @@ "objectGroups": [] }, { - "description": "Change the delay before health regeneration starts after being hit.", - "fullName": "Health regeneration delay", + "description": "Change the flat damage reduction from armor. Incoming damage is reduced by this value.", + "fullName": "Flat damage reduction from armor (deprecated)", "functionType": "Action", "group": "Health configuration", - "name": "SetHealthRegenDelay", - "sentence": "Change the health regeneration delay on _PARAM0_ to _PARAM2_ seconds", + "name": "SetFlatDamageReduction", + "private": true, + "sentence": "Change the flat damage reduction from armor on _PARAM0_ to _PARAM2_ points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15719,13 +19000,14 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyHealthRegenDelay" + "value": "Health::Health::SetFlatDamageReductionOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] @@ -15744,7 +19026,7 @@ "type": "behavior" }, { - "description": "Delay (seconds)", + "description": "Flat reduction from armor", "name": "Value", "type": "expression" } @@ -15752,12 +19034,12 @@ "objectGroups": [] }, { - "description": "Change the chance to dodge incoming damage.", - "fullName": "Chance to dodge incoming damage", - "functionType": "Action", + "description": "the percent damage reduction from armor (range: 0 to 1).", + "fullName": "Armor percent damage reduction", + "functionType": "ExpressionAndCondition", "group": "Health configuration", - "name": "SetChanceToDodge", - "sentence": "Change the chance to dodge on _PARAM0_ to _PARAM2_", + "name": "PercentDamageReduction", + "sentence": "the armor percent damage reduction", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15765,18 +19047,18 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyChanceToDodge" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "Object.Behavior::PropertyPercentDamageReduction()" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -15788,22 +19070,16 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "description": "Chance to dodge (Range: 0 to 1)", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the flat damage reduction from armor. Incoming damage is reduced by this value.", - "fullName": "Flat damage reduction from armor", - "functionType": "Action", - "group": "Health configuration", - "name": "SetFlatDamageReduction", - "sentence": "Change the flat damage reduction from armor on _PARAM0_ to _PARAM2_ points", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PercentDamageReduction", + "name": "SetPercentDamageReductionOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15811,7 +19087,7 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyFlatDamageReduction" + "value": "Health::Health::SetPropertyPercentDamageReduction" }, "parameters": [ "Object", @@ -15836,7 +19112,7 @@ "type": "behavior" }, { - "description": "Flat reduction from armor", + "description": "Percent damage reduction from armor", "name": "Value", "type": "expression" } @@ -15845,10 +19121,11 @@ }, { "description": "Change the percent damage reduction from armor. Range: 0 to 1.", - "fullName": "Percent damage reduction from armor", + "fullName": "Percent damage reduction from armor (deprecated)", "functionType": "Action", "group": "Health configuration", "name": "SetPercentDamageReduction", + "private": true, "sentence": "Change the percent damage reduction from armor on _PARAM0_ to _PARAM2_", "events": [ { @@ -15857,13 +19134,14 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyPercentDamageReduction" + "value": "Health::Health::SetPercentDamageReductionOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] @@ -16464,6 +19742,72 @@ ], "objectGroups": [] }, + { + "description": "the time before damage cooldown ends (seconds).", + "fullName": "Time remaining in damage cooldown", + "functionType": "ExpressionAndCondition", + "group": "Health", + "name": "DamageCooldownRemaining", + "sentence": "the time before damage cooldown end", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Health::Health::IsDamageCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0,Object.Behavior::PropertyDamageCooldown() - Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Check if the object is considered dead (no health points).", "fullName": "Is dead", @@ -16529,12 +19873,12 @@ "objectGroups": [] }, { - "description": "Maximum health points of the object.", - "fullName": "Maximum health points", - "functionType": "Expression", + "description": "the time since last taken hit (seconds).", + "fullName": "Time since last hit", + "functionType": "ExpressionAndCondition", "group": "Health", - "name": "MaxHealth", - "sentence": "", + "name": "TimeSinceLastHit", + "sentence": "the time since last taken hit on health", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16545,7 +19889,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxHealth()" + "Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\")" ] } ] @@ -16570,12 +19914,12 @@ "objectGroups": [] }, { - "description": "Duration of damage cooldown (seconds).", - "fullName": "Damage cooldown", - "functionType": "Expression", + "description": "the health damage taken from most recent hit.", + "fullName": "Health damage taken from most recent hit", + "functionType": "ExpressionAndCondition", "group": "Health", - "name": "DamageCooldownDuration", - "sentence": "", + "name": "PreviousDamageTaken", + "sentence": "the health damage taken from most recent hit", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16586,7 +19930,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyDamageCooldown()" + "Object.Behavior::PropertyDamageToBeApplied()" ] } ] @@ -16611,12 +19955,12 @@ "objectGroups": [] }, { - "description": "Current health points of the object.", - "fullName": "Health points", - "functionType": "Expression", - "group": "Health", - "name": "Health", - "sentence": "", + "description": "the maximum shield points of the object.", + "fullName": "Maximum shield points", + "functionType": "ExpressionAndCondition", + "group": "Shield configuration", + "name": "MaxShield", + "sentence": "the maximum shield points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16627,7 +19971,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCurrentHealth()" + "Object.Behavior::PropertyMaxShieldPoints()" ] } ] @@ -16652,11 +19996,10 @@ "objectGroups": [] }, { - "description": "Delay before health regeneration starts after last being hit (seconds).", - "fullName": "Health regeneration delay", - "functionType": "Expression", - "group": "Health", - "name": "HealthRegenDelay", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxShield", + "name": "SetMaxShieldOp", "sentence": "", "events": [ { @@ -16665,18 +20008,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Health::Health::SetPropertyMaxShieldPoints" }, "parameters": [ - "Object.Behavior::PropertyHealthRegenDelay()" + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16688,17 +20031,23 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Maximum shield", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Rate of health regeneration (points per second).", - "fullName": "Rate of health regeneration", - "functionType": "Expression", - "group": "Health", - "name": "HealthRegenRate", - "sentence": "", + "description": "Change the maximum shield points of the object.", + "fullName": "Maximum shield points (deprecated)", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShield", + "private": true, + "sentence": "Change the maximum shield of _PARAM0_ to _PARAM2_ points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16706,18 +20055,19 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Health::Health::SetMaxShieldOp" }, "parameters": [ - "Object.Behavior::PropertyHealthRegenRate()" + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16729,17 +20079,70 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Maximum shield", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Time before damage cooldown ends (seconds).", - "fullName": "Time remaining in damage cooldown", - "functionType": "Expression", - "group": "Health", - "name": "DamageCooldownRemaining", - "sentence": "", + "description": "Change maximum shield points.", + "fullName": "Max shield points (deprecated)", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetMaxShieldPoints", + "private": true, + "sentence": "Change the maximum shield points on _PARAM0_ to _PARAM2_ points", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Health::Health::SetMaxShieldOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + }, + { + "description": "Shield points", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the current shield points of the object.", + "fullName": "Shield points", + "functionType": "ExpressionAndCondition", + "group": "Shield", + "name": "ShieldPoints", + "sentence": "the shield points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16750,40 +20153,55 @@ "value": "SetReturnNumber" }, "parameters": [ - "0" + "Object.Behavior::PropertyCurrentShieldPoints()" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Health::Health", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShieldPoints", + "name": "SetShieldPointsOp", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Health::Health::IsDamageCooldownActive" + "value": "Health::Health::SetPropertyCurrentShieldPoints" }, "parameters": [ "Object", "Behavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "max(0,Object.Behavior::PropertyDamageCooldown() - Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\"))" + "=", + "GetArgumentAsNumber(\"Value\")" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16795,17 +20213,23 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Shield points", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Time since last hit (seconds).", - "fullName": "Time since last hit", - "functionType": "Expression", - "group": "Health", - "name": "TimeSinceLastHit", - "sentence": "", + "description": "Change current shield points. Will not trigger damage cooldown.", + "fullName": "Shield points (deprecated)", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldPoints", + "private": true, + "sentence": "Change current shield points on _PARAM0_ to _PARAM2_ points", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16813,18 +20237,19 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Health::Health::SetShieldPointsOp" }, "parameters": [ - "Object.ObjectTimerElapsedTime(\"__Health.TimeSinceLastHit\")" + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16836,17 +20261,22 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Shield points", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Chance to dodge incoming damage.", - "fullName": "Chance to dodge incoming damage", - "functionType": "Expression", - "group": "Health", - "name": "ChanceToDodge", - "sentence": "", + "description": "the rate of shield regeneration (points per second).", + "fullName": "Rate of shield regeneration", + "functionType": "ExpressionAndCondition", + "group": "Shield configuration", + "name": "ShieldRegenRate", + "sentence": "the rate of shield regeneration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16857,7 +20287,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyChanceToDodge()" + "Object.Behavior::PropertyShieldRegenRate()" ] } ] @@ -16882,11 +20312,10 @@ "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", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShieldRegenRate", + "name": "SetShieldRegenRateOp", "sentence": "", "events": [ { @@ -16895,18 +20324,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Health::Health::SetPropertyShieldRegenRate" }, "parameters": [ - "Object.Behavior::PropertyFlatDamageReduction()" + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16918,17 +20347,23 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Regeneration rate (points per second)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Percent damage reduction from armor. Range: 0 to 1.", - "fullName": "Percent damage reduction from armor", - "functionType": "Expression", - "group": "Health", - "name": "PercentDamageReduction", - "sentence": "", + "description": "Change rate of shield regeneration.", + "fullName": "Shield regeneration rate (deprecated)", + "functionType": "Action", + "group": "Shield configuration", + "name": "SetShieldRegenRate", + "private": true, + "sentence": "Change the shield regeneration rate of _PARAM0_ to _PARAM2_ points per second", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16936,18 +20371,19 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Health::Health::SetShieldRegenRateOp" }, "parameters": [ - "Object.Behavior::PropertyPercentDamageReduction()" + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -16959,17 +20395,22 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" + }, + { + "description": "Regeneration rate (points per second)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Health damage taken from most recent hit.", - "fullName": "Health damage taken from most recent hit", - "functionType": "Expression", - "group": "Health", - "name": "PreviousDamageTaken", - "sentence": "", + "description": "the delay before shield regeneration starts after being hit (seconds).", + "fullName": "Shield regeneration delay", + "functionType": "ExpressionAndCondition", + "group": "Shield configuration", + "name": "ShieldRegenDelay", + "sentence": "the shield regeneration delay", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -16980,7 +20421,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyDamageToBeApplied()" + "Object.Behavior::PropertyShieldRegenDelay()" ] } ] @@ -17005,12 +20446,11 @@ "objectGroups": [] }, { - "description": "Change the maximum shield points of the object.", - "fullName": "Maximum shield points", - "functionType": "Action", - "group": "Shield configuration", - "name": "SetMaxShield", - "sentence": "Change the maximum shield of _PARAM0_ to _PARAM2_ points", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShieldRegenDelay", + "name": "SetShieldRegenDelayOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17018,7 +20458,7 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyMaxShieldPoints" + "value": "Health::Health::SetPropertyShieldRegenDelay" }, "parameters": [ "Object", @@ -17043,7 +20483,7 @@ "type": "behavior" }, { - "description": "Maximum shield", + "description": "Regeneration delay (seconds)", "name": "Value", "type": "expression" } @@ -17051,12 +20491,13 @@ "objectGroups": [] }, { - "description": "Change current shield points. Will not trigger damage cooldown.", - "fullName": "Shield points", + "description": "Change delay before shield regeneration starts after being hit.", + "fullName": "Shield regeneration delay (deprecated)", "functionType": "Action", "group": "Shield configuration", - "name": "SetShieldPoints", - "sentence": "Change current shield points on _PARAM0_ to _PARAM2_ points", + "name": "SetShieldRegenDelay", + "private": true, + "sentence": "Change the shield regeneration delay on _PARAM0_ to _PARAM2_ seconds", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17064,13 +20505,14 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyCurrentShieldPoints" + "value": "Health::Health::SetShieldRegenDelayOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] @@ -17089,7 +20531,7 @@ "type": "behavior" }, { - "description": "Shield points", + "description": "Regeneration delay (seconds)", "name": "Value", "type": "expression" } @@ -17097,12 +20539,12 @@ "objectGroups": [] }, { - "description": "Change rate of shield regeneration.", - "fullName": "Shield regeneration rate", - "functionType": "Action", + "description": "the duration of the shield (seconds). A value of \"0\" means the shield is permanent.", + "fullName": "Duration of shield", + "functionType": "ExpressionAndCondition", "group": "Shield configuration", - "name": "SetShieldRegenRate", - "sentence": "Change the shield regeneration rate of _PARAM0_ to _PARAM2_ points per second", + "name": "ShieldDuration", + "sentence": "the duration of the shield", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17110,18 +20552,18 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyShieldRegenRate" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "Object.Behavior::PropertyShieldDuration()" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -17133,22 +20575,16 @@ "name": "Behavior", "supplementaryInformation": "Health::Health", "type": "behavior" - }, - { - "description": "Regeneration rate (points per second)", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change delay before shield regeneration starts after being hit.", - "fullName": "Shield regeneration delay", - "functionType": "Action", - "group": "Shield configuration", - "name": "SetShieldRegenDelay", - "sentence": "Change the shield regeneration delay on _PARAM0_ to _PARAM2_ seconds", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShieldDuration", + "name": "SetShieldDurationOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17156,7 +20592,7 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyShieldRegenDelay" + "value": "Health::Health::SetPropertyShieldDuration" }, "parameters": [ "Object", @@ -17181,7 +20617,7 @@ "type": "behavior" }, { - "description": "Regeneration delay (seconds)", + "description": "Shield duration (seconds)", "name": "Value", "type": "expression" } @@ -17190,10 +20626,11 @@ }, { "description": "Change duration of shield. Use \"0\" to make shield permanent.", - "fullName": "Duration of shield", + "fullName": "Duration of shield (deprecated)", "functionType": "Action", "group": "Shield configuration", "name": "SetShieldDuration", + "private": true, "sentence": "Change the duration of shield on _PARAM0_ to _PARAM2_ seconds", "events": [ { @@ -17202,13 +20639,14 @@ "actions": [ { "type": { - "value": "Health::Health::SetPropertyShieldDuration" + "value": "Health::Health::SetShieldDurationOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" + "GetArgumentAsNumber(\"Value\")", + "" ] } ] @@ -17238,7 +20676,7 @@ "description": "Renew shield duration to it's full value.", "fullName": "Renew shield duration", "functionType": "Action", - "group": "Shield configuration", + "group": "Shield", "name": "RenewShieldDuration", "sentence": "Renew the shield duration on _PARAM0_", "events": [ @@ -17322,85 +20760,32 @@ "Object", "Behavior", "=", - "min(GetArgumentAsNumber(\"ShieldPoints\"),Object.Behavior::MaxShield())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"RenewShieldDuration\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Health::Health::RenewShieldDuration" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - }, - { - "description": "Shield points", - "name": "ShieldPoints", - "type": "expression" - }, - { - "defaultValue": "yes", - "description": "Renew shield duration", - "name": "RenewShieldDuration", - "optional": true, - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Change maximum shield points.", - "fullName": "Max shield points ", - "functionType": "Action", - "group": "Shield configuration", - "name": "SetMaxShieldPoints", - "sentence": "Change the maximum shield points on _PARAM0_ to _PARAM2_ points", - "events": [ + "min(GetArgumentAsNumber(\"ShieldPoints\"),Object.Behavior::MaxShield())" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"RenewShieldDuration\"" + ] + } + ], "actions": [ { "type": { - "value": "Health::Health::SetPropertyMaxShieldPoints" + "value": "Health::Health::RenewShieldDuration" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "" ] } ] @@ -17420,8 +20805,15 @@ }, { "description": "Shield points", - "name": "Value", + "name": "ShieldPoints", "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Renew shield duration", + "name": "RenewShieldDuration", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] @@ -17765,254 +21157,49 @@ "objectGroups": [] }, { - "description": "Maximum shield points of the object.", - "fullName": "Maximum shield points", - "functionType": "Expression", - "group": "Shield", - "name": "MaxShield", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyMaxShieldPoints()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Duration of the shield (seconds).", - "fullName": "Duration of shield", - "functionType": "Expression", - "group": "Shield", - "name": "ShieldDuration", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyShieldDuration()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Delay before shield regeneration starts after being hit (seconds).", - "fullName": "Shield regeneration delay", - "functionType": "Expression", - "group": "Shield", - "name": "ShieldRegenDelay", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyShieldRegenDelay()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Rate of shield regeneration (points per second).", - "fullName": "Rate of shield regeneration", - "functionType": "Expression", - "group": "Shield", - "name": "ShieldRegenRate", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyShieldRegenRate()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Time before the shield duration ends (seconds).", + "description": "the time before the shield duration ends (seconds).", "fullName": "Time before shield duration ends", - "functionType": "Expression", + "functionType": "ExpressionAndCondition", "group": "Shield", "name": "ShieldTimeRemaining", - "sentence": "", + "sentence": "the time before the shield duration end", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "0" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Health::Health::PropertyShieldDuration" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "max(0,Object.Behavior::PropertyShieldDuration() - Object.ObjectTimerElapsedTime(\"__Health.ShieldDuration\"))" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Health::Health", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Current shield points of the object.", - "fullName": "Shield points", - "functionType": "Expression", - "group": "Shield", - "name": "ShieldPoints", - "sentence": "", - "events": [ + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "0" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "Health::Health::PropertyShieldDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCurrentShieldPoints()" + "max(0,Object.Behavior::PropertyShieldDuration() - Object.ObjectTimerElapsedTime(\"__Health.ShieldDuration\"))" ] } ] @@ -18037,12 +21224,12 @@ "objectGroups": [] }, { - "description": "Shield damage taken from most recent hit.", + "description": "the shield damage taken from most recent hit.", "fullName": "Shield damage taken from most recent hit", - "functionType": "Expression", - "group": "Health", + "functionType": "ExpressionAndCondition", + "group": "Shield", "name": "PreviousDamageToShield", - "sentence": "", + "sentence": "the shield damage taken from most recent hit", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -18078,12 +21265,12 @@ "objectGroups": [] }, { - "description": "Health points gained from previous heal.", + "description": "the health points gained from previous heal.", "fullName": "Health points gained from previous heal", - "functionType": "Expression", + "functionType": "ExpressionAndCondition", "group": "Health", "name": "PreviousHealAmount", - "sentence": "", + "sentence": "the health points gained from previous heal", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -18153,7 +21340,8 @@ { "value": "0", "type": "Number", - "label": "Damage cooldown (seconds) Use \"0\" for no cooldown", + "unit": "Second", + "label": "Damage cooldown", "description": "", "group": "Health", "extraInformation": [], @@ -18183,7 +21371,8 @@ { "value": "0", "type": "Number", - "label": "Delay before health regeneration starts after being hit (seconds)", + "unit": "Second", + "label": "Delay before health regeneration starts after being hit", "description": "", "group": "Health regeneration", "extraInformation": [], @@ -18233,8 +21422,8 @@ { "value": "0", "type": "Number", - "label": "Maximum shield (points) Use \"0\" for no maximum", - "description": "", + "label": "Maximum shield (points)", + "description": "Leave \"0\" for unlimited.", "group": "Shield", "extraInformation": [], "hidden": false, @@ -18243,8 +21432,9 @@ { "value": "5", "type": "Number", - "label": "Duration of shield (seconds) Use \"0\" to make shield permanent", - "description": "", + "unit": "Second", + "label": "Duration of shield", + "description": "Use \"0\" to make the shield permanent.", "group": "Shield", "extraInformation": [], "hidden": false, @@ -18271,9 +21461,10 @@ "name": "BlockExcessDamage" }, { - "value": "", + "value": "0", "type": "Number", - "label": "Delay before shield regeneration starts after being hit (seconds)", + "unit": "Second", + "label": "Delay before shield regeneration starts after being hit", "description": "", "group": "Shield regeneration", "extraInformation": [], @@ -18293,9 +21484,9 @@ { "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", + "label": "Chance to dodge incoming damage (Range: 0 to 1)", + "description": "When a damage is dodged, no damage is applied.", + "group": "Health", "extraInformation": [], "hidden": false, "name": "ChanceToDodge" @@ -18313,8 +21504,8 @@ { "value": "0", "type": "Number", - "label": "Flat damage reduction from armor (incoming damage is reduced by this value)", - "description": "", + "label": "Flat damage reduction from armor", + "description": "Incoming damages are reduced by this value.", "group": "Armor", "extraInformation": [], "hidden": false, @@ -20004,12 +23195,12 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "helpPath": "", + "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.1", + "version": "1.4.4", "description": [ "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", @@ -20689,6 +23880,46 @@ "functionType": "Action", "name": "onDeActivate", "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -22148,7 +25379,7 @@ "type": "object" }, { - "description": "", + "description": "Text", "name": "LabelText", "type": "string" } @@ -22347,7 +25578,7 @@ "fullName": "De/activate interactions", "functionType": "Action", "name": "Activate", - "sentence": "De/activate interactions with _PARAM0_: _PARAM1_", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -22629,32 +25860,22 @@ "author": "Tristan Rhodes (https://victrisgames.itch.io/)", "category": "Visual effect", "extensionNamespace": "", - "fullName": "Shake Object (position, angle, scale)", + "fullName": "Shake object", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", - "shortDescription": "Shake an object, using one or more ways to shake (position, angle, scale).", - "version": "1.5.5", + "shortDescription": "Shake an object.", + "version": "1.5.6", "description": [ - "Select one or more methods of shaking:", - "- Position: Shake the X and/or Y position of the object ", - "- Angle: Shake the angle (rotation) of the object ", - "- Scale: Shake the scale of the object (must be a sprite)", + "Shake an object (position, angle or scale).", "", - "Control how the object shakes:", - "- Amplitude: How far the object moves during each shake", - "- Duration: Amount of time to shake the object", - "- Time between shakes: Amount of time between each movement of the object", - "- Keep shaking until stopped (boolean)", + "It can be used for:", + "- Hit or impact", + "- Object slowly rocking back and forth (like a ship)", + "- Simulate engine vibration, earthquake, or pulsing", "", - "Tips:", - "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", - "- To make the single-shake move in the opposite direction, use negative numbers ", - "- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" ", - "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", - "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", - "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing" + "The top-down RPG example uses this extension for damage animations ([open the project online](https://editor.gdevelop.io/?project=example://top-down-rpg))." ], "origin": { "identifier": "ShakeObject", @@ -22683,7 +25904,7 @@ "objectType": "", "eventsFunctions": [ { - "description": "Shake an object, using one or more ways to shake (position, angle).", + "description": "Shake an object, using one or more ways to shake (position, angle). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", "fullName": "Shake object (position, angle)", "functionType": "Action", "name": "ShakeObject_PositionAngle", @@ -23060,6 +26281,7 @@ }, { "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", "name": "PowerY", "type": "expression" }, @@ -23070,6 +26292,7 @@ }, { "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", "name": "TimeBetweenShakes", "type": "expression" }, @@ -24667,7 +27890,7 @@ "objectType": "Sprite", "eventsFunctions": [ { - "description": "Shake an object, using one or more ways to shake (position, angle, scale).", + "description": "Shake an object, using one or more ways to shake (position, angle, scale). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters.", "fullName": "Shake object (position, angle, scale)", "functionType": "Action", "name": "ShakeObject_PositionAngleScale", @@ -25056,6 +28279,7 @@ }, { "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", "name": "PowerY", "type": "expression" }, @@ -25071,6 +28295,7 @@ }, { "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", "name": "TimeBetweenShakes", "type": "expression" }, @@ -27043,7 +30268,7 @@ "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.2.2", + "version": "0.3.0", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -27063,7 +30288,9 @@ "camera", "scrolling", "follow", - "smooth" + "smooth", + "platformer", + "platform" ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" @@ -28103,7 +31330,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Linear regression vector used by the forcasting.", + "name": "Linear regression vector used by the forecasting.", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -28951,27 +32178,122 @@ ], "objectGroups": [] }, + { + "description": "the camera offset on X axis of the object. This is not the current difference between the object and the camera position.", + "fullName": "Camera offset X", + "functionType": "ExpressionAndCondition", + "group": "Camera configuration", + "name": "OffsetX", + "sentence": "the camera offset on X axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraOffsetX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetX", + "name": "SetOffsetXOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Change the camera offset on X axis of an object.", "fullName": "Camera Offset X", "functionType": "Action", "group": "Camera configuration", "name": "SetOffsetX", + "private": true, "sentence": "Change the camera offset on X axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetXOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SmoothCamera::SmoothCamera::SetOffsetXOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"CameraOffsetX\")" + "GetArgumentAsNumber(\"CameraOffsetX\")", + "" ] } ] @@ -28997,12 +32319,106 @@ ], "objectGroups": [] }, + { + "description": "the camera offset on Y axis of the object. This is not the current difference between the object and the camera position.", + "fullName": "Camera offset Y", + "functionType": "ExpressionAndCondition", + "group": "Camera configuration", + "name": "OffsetY", + "sentence": "the camera offset on Y axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraOffsetY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetY", + "name": "SetOffsetYOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Change the camera offset on Y axis of an object.", "fullName": "Camera Offset Y", "functionType": "Action", "group": "Camera configuration", "name": "SetOffsetY", + "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ { @@ -29011,13 +32427,14 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SmoothCamera::SmoothCamera::SetOffsetYOp" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"CameraOffsetY\")" + "GetArgumentAsNumber(\"CameraOffsetY\")", + "" ] } ] @@ -31126,7 +34543,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Forcasted position", + "name": "Forecasted position", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -31424,6 +34841,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area left border", "description": "", "group": "Position", @@ -31434,6 +34852,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area right border", "description": "", "group": "Position", @@ -31444,6 +34863,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area top border", "description": "", "group": "Position", @@ -31454,6 +34874,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area bottom border", "description": "", "group": "Position", @@ -31464,6 +34885,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Camera offset X", "description": "", "group": "Position", @@ -31474,6 +34896,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Camera offset Y", "description": "", "group": "Position", @@ -31484,7 +34907,8 @@ { "value": "0", "type": "Number", - "label": "Camera delay (in seconds)", + "unit": "Second", + "label": "Camera delay", "description": "", "group": "Timing", "extraInformation": [], @@ -31494,7 +34918,8 @@ { "value": "0", "type": "Number", - "label": "Forcast time (in seconds)", + "unit": "Second", + "label": "Forecast time", "description": "", "group": "Timing", "extraInformation": [], @@ -31504,7 +34929,8 @@ { "value": "0", "type": "Number", - "label": "Forecast history duration (in second)", + "unit": "Second", + "label": "Forecast history duration", "description": "", "group": "Timing", "extraInformation": [], @@ -31774,7 +35200,8 @@ { "value": "9000", "type": "Number", - "label": "Leftward maximum speed (in pixels per second)", + "unit": "PixelSpeed", + "label": "Leftward maximum speed", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -31784,7 +35211,8 @@ { "value": "9000", "type": "Number", - "label": "Rightward maximum speed (in pixels per second)", + "unit": "PixelSpeed", + "label": "Rightward maximum speed", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -31794,7 +35222,8 @@ { "value": "9000", "type": "Number", - "label": "Upward maximum speed (in pixels per second)", + "unit": "PixelSpeed", + "label": "Upward maximum speed", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -31804,7 +35233,8 @@ { "value": "9000", "type": "Number", - "label": "Downward maximum speed (in pixels per second)", + "unit": "PixelSpeed", + "label": "Downward maximum speed", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -32103,6 +35533,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area top in the air", "description": "", "group": "Position", @@ -32113,6 +35544,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area bottom in the air", "description": "", "group": "Position", @@ -32123,6 +35555,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area top on the floor", "description": "", "group": "Position", @@ -32133,6 +35566,7 @@ { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Follow free area bottom on the floor", "description": "", "group": "Position", @@ -32143,7 +35577,7 @@ { "value": "0.95", "type": "Number", - "label": "Upward speed in the air (in ratio persecond)", + "label": "Upward speed in the air (in ratio per second)", "description": "", "group": "Catch-up speed", "extraInformation": [], @@ -32153,7 +35587,7 @@ { "value": "0.95", "type": "Number", - "label": "Downward speed in the air (in ratio persecond)", + "label": "Downward speed in the air (in ratio per second)", "description": "", "group": "Catch-up speed", "extraInformation": [], @@ -32163,7 +35597,7 @@ { "value": "0.9", "type": "Number", - "label": "Upward speed on the floor (in ratio persecond)", + "label": "Upward speed on the floor (in ratio per second)", "description": "", "group": "Catch-up speed", "extraInformation": [], @@ -32173,7 +35607,7 @@ { "value": "0.9", "type": "Number", - "label": "Downward speed on the floor (in ratio persecond)", + "label": "Downward speed on the floor (in ratio per second)", "description": "", "group": "Catch-up speed", "extraInformation": [], @@ -32183,7 +35617,8 @@ { "value": "9000", "type": "Number", - "label": "Upward maximum speed in the air (in pixels per second)", + "unit": "PixelSpeed", + "label": "Upward maximum speed in the air", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -32193,7 +35628,8 @@ { "value": "9000", "type": "Number", - "label": "Downward maximum speed in the air (in pixels per second)", + "unit": "PixelSpeed", + "label": "Downward maximum speed in the air", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -32203,7 +35639,8 @@ { "value": "9000", "type": "Number", - "label": "Upward maximum speed on the floor (in pixels per second)", + "unit": "PixelSpeed", + "label": "Upward maximum speed on the floor", "description": "", "group": "Maximum speed", "extraInformation": [], @@ -32213,7 +35650,8 @@ { "value": "9000", "type": "Number", - "label": "Downward maximum speed on the floor (in pixels per second)", + "unit": "PixelSpeed", + "label": "Downward maximum speed on the floor", "description": "", "group": "Maximum speed", "extraInformation": [],