diff --git a/extensions/community/CameraShake3D.json b/extensions/community/CameraShake3D.json index 3406adf6..45c30190 100644 --- a/extensions/community/CameraShake3D.json +++ b/extensions/community/CameraShake3D.json @@ -8,7 +8,7 @@ "name": "CameraShake3D", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", "shortDescription": "Shake 3D layer cameras.", - "version": "0.1.0", + "version": "0.2.0", "description": [ "Shake layer cameras on 3 rotations.", "", @@ -33,6 +33,112 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "folded": true, + "name": "DefaultFrequency", + "type": "number", + "value": 24 + }, + { + "folded": true, + "name": "DefaultAmplitudeAngleX", + "type": "number", + "value": 0.5 + }, + { + "folded": true, + "name": "DefaultAmplitudeAngleY", + "type": "number", + "value": 0.5 + }, + { + "folded": true, + "name": "DefaultAmplitudeAngleZ", + "type": "number", + "value": 0.5 + }, + { + "folded": true, + "name": "Duration", + "type": "number", + "value": 0 + }, + { + "name": "Layers", + "type": "structure", + "children": [] + }, + { + "name": "Layer", + "type": "structure", + "children": [ + { + "name": "AmplitudeAngleX", + "type": "number", + "value": 0 + }, + { + "name": "AmplitudeAngleY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeAngleZ", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaAngleX", + "type": "number", + "value": 0 + }, + { + "name": "CameraDeltaAngleY", + "type": "number", + "value": 0 + }, + { + "name": "CameraDeltaAngleZ", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "Frequency", + "type": "number", + "value": 0 + } + ] + }, + { + "folded": true, + "name": "LayerName", + "type": "string", + "value": "" + }, + { + "folded": true, + "name": "Time", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StartEaseDuration", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StopEaseDuration", + "type": "number", + "value": 0 + } + ], "eventsFunctions": [ { "fullName": "", @@ -46,41 +152,51 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Index", + "Index", "=", "0" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "CameraShake3D::LayerCount()", - "conditions": [], - "actions": [ + ], + "events": [ { - "type": { - "value": "CameraShake3D::SetLayerShakable" - }, - "parameters": [ - "", - "", - "CameraShake3D::LayerName(Variable(__CameraShake.Index))", - "" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "CameraShake3D::LayerCount()", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake3D::SetLayerShakable" + }, + "parameters": [ + "", + "", + "CameraShake3D::LayerName(Index)", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } ] - }, + } + ], + "variables": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Index", - "+", - "1" - ] + "folded": true, + "name": "Index", + "type": "number", + "value": 0 } ] } @@ -180,10 +296,10 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Time", + "Time", "+", "TimeDelta()" ] @@ -203,257 +319,47 @@ ] } ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.EaseFactor", - "=", - "1" - ] - } - ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.Time", - "<", - "Variable(__CameraShake.StartEaseDuration)" - ] - }, - { - "type": { - "inverted": true, - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.Time", - ">", - "Variable(__CameraShake.Duration) - Variable(__CameraShake.StopEaseDuration)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.EaseFactor", - "=", - "clamp(0, 1, Variable(__CameraShake.Time) / Variable(__CameraShake.StartEaseDuration))" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.Time", - ">", - "Variable(__CameraShake.Duration) - Variable(__CameraShake.StopEaseDuration)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.EaseFactor", - "=", - "clamp(0, 1, (Variable(__CameraShake.Duration) - Variable(__CameraShake.Time)) / Variable(__CameraShake.StopEaseDuration))" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "__CameraShake.Layers", - "valueIteratorVariableName": "__CameraShake.Layer", - "keyIteratorVariableName": "__CameraShake.LayerName", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].Shakable", - "True" - ] - } - ], + "conditions": [], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__CameraShake.ActualLayerName", - "=", - "VariableString(__CameraShake.LayerName)" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarSceneTxt" + "value": "NumberVariable" }, "parameters": [ - "__CameraShake.LayerName", - "=", - "\"__BaseLayer\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__CameraShake.ActualLayerName", - "=", - "\"\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Default values when there is no layer specific value set." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CameraShake3D::SetFrequency" - }, - "parameters": [ - "", - "24", - "\"\"", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleZ", - "=", - "0.5" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleY", - "=", - "0.5" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleX", - "=", - "0.5" + "Time", + "<", + "StartEaseDuration" ] }, { "type": { - "value": "ModVarScene" + "inverted": true, + "value": "NumberVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleZ", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleX", - "=", - "0" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VariableChildExists" - }, - "parameters": [ - "__CameraShake.Layer", - "\"Frequency\"" + "Time", + ">", + "Duration - StopEaseDuration" ] } ], "actions": [ { "type": { - "value": "CameraShake3D::SetFrequency" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Variable(__CameraShake.Layer.Frequency)", - "\"\"", - "" + "EaseFactor", + "=", + "clamp(Time / StartEaseDuration, 0, 1)" ] } ] @@ -463,205 +369,444 @@ "conditions": [ { "type": { - "value": "VariableChildExists" + "value": "NumberVariable" }, "parameters": [ - "__CameraShake.Layer", - "\"AmplitudeAngleZ\"" + "Time", + ">", + "Duration - StopEaseDuration" ] } ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.AmplitudeAngleZ", + "EaseFactor", "=", - "Variable(__CameraShake.Layer.AmplitudeAngleZ)" + "clamp((Duration - Time) / StopEaseDuration, 0, 1)" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", "conditions": [ { "type": { - "value": "VariableChildExists" + "value": "BooleanVariable" }, "parameters": [ - "__CameraShake.Layer", - "\"AmplitudeAngleY\"" + "Layers[LayerName].Shakable", + "True", + "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleY", - "=", - "Variable(__CameraShake.Layer.AmplitudeAngleY)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "LayerName" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "VariableChildExists" - }, - "parameters": [ - "__CameraShake.Layer", - "\"AmplitudeAngleX\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "\"\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarScene" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "__CameraShake.AmplitudeAngleX", - "=", - "Variable(__CameraShake.Layer.AmplitudeAngleX)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Default values when there is no layer specific value set." + }, { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleZ", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake3D::SetFrequency" + }, + "parameters": [ + "", + "DefaultFrequency", + "\"\"", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleZ", + "=", + "DefaultAmplitudeAngleZ" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleY", + "=", + "DefaultAmplitudeAngleY" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleX", + "=", + "DefaultAmplitudeAngleX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleZ", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleY", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleX", + "=", + "0" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleZ", - "=", - "CameraShake3D::Noise2d(\"\", TimeFromStart(), 1000) * Variable(__CameraShake.AmplitudeAngleZ) * Variable(__CameraShake.EaseFactor)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"Frequency\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CameraShake3D::SetFrequency" + }, + "parameters": [ + "", + "Layer.Frequency", + "\"\"", + "" + ] + } ] }, { - "type": { - "value": "CameraShake3D::SpinCamera" - }, - "parameters": [ - "", - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleZ)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeAngleZ\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleZ", + "=", + "Layer.AmplitudeAngleZ" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleY", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeAngleY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleY", + "=", + "Layer.AmplitudeAngleY" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleY", - "=", - "CameraShake3D::Noise2d(\"\", TimeFromStart(), 2000) * Variable(__CameraShake.AmplitudeAngleY) * Variable(__CameraShake.EaseFactor)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeAngleX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngleX", + "=", + "Layer.AmplitudeAngleX" + ] + } ] }, { - "type": { - "value": "CameraShake3D::TurnCameraHorizontally" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleY)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents." + }, { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__CameraShake.AmplitudeAngleX", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeAngleZ", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleZ", + "=", + "CameraShake3D::Noise2d(\"\", TimeFromStart(), 1000) * AmplitudeAngleZ * EaseFactor" + ] + }, + { + "type": { + "value": "CameraShake3D::SpinCamera" + }, + "parameters": [ + "", + "Layers[LayerName].CameraDeltaAngleZ", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleX", - "=", - "CameraShake3D::Noise2d(\"\", TimeFromStart(), 3000) * Variable(__CameraShake.AmplitudeAngleX) * Variable(__CameraShake.EaseFactor)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeAngleY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleY", + "=", + "CameraShake3D::Noise2d(\"\", TimeFromStart(), 2000) * AmplitudeAngleY * EaseFactor" + ] + }, + { + "type": { + "value": "CameraShake3D::TurnCameraHorizontally" + }, + "parameters": [ + "", + "Layers[LayerName].CameraDeltaAngleY", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + } ] }, { - "type": { - "value": "CameraShake3D::TurnCameraVertically" - }, - "parameters": [ - "", - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleX)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeAngleX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngleX", + "=", + "CameraShake3D::Noise2d(\"\", TimeFromStart(), 3000) * AmplitudeAngleX * EaseFactor" + ] + }, + { + "type": { + "value": "CameraShake3D::TurnCameraVertically" + }, + "parameters": [ + "", + "Layers[LayerName].CameraDeltaAngleX", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + } ] } ] } + ], + "variables": [ + { + "folded": true, + "name": "AmplitudeAngleZ", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeAngleY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeAngleX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "EaseFactor", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" + } ] } ] @@ -704,116 +849,120 @@ "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "__CameraShake.Layers", - "valueIteratorVariableName": "__CameraShake.Layer", - "keyIteratorVariableName": "__CameraShake.LayerName", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].Shakable", - "True" - ] - } - ], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__CameraShake.ActualLayerName", - "=", - "VariableString(__CameraShake.LayerName)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "__CameraShake.Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", "conditions": [ { "type": { - "value": "VarSceneTxt" + "value": "BooleanVariable" }, "parameters": [ - "__CameraShake.LayerName", - "=", - "\"__BaseLayer\"" + "Layers[LayerName].Shakable", + "True", + "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__CameraShake.ActualLayerName", - "=", - "\"\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "LayerName" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "CameraShake3D::SpinCamera" - }, - "parameters": [ - "", - "-Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleZ)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "\"\"" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "CameraShake3D::TurnCameraHorizontally" - }, - "parameters": [ - "", - "-Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleY)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake3D::SpinCamera" + }, + "parameters": [ + "", + "0 - Layers[LayerName].CameraDeltaAngleZ", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + }, + { + "type": { + "value": "CameraShake3D::TurnCameraHorizontally" + }, + "parameters": [ + "", + "0 - Layers[LayerName].CameraDeltaAngleY", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + }, + { + "type": { + "value": "CameraShake3D::TurnCameraVertically" + }, + "parameters": [ + "", + "0 - Layers[LayerName].CameraDeltaAngleX", + "ActualLayerName", + "VariableString(__CameraShake.ActualLayerName)" + ] + } ] } ] - }, + } + ], + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CameraShake3D::TurnCameraVertically" - }, - "parameters": [ - "", - "-Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].CameraDeltaAngleX)", - "VariableString(__CameraShake.ActualLayerName)", - "VariableString(__CameraShake.ActualLayerName)" - ] - } - ] + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" } ] } @@ -836,42 +985,42 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Time", + "Time", "=", "0" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Duration", + "Duration", "=", - "Duration" + "NewDuration" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StartEaseDuration", + "StartEaseDuration", "=", - "StartEaseDuration" + "NewStartEaseDuration" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StopEaseDuration", + "StopEaseDuration", "=", - "StopEaseDuration" + "NewStopEaseDuration" ] } ] @@ -881,34 +1030,34 @@ "conditions": [ { "type": { - "value": "VarScene" + "value": "NumberVariable" }, "parameters": [ - "__CameraShake.Duration", + "Duration", "<", - "Variable(__CameraShake.StartEaseDuration) + Variable(__CameraShake.StopEaseDuration)" + "StartEaseDuration + StopEaseDuration" ] } ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StartEaseDuration", + "StartEaseDuration", "=", - "StartEaseDuration * Variable(__CameraShake.Duration) / (StartEaseDuration + StopEaseDuration)" + "StartEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StopEaseDuration", + "StopEaseDuration", "=", - "StopEaseDuration * Variable(__CameraShake.Duration) / (StartEaseDuration + StopEaseDuration)" + "StopEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" ] } ] @@ -917,17 +1066,17 @@ "parameters": [ { "description": "Duration (in seconds)", - "name": "Duration", + "name": "NewDuration", "type": "expression" }, { "description": "Ease duration to start (in seconds)", - "name": "StartEaseDuration", + "name": "NewStartEaseDuration", "type": "expression" }, { "description": "Ease duration to stop (in seconds)", - "name": "StopEaseDuration", + "name": "NewStopEaseDuration", "type": "expression" } ], @@ -946,30 +1095,30 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Time", + "Time", "=", "0" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Duration", + "Duration", "=", "1234567890" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StartEaseDuration", + "StartEaseDuration", "=", "EaseDuration" ] @@ -999,30 +1148,30 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Time", + "Time", "=", "0" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Duration", + "Duration", "=", "EaseDuration" ] }, { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.StopEaseDuration", + "StopEaseDuration", "=", "EaseDuration" ] @@ -1053,12 +1202,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1071,7 +1220,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1080,10 +1229,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1106,11 +1255,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].Shakable", - "=" + "Layers[LayerName].Shakable", + "False", + "" ] } ] @@ -1130,11 +1280,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].Shakable", - "True" + "Layers[LayerName].Shakable", + "True", + "" ] } ] @@ -1150,7 +1301,7 @@ }, { "description": "Layer", - "name": "Layer", + "name": "NewLayerName", "type": "layer" } ], @@ -1168,12 +1319,12 @@ "conditions": [ { "type": { - "value": "VarScene" + "value": "NumberVariable" }, "parameters": [ - "__CameraShake.Time", + "Time", "<", - "Variable(__CameraShake.Duration)" + "Duration" ] } ], @@ -1206,12 +1357,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1224,7 +1375,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1233,10 +1384,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1252,7 +1403,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleZ)" + "Layers[LayerName].AmplitudeAngleZ" ] } ] @@ -1264,7 +1415,7 @@ "parameters": [ { "description": "Layer", - "name": "Layer", + "name": "NewLayerName", "type": "layer" } ], @@ -1284,12 +1435,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1302,7 +1453,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1311,10 +1462,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1327,10 +1478,10 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleZ", + "Layers[LayerName].AmplitudeAngleZ", "=", "Value" ] @@ -1355,12 +1506,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1373,7 +1524,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1382,10 +1533,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1401,7 +1552,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleY)" + "Layers[LayerName].AmplitudeAngleY" ] } ] @@ -1413,7 +1564,7 @@ "parameters": [ { "description": "Layer", - "name": "Layer", + "name": "NewLayerName", "type": "layer" } ], @@ -1433,12 +1584,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1451,7 +1602,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1460,10 +1611,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1476,10 +1627,10 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleY", + "Layers[LayerName].AmplitudeAngleY", "=", "Value" ] @@ -1504,12 +1655,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1522,7 +1673,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1531,10 +1682,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1550,7 +1701,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Variable(__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleX)" + "Layers[LayerName].AmplitudeAngleX" ] } ] @@ -1562,7 +1713,7 @@ "parameters": [ { "description": "Layer", - "name": "Layer", + "name": "NewLayerName", "type": "layer" } ], @@ -1582,12 +1733,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "Layer" + "NewLayerName" ] } ] @@ -1600,7 +1751,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1609,10 +1760,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1625,10 +1776,10 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].AmplitudeAngleX", + "Layers[LayerName].AmplitudeAngleX", "=", "Value" ] @@ -1653,12 +1804,12 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", - "GetArgumentAsString(\"Layer\")" + "NewLayerName" ] } ] @@ -1671,7 +1822,7 @@ "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "Layer", + "NewLayerName", "=", "\"\"" ] @@ -1680,10 +1831,10 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake.LayerName", + "LayerName", "=", "\"__BaseLayer\"" ] @@ -1696,12 +1847,12 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake.Layers[VariableString(__CameraShake.LayerName)].Frequency", + "Layers[LayerName].Frequency", "=", - "GetArgumentAsNumber(\"Frequency\")" + "Frequency" ] } ] @@ -1715,7 +1866,7 @@ }, { "description": "Layer", - "name": "Layer", + "name": "NewLayerName", "type": "layer" } ],