From 40912da491232d3d1266d327b3fae979ceca9a6b Mon Sep 17 00:00:00 2001 From: PetLimpet Date: Sat, 7 Mar 2026 08:34:10 +0000 Subject: [PATCH] Automated Extension submission for issue #2060 --- extensions/community/ExplosionGenerator.json | 5071 ++++++++++++++++++ 1 file changed, 5071 insertions(+) create mode 100644 extensions/community/ExplosionGenerator.json diff --git a/extensions/community/ExplosionGenerator.json b/extensions/community/ExplosionGenerator.json new file mode 100644 index 000000000..5e51db2ae --- /dev/null +++ b/extensions/community/ExplosionGenerator.json @@ -0,0 +1,5071 @@ +{ + "author": "", + "category": "Visual effect", + "dimension": "", + "extensionNamespace": "", + "fullName": "Explosion Generator", + "gdevelopVersion": "", + "helpPath": "http://petlimpet.com", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNlbGVjdGlvbi1lbGxpcHNlIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYuMzUsMjAuMjVMNy41NiwxOC42NkM4LjQyLDE5LjIzIDkuMzksMTkuNjQgMTAuNDMsMTkuODVMMTAuMTYsMjEuODNDOC43NywyMS41NyA3LjUsMjEgNi4zNSwyMC4yNU0xNi40MywxOC42NkwxNy42NCwyMC4yNkMxNi41LDIxLjAzIDE1LjIzLDIxLjU3IDEzLjg0LDIxLjgzTDEzLjU3LDE5Ljg1QzE0LjYxLDE5LjY0IDE1LjU3LDE5LjIzIDE2LjQzLDE4LjY2TTE5Ljg0LDEzLjU5TDIxLjgzLDEzLjg2QzIxLjU3LDE1LjI1IDIxLDE2LjU0IDIwLjI0LDE3LjY2TDE4LjY1LDE2LjQ1QzE5LjIyLDE1LjYgMTkuNjMsMTQuNjMgMTkuODQsMTMuNTlNMi4xNywxMy44NEw0LjE1LDEzLjU3QzQuMzYsMTQuNjEgNC43NywxNS41OCA1LjM0LDE2LjQ0TDMuNzUsMTcuNjVDMywxNi41IDIuNDMsMTUuMjMgMi4xNywxMy44NE0xOC42Niw3LjU2TDIwLjI1LDYuMzVDMjEuMDMsNy41IDIxLjU4LDguNzggMjEuODMsMTAuMThMMTkuODUsMTAuNDVDMTkuNjQsOS40IDE5LjIzLDguNDIgMTguNjYsNy41Nk0xMy41Nyw0LjE1TDEzLjg0LDIuMTdDMTUuMjMsMi40MyAxNi41LDMgMTcuNjUsMy43NUwxNi40NCw1LjM0QzE1LjU4LDQuNzcgMTQuNjEsNC4zNiAxMy41Nyw0LjE1TTcuNTYsNS4zNEw2LjM1LDMuNzVDNy41LDMgOC43NywyLjQzIDEwLjE2LDIuMTdMMTAuNDMsNC4xNUM5LjM5LDQuMzYgOC40Miw0Ljc3IDcuNTYsNS4zNE00LjE1LDEwLjQzTDIuMTcsMTAuMTZDMi40Myw4Ljc3IDMsNy41IDMuNzUsNi4zNUw1LjM0LDcuNTZDNC43Nyw4LjQyIDQuMzYsOS4zOSA0LjE1LDEwLjQzWiIgLz48L3N2Zz4=", + "name": "ExplosionGenerator", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f4483ab5335feec260238617607bdf07a552561cfad04ace687d22ca52df668b_selection-ellipse.svg", + "shortDescription": "Generate mathematical patterns of any object and set their velocity, trajectory and rotation etc.\nThis extension is designed as an alternative to the 2D particle emitter. It was created in order to achieve some of the things that you can't do with the particle emitter. You can create patterns of any object and then attaching the play function to that object which increases and decreases the forces that you've set in the parameters according to the duration period.", + "version": "0.0.0", + "description": [ + "This extension can be used to generate defender style explosions or patterns of any object in X,Y.", + "You need to trigger an explosion once and have 'Run Explosion' in the events every frame to PLAY it", + "There are 5 'Any Object' functions to choose from.", + "Circle: Generate a chosen quantity of objects in a circle, at a positions, with a give velocity etc", + "Star: Generate a pattern of objects at the points of a star. The number of points is determined by the number of objects", + "Arc: Generate an Arc of objects", + "Polygon: Generate an n sided exploding polygon", + "Radiating Lines: Similar to Polygon but you can change the angle of the sides.", + "", + "There are also Two Functions that relate to 'Sprite Only' explosions designed to produce a fake 3d explosion.", + "Play these with 'Run Fake 3D Explosion'.", + "", + "contact me via website if you're having issues (extension related issues).", + "" + ], + "tags": [ + "Particle Emitter", + "Explosion", + "Patterns" + ], + "authorIds": [ + "A1DuNPnzTNY6songfNVeWUSkdCV2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "name": "sort", + "type": "number", + "value": 0 + }, + { + "name": "add_angle", + "type": "number", + "value": 0 + }, + { + "name": "random", + "type": "number", + "value": 0 + }, + { + "name": "inout", + "type": "boolean", + "value": false + }, + { + "name": "innersub", + "type": "number", + "value": 0 + }, + { + "name": "offsetsubtract", + "type": "number", + "value": 0 + }, + { + "name": "polyside", + "type": "number", + "value": 0 + }, + { + "name": "polyyang", + "type": "number", + "value": 0 + }, + { + "name": "partsperside", + "type": "number", + "value": 0 + }, + { + "name": "polyx", + "type": "number", + "value": 0 + }, + { + "name": "polyy", + "type": "number", + "value": 0 + }, + { + "name": "polyangle", + "type": "number", + "value": 0 + }, + { + "name": "sort2", + "type": "number", + "value": 0 + }, + { + "name": "polysub", + "type": "number", + "value": 0 + }, + { + "name": "polytwinkletoggle", + "type": "boolean", + "value": false + }, + { + "name": "polyb", + "type": "number", + "value": 0 + }, + { + "name": "distancep", + "type": "number", + "value": 0 + }, + { + "name": "omega", + "type": "number", + "value": 0 + }, + { + "name": "randomchoice", + "type": "number", + "value": 0 + }, + { + "name": "r", + "type": "number", + "value": 0 + }, + { + "name": "g", + "type": "number", + "value": 0 + }, + { + "name": "b", + "type": "number", + "value": 0 + }, + { + "name": "tint", + "type": "string", + "value": "\"None\"" + }, + { + "name": "decay_delta", + "type": "number", + "value": 0 + }, + { + "name": "decay_deltaq", + "type": "number", + "value": 0 + }, + { + "name": "spiral", + "type": "number", + "value": 1 + }, + { + "name": "angletocenter", + "type": "number", + "value": 0 + }, + { + "name": "SetDeleteTimer", + "type": "number", + "value": 0 + } + ], + "eventsFunctions": [ + { + "description": "Generate Circular Explosion of any object.", + "fullName": "Generate Circular Explosion", + "functionType": "Action", + "group": "Any Object", + "name": "CreateCircleExplosion", + "sentence": "Generate _PARAM1_ Circular explosion generating _PARAM2_ objects after _PARAM3_ seconds at _PARAM4_ x and _PARAM5_ y at a distance of _PARAM6_ pixels with an initial speed of _PARAM7_ pixels per second. With _PARAM8_ rotation (degrees/sec) and _PARAM9_ rotation force (pixels/sec) with gravity force _PARAM10_ pixels per second with gravity at angle _PARAM11_ degrees and with a lifetime of _PARAM12_ seconds on layer _PARAM13_ with random variation _PARAM14_ (use between 0 and 30) and twinkling _PARAM15_ and finally decay speed at a rate of _PARAM16_ (use between 0 and 30)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "delay" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "add_angle", + "=", + "360/quantity" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "quantity", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "CenterX+XFromAngleAndDistance(add_angle*sort,distance)+random", + "CenterY+YFromAngleAndDistance(add_angle*sort,distance)+random", + "layer" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "add_angle*sort+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/20)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+(random*10)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "decay_rate" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Gravity", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Time Delay (secs)", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "distance (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "speed from center (pixels per sec)", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation (degrees pre second)", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force (pixels per second)", + "name": "RotationF", + "type": "expression" + }, + { + "description": "gravity (pixels per second)", + "name": "gravity", + "type": "expression" + }, + { + "description": "gravity angle (degrees eg 90)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random (between 0 and 30)", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "Speed Decay Rate (between 1 and 30)", + "name": "decay_rate", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate Star explosion of any object.", + "fullName": "Generate Star Explosion", + "functionType": "Action", + "group": "Any Object", + "name": "CreateStarExplosion", + "sentence": "Generate _PARAM1_ explosion , generating a star with _PARAM2_ points, and inner displacement _PARAM3_ (distance between inner and outer ring of points) with the stars angle offset by_PARAM4_degrees. Spawn objects after _PARAM5_ seconds delay at _PARAM6_ x and _PARAM7_ y at a distance of _PARAM8_ pixels from the center, with an initial speed of _PARAM9_ pixels/second With _PARAM10_ rotation and _PARAM11_ rotation force (pixels/second). With gravity _PARAM12_ with gravity at angle _PARAM13_ Particle lifetime of _PARAM14_ seconds, created on layer _PARAM15_ with random variation _PARAM16_ and twinkling _PARAM17_ and finally decay speed at a rate of _PARAM18_(use between 1 and 20)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "delay" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "add_angle", + "=", + "360/(points*2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "points*2", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "CenterX+XFromAngleAndDistance(Offset+(add_angle*sort),(distance-innersub))+random", + "CenterY+YFromAngleAndDistance(Offset+(add_angle*sort),distance-innersub)+random", + "layer" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "Offset+(add_angle*sort)+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/20)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Gravity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "decay_rate" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "inout", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "innersub", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "inout", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "innersub", + "=", + "Inner" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "inout", + "Toggle", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "points", + "name": "points", + "type": "expression" + }, + { + "description": "Inner Displacement (pixels)", + "name": "Inner", + "type": "expression" + }, + { + "description": "Offset Angle (degrees)", + "name": "Offset", + "type": "expression" + }, + { + "description": "Time Delay (secs)", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "distance (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "speed from center", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation (degrees per second)", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force (pixels per sec)", + "name": "RotationF", + "type": "expression" + }, + { + "description": "Gravity Force (pixels per second)", + "name": "gravity", + "type": "expression" + }, + { + "description": "gravity angle (degrees eg 90)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random (use between 0 and 30)", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "speed Speed Decay Rate (use between 1 and 30)", + "name": "decay_rate", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate Arc Explosion of any object.", + "fullName": "Generate Arc Explosion (Any Object)", + "functionType": "Action", + "group": "Any Object", + "name": "CreateArcExplosion", + "sentence": "Generate _PARAM1_ explosion , generating an arc of _PARAM2_ particles _PARAM3_ degrees wide at angle of_PARAM4_degrees. Spawn after_PARAM5_seconds delay at_PARAM6_x and_PARAM7_y at a distance of _PARAM8_ pixels with an initial speed of _PARAM9_ (pixels per second) and_PARAM10_rotation (degrees per sec) and_PARAM11_rotation force (pixels per sec). With gravity _PARAM12_ (pixels per sec) with gravity at angle _PARAM13_ (degrees) with a lifetime of _PARAM14_ (seconds) on layer _PARAM15_ with random variation _PARAM16_ (use between 1 and 30) and twinkling _PARAM17_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "delay" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "add_angle", + "=", + "Arc/quantity" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "quantity", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "CenterX+XFromAngleAndDistance(Offset-(Arc/2)+(add_angle*sort),distance+random)", + "CenterY+YFromAngleAndDistance(Offset-(Arc/2)+(add_angle*sort),distance+random)", + "layer" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "Offset-(Arc/2)+(add_angle*sort)+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/40)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Gravity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Arc Length (degrees)", + "name": "Arc", + "type": "expression" + }, + { + "description": "Arc Angle (degrees)", + "name": "Offset", + "type": "expression" + }, + { + "description": "Time Delay", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "distance (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "speed from center (pixels per sec)", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force (pixels per sec)", + "name": "RotationF", + "type": "expression" + }, + { + "description": "gravity (pixels per sec)", + "name": "gravity", + "type": "expression" + }, + { + "description": "gravity angle (degrees eg 90)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (seconds)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Generate Radiating Lines Explosion for any object.", + "fullName": "Generate Radiating Lines Explosion", + "functionType": "Action", + "group": "Any Object", + "name": "CreateRadiatingLinesExplosion", + "sentence": "Generate _PARAM1_ explosion , generating a lines with a total of _PARAM2_ particles, with _PARAM3_ lines offset at an of _PARAM4_ degrees. Spawn after _PARAM5_ seconds delay at _PARAM6_ x and _PARAM7_ y at a distance of _PARAM8_ pixels with an initial speed of _PARAM9_ (pixels per sec) and _PARAM10_ rotation (degrees per second) and _PARAM11_ rotation force (pixels per second) With gravity force _PARAM12_ (pixels per second) with gravity at angle _PARAM13_ (degrees) with a lifetime of _PARAM14_ seconds on layer_PARAM15_with random variation _PARAM16_ (between 0 and 30) and twinkling _PARAM17_ and finally decay speed at a rate of _PARAM18_ (between 1 and 30)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "partsperside", + "=", + "trunc(quantity/sides)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyyang", + "=", + "360-(360/sides)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyside", + "=", + "distance/sides*6" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polysub", + "=", + "polyside/partsperside" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "sides", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyx", + "=", + "CenterX + XFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyy", + "=", + "CenterY + YFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "partsperside", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "polyx + XFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+Offset,polysub*sort*2) + random", + "polyy + YFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+Offset,polysub*sort*2) + random", + "layer" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "AngleBetweenPositions(particle.X(),particle.Y(),CenterX,CenterY)-180+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/40)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "speed_decay" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "Toggle", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "Quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Number of Lines", + "name": "sides", + "type": "expression" + }, + { + "description": "Lines Offset angle (degrees)", + "name": "Offset", + "type": "expression" + }, + { + "description": "Time Delay (secs)", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "Distance from Center (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "Speed from Center (pixels per sec)", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation (degrees per sec)", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force (pixels per sec)", + "name": "RotationF", + "type": "expression" + }, + { + "description": "Gravity Force (pixels per sec)", + "name": "gravity", + "type": "expression" + }, + { + "description": "gravity angle (degrees eg 90)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random (use between 0 and 30)", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "speed decay rate (between 1 and 30)", + "name": "speed_decay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a Spiral Explosion of any object.", + "fullName": "Generate Spiral Explosion", + "functionType": "Action", + "group": "Any Object", + "name": "CreateSpiralExplosion", + "sentence": "Generate _PARAM1_ explosion , generating a lines with a total of _PARAM2_ particles, with _PARAM3_ lines spirraling at increment of _PARAM4_ degrees (uses between -10 and 10) Spawn after _PARAM5_ seconds delay at _PARAM6_ x and _PARAM7_ y at a distance of _PARAM8_ pixels with an initial speed of _PARAM9_ (pixels per sec) and _PARAM10_ object rotation (degrees per second) and _PARAM11_ object central rotation speed (degrees per second). With gravity force _PARAM12_ (pixels per second) with gravity at angle _PARAM13_ (degrees) with a lifetime of _PARAM14_ seconds on layer_PARAM15_with random variation _PARAM16_ (between 0 and 30) and twinkling _PARAM17_ and finally decay speed at a rate of _PARAM18_ (between 1 and 30)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "partsperside", + "=", + "trunc(quantity/sides)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyyang", + "=", + "360-(360/sides)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyside", + "=", + "distance*6/sides" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polysub", + "=", + "polyside/partsperside" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "sides", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyx", + "=", + "CenterX + XFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyy", + "=", + "CenterY + YFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "spiral", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "partsperside", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "polyx + XFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+spiral+180,(polysub*sort*2)+spiral) + random", + "polyy + YFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+spiral+180,(polysub*sort*2)+spiral) + random", + "layer" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/40)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "Obj_Rotation + (random * 5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "Central_Rotaion + (random * 5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "speed_decay" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "spiral", + "+", + "Offset" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "True" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.CenterX", + "=", + "CenterX" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.CenterY", + "=", + "CenterY" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "AngleBetweenPositions(particle.X(),particle.Y(),CenterX,CenterY)-180+random" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "Toggle", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "Quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Number of Lines", + "name": "sides", + "type": "expression" + }, + { + "description": "Lines Offset angle (degrees)", + "name": "Offset", + "type": "expression" + }, + { + "description": "Time Delay (secs)", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "Distance from Center (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "Speed from Center (pixels per sec)", + "name": "speed", + "type": "expression" + }, + { + "description": "Object Rotation (degrees per sec)", + "name": "Obj_Rotation", + "type": "expression" + }, + { + "description": "Central Rotation (degrees per sec)", + "name": "Central_Rotaion", + "type": "expression" + }, + { + "description": "Gravity Force (pixels per sec)", + "name": "gravity", + "type": "expression" + }, + { + "description": "gravity angle (degrees eg 90)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random (use between 0 and 30)", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "speed decay rate (between 1 and 30)", + "name": "speed_decay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a Polygon Explosion for any object.", + "fullName": "Generate Polygon Explosion", + "functionType": "Action", + "group": "Any Object", + "name": "CreatePolygonExplosion", + "sentence": "Generate _PARAM1_ explosion , generating a ploygon of _PARAM2_ particles, with _PARAM3_ sides offset at an of _PARAM4_ degrees. Spawn after _PARAM5_ seconds delay at _PARAM6_ x and _PARAM7_ y at a distance of _PARAM8_ pixels with an initial speed of _PARAM9_ and _PARAM10_ with rotation speed and _PARAM11_ rotation force (pixels per sec) With gravity force (pixels per sec)_PARAM12_with gravity at angle _PARAM13_ degrees with a lifetime of _PARAM14_ seconds on layer_PARAM15_ with random variation _PARAM16_ (use between 0 and 30 and twinkling _PARAM17_ and finally decay speed at a rate of _PARAM18_ (between 1 and 30)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "partsperside", + "=", + "round(quantity/sides)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyb", + "=", + "360/sides" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyyang", + "=", + "360-polyb" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyangle", + "=", + "(180-polyyang)/2" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyside", + "=", + "distance*6/sides" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polysub", + "=", + "polyside/partsperside" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "sides", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyx", + "=", + "CenterX + XFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "polyy", + "=", + "CenterY + YFromAngleAndDistance(Offset+(polyyang*sort2),distance)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "partsperside", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle", + "polyx + XFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+90-(polyyang/2),polysub*sort) + random", + "polyy + YFromAngleAndDistance(AngleBetweenPositions(polyx,polyy,CenterX,CenterY)+90-(polyyang/2),polysub*sort) + random", + "layer" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Angle", + "=", + "AngleBetweenPositions(particle.X(),particle.Y(),CenterX,CenterY)-180+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "speed+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/20)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Gravity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.GravityMax", + "=", + "gravity+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "decay_rate" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.SpeedDecay", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "polytwinkletoggle", + "Toggle", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort2", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle", + "type": "objectList" + }, + { + "description": "quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Number of sides", + "name": "sides", + "type": "expression" + }, + { + "description": "Shape angle offset (degrees)", + "name": "Offset", + "type": "expression" + }, + { + "description": "Time Delay (secs)", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "Distance From Center (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "speed from center (pixels per sec)", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force", + "name": "RotationF", + "type": "expression" + }, + { + "description": "Gravity Force (pixels per sec)", + "name": "gravity", + "type": "expression" + }, + { + "description": "Gravity Angle (degrees)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "random", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "speed decay rate", + "name": "decay_rate", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Run Explosion for the object (any object).", + "fullName": "Run Explosion for Any Object", + "functionType": "Action", + "group": "Any Object", + "name": "RunExplosion", + "sentence": "Run Explossion events for object _PARAM1_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "particle", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "particle", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "decay_delta", + "=", + "(particle.Variable(__ExplosionGen.Lifespan)/400)*(TimeDelta()*60)*particle.Variable(__ExplosionGen.SpeedDecay)" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle", + "particle.Variable(__ExplosionGen.Angle)", + "particle.Variable(__ExplosionGen.Speed)", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Gravity", + "=", + "lerp(particle.Variable(__ExplosionGen.Gravity),particle.Variable(__ExplosionGen.GravityMax),decay_delta)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.Speed", + "=", + "lerp(particle.Variable(__ExplosionGen.Speed),0,decay_delta)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "angletocenter", + "=", + "AngleBetweenPositions(particle.Variable(__ExplosionGen.CenterX),particle.Variable(__ExplosionGen.CenterY),particle.X(),particle.Y())-180" + ] + }, + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "particle", + "particle.Variable(__ExplosionGen.RotationSpeed)", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle", + "angletocenter-90", + "particle.Variable(__ExplosionGen.RotationForce)", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle", + "angletocenter", + "particle.Variable(__ExplosionGen.Gravity)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Spiral", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle", + "particle.Variable(__ExplosionGen.GravityAng)", + "particle.Variable(__ExplosionGen.Gravity)", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle", + "particle.Angle()+90", + "particle.Variable(__ExplosionGen.RotationForce)", + "" + ] + }, + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "particle", + "particle.Variable(__ExplosionGen.RotationSpeed)", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationForce", + "=", + "lerp(particle.Variable(__ExplosionGen.RotationForce),0,decay_delta/4)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle", + "__ExplosionGen.RotationSpeed", + "=", + "lerp(particle.Variable(__ExplosionGen.RotationSpeed),0,decay_delta/4)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.Twinkle", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"", + ">", + "particle.Variable(__ExplosionGen.TwinkleTime)" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "particle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "particle", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"", + ">", + "particle.Variable(__ExplosionGen.TwinkleTime)*2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "particle", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "particle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle", + "\"ExplosionGenTwinkle\"" + ] + }, + { + "type": { + "value": "ToggleObjectVariableAsBoolean" + }, + "parameters": [ + "particle", + "__ExplosionGen.TwinkleToggle" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle", + "particle.VariableString(__ExplosionGen.TimerName)", + ">", + "particle.Variable(__ExplosionGen.Lifespan)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "particle", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Particle", + "name": "particle", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a Fake 3D Sprite explosion.", + "fullName": "Generate Fake 3D Explosion", + "functionType": "Action", + "group": "Sprites Only", + "name": "Fake3DSpriteExplosion", + "sentence": "Generate_PARAM1_Sprite explosion. generating _PARAM2_ objects after _PARAM3_ seconds at _PARAM4_ x and _PARAM5_ y at a distance of _PARAM6_ pixels with an initial speed of _PARAM7_ pixels per sec and with _PARAM8_ object rotation (degrees per sec) and _PARAM9_ rotation force (pixels per sec) With gravity force _PARAM10_ (pixels per sec) with gravity at angle _PARAM11_ degrees with a lifetime of _PARAM12_ seconds on layer _PARAM13_ with random variation _PARAM14_ and twinkling _PARAM15_ and fade opacity? _PARAM16_ and decay speed at a rate of _PARAM17_ (between 1 and 20) with a central z order of_PARAM18_(use zero to set all sprites to same z) and tint effect _PARAM19_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "delay" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "=", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "add_angle", + "=", + "360/quantity" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "tint", + "=", + "Tint" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "quantity", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "random", + "=", + "RandomInRange(Variation*-1,Variation)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "omega", + "=", + "nthroot(RandomFloatInRange(0.02,.98),3)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "distancep", + "=", + "distance*omega" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "particle2", + "CenterX+XFromAngleAndDistance(add_angle*sort,distancep)+random", + "CenterY+YFromAngleAndDistance(add_angle*sort,distancep)+random", + "layer" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Angle", + "=", + "add_angle*sort+random" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Lifespan", + "=", + "lifetime+(random/20)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.GravityAng", + "=", + "gravityangle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.GravityMax", + "=", + "gravity+(random*10)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Gravity", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.RotationSpeed", + "=", + "rotation+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.RotationForce", + "=", + "RotationF+(random*5)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Twinkle", + "=", + "Twinkle" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleTime", + "=", + "lifetime/100" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.SpeedDecay", + "=", + "decay_rate" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scaleto", + "=", + "distancep" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scale", + "=", + "1" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Fade", + "=", + "fade" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "randomchoice", + "=", + "RandomInRange(0,1)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Speed", + "=", + "speed*omega" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.SpeedMax", + "=", + "speed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "randomchoice", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scaleto", + "=", + "1-(1-omega)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "randomchoice", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scaleto", + "=", + "1+(1-omega)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "centralz", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "particle2", + "=", + "centralz+(particle2.Variable(ExplosionGen.Scaleto)*10)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle2", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TimerName", + "=", + "\"ExplosionGenDelete\"+SetDeleteTimer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scale", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scale", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "sort", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Twinkle", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle2", + "\"ExplosionGenTwinkle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + ">", + "50" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SetDeleteTimer", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "particle", + "name": "particle2", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Quantity", + "name": "quantity", + "type": "expression" + }, + { + "description": "Time Delay", + "name": "delay", + "type": "expression" + }, + { + "description": "X Position", + "name": "CenterX", + "type": "expression" + }, + { + "description": "Y Position", + "name": "CenterY", + "type": "expression" + }, + { + "description": "Distance (pixels)", + "name": "distance", + "type": "expression" + }, + { + "description": "Speed From Center (pixels per second)", + "name": "speed", + "type": "expression" + }, + { + "description": "Rotation Speed (degrees per sec)", + "name": "rotation", + "type": "expression" + }, + { + "description": "Rotation Force (pixels per sec)", + "name": "RotationF", + "type": "expression" + }, + { + "description": "Gravity Force (pixels per sec)", + "name": "gravity", + "type": "expression" + }, + { + "description": "Gravity Angle (degrees)", + "name": "gravityangle", + "type": "expression" + }, + { + "description": "Lifetime of object (secs)", + "name": "lifetime", + "type": "expression" + }, + { + "description": "Layer", + "name": "layer", + "type": "layer" + }, + { + "description": "Random Variation (use between 0 and 30)", + "name": "Variation", + "type": "expression" + }, + { + "description": "Twinkling", + "name": "Twinkle", + "type": "yesorno" + }, + { + "description": "Fade?", + "name": "fade", + "type": "yesorno" + }, + { + "description": "Speed Decay rate (try 6!)", + "name": "decay_rate", + "type": "expression" + }, + { + "description": "Z order at center (use 0 to give all objects same z)", + "name": "centralz", + "type": "expression" + }, + { + "description": "Tint - changes with speed etc", + "name": "Tint", + "supplementaryInformation": "[\"Red To Blue/green\",\"None\",\"Blue To Orange\",\"Red To Pink\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Run Fake 3D sprite Explosion.", + "fullName": "Run Fake 3D Sprite Explosion", + "functionType": "Action", + "group": "Sprites Only", + "name": "RunFake3DSpriteExplosion", + "sentence": "Run Fake 3D Explosion events for object_PARAM1_sprites only", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "particle2", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "particle2", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "decay_delta", + "=", + "(particle2.Variable(__ExplosionGen.Lifespan)/400)*(TimeDelta()*60)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "decay_deltaq", + "=", + "decay_delta*particle2.Variable(__ExplosionGen.SpeedDecay)" + ] + }, + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "particle2", + "Scale", + "=", + "particle2.Variable(__ExplosionGen.Scale)" + ] + }, + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "particle2", + "particle2.Variable(__ExplosionGen.RotationSpeed)", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Gravity", + "=", + "lerp(particle2.Variable(__ExplosionGen.Gravity), particle2.Variable(__ExplosionGen.GravityMax), decay_delta)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Speed", + "=", + "lerp(particle2.Variable(__ExplosionGen.Speed), 0, decay_deltaq)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Scale", + "=", + "lerp(particle2.Variable(__ExplosionGen.Scale), particle2.Variable(__ExplosionGen.Scaleto), decay_delta*4)" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle2", + "particle2.Angle() + 90", + "particle2.Variable(__ExplosionGen.RotationForce)", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle2", + "particle2.Variable(__ExplosionGen.GravityAng)", + "particle2.Variable(__ExplosionGen.Gravity)*particle2.Scale::Value()", + "" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "particle2", + "particle2.Variable(__ExplosionGen.Angle)", + "particle2.Variable(__ExplosionGen.Speed)", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "changed gravity angle to angle above" + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.RotationForce", + "=", + "lerp(particle2.Variable(__ExplosionGen.RotationForce),0,decay_deltaq/4)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "particle2", + "__ExplosionGen.RotationSpeed", + "=", + "lerp(particle2.Variable(__ExplosionGen.RotationSpeed),0,decay_deltaq/4)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "tint", + "=", + "\"Red To Blue/green\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "particle2", + "ToString(clamp((abs(particle2.Variable(__ExplosionGen.Speed))/(abs(particle2.Variable(__ExplosionGen.SpeedMax))+.1))*255,0,255))+\";\"+ToString(clamp((particle2.Variable(__ExplosionGen.Scale))*180,0,255))+\";\"+ToString(clamp((abs(particle2.Variable(__ExplosionGen.Gravity))/(abs(particle2.Variable(__ExplosionGen.GravityMax))+.1))*255,0,255))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "tint", + "=", + "\"Blue To Orange\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "particle2", + "ToString(clamp((abs(particle2.Variable(__ExplosionGen.Gravity))/(abs(particle2.Variable(__ExplosionGen.GravityMax))+.1))*255,0,255))+\";\"+ToString(clamp((particle2.Variable(__ExplosionGen.Scale))*180,0,255))+\";\"+ToString(clamp((abs(particle2.Variable(__ExplosionGen.Speed))/(abs(particle2.Variable(__ExplosionGen.SpeedMax))+.1))*255,0,255))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "tint", + "=", + "\"Red To Pink\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "particle2", + "ToString(clamp((particle2.Variable(__ExplosionGen.Scale))*180,0,255))+\";\"+ToString(clamp((abs(particle2.Variable(__ExplosionGen.Speed))/(abs(particle2.Variable(__ExplosionGen.SpeedMax))+.1))*255,0,255))+\";\"+ToString(clamp((abs(particle2.Variable(__ExplosionGen.Gravity))/(abs(particle2.Variable(__ExplosionGen.GravityMax))+.1))*255,0,255))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Fade", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "particle2", + "Opacity", + "-", + "1/particle2.Scale::Value()/particle2.Variable(__ExplosionGen.Lifespan)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Twinkle", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle2", + "\"ExplosionGenTwinkle\"", + ">", + "particle2.Variable(__ExplosionGen.TwinkleTime)" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.Fade", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "particle2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "particle2", + "" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle2", + "\"ExplosionGenTwinkle\"", + ">", + "particle2.Variable(__ExplosionGen.TwinkleTime) * 2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "particle2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "particle2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "particle2", + "\"ExplosionGenTwinkle\"" + ] + }, + { + "type": { + "value": "ToggleObjectVariableAsBoolean" + }, + "parameters": [ + "particle2", + "__ExplosionGen.TwinkleToggle" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "particle2", + "particle2.VariableString(__ExplosionGen.TimerName)", + ">", + "particle2.Variable(__ExplosionGen.Lifespan)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "particle2", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Particle", + "name": "particle2", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file