diff --git a/extensions/community/UniqueSelectionVisual.json b/extensions/community/UniqueSelectionVisual.json new file mode 100644 index 000000000..379fa6661 --- /dev/null +++ b/extensions/community/UniqueSelectionVisual.json @@ -0,0 +1,1555 @@ +{ + "author": "", + "category": "User interface", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Unique selection visual", + "gdevelopVersion": "", + "helpPath": "https://discord.gg/cGCHe4YZT7", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWN1cnNvci1kZWZhdWx0LWNsaWNrIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjc2LDguNjlBMC43NiwwLjc2IDAgMCwwIDEwLDkuNDVWMjAuOUMxMCwyMS4zMiAxMC4zNCwyMS42NiAxMC43NiwyMS42NkMxMC45NSwyMS42NiAxMS4xMSwyMS42IDExLjI0LDIxLjVMMTMuMTUsMTkuOTVMMTQuODEsMjMuNTdDMTQuOTQsMjMuODQgMTUuMjEsMjQgMTUuNSwyNEMxNS42MSwyNCAxNS43MiwyNCAxNS44MywyMy45MkwxOC41OSwyMi42NEMxOC45NywyMi40NiAxOS4xNSwyMiAxOC45NSwyMS42M0wxNy4yOCwxOEwxOS42OSwxNy41NUMxOS44NSwxNy41IDIwLDE3LjQzIDIwLjEyLDE3LjI5QzIwLjM5LDE2Ljk3IDIwLjM1LDE2LjUgMjAsMTYuMjFMMTEuMjYsOC44NkwxMS4yNSw4Ljg3QzExLjEyLDguNzYgMTAuOTUsOC42OSAxMC43Niw4LjY5TTE1LDEwVjhIMjBWMTBIMTVNMTMuODMsNC43NkwxNi42NiwxLjkzTDE4LjA3LDMuMzRMMTUuMjQsNi4xN0wxMy44Myw0Ljc2TTEwLDBIMTJWNUgxMFYwTTMuOTMsMTQuNjZMNi43NiwxMS44M0w4LjE3LDEzLjI0TDUuMzQsMTYuMDdMMy45MywxNC42Nk0zLjkzLDMuMzRMNS4zNCwxLjkzTDguMTcsNC43Nkw2Ljc2LDYuMTdMMy45MywzLjM0TTcsMTBIMlY4SDdWMTAiIC8+PC9zdmc+", + "name": "UniqueSelectionVisual", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/acee277d95ba01697e6a59ea80322a918e5a6f7cba90712d8b3f238b2a0ed0f9_cursor-default-click.svg", + "shortDescription": "Manages the visual and the audio of a selection with the cursor, including while hovering.", + "version": "1.0.0", + "description": [ + "Manages the visual, the audio and the boolean of a selection with the cursor. It ensures only one sprite is selected at a time. Great for the selection of tiles or objects close to each other. It works with a behaviour and a module that you put in the event sheet (they go hand in hand).", + "", + "---HOW TO USE---", + "", + "1: Assign the behaviour `Unique sprite selection` to all your selectable sprites.", + "", + "2: Associate sounds in the behaviour property.", + "", + "3: Put the action `UniqueSelectionModule` in your event sheet. The selectable sprites must have the behaviour.", + "", + "To check if a sprite is selected, use `Sprite is selected` condition." + ], + "tags": [ + "selection", + "visual", + "sound", + "unique", + "cursor", + "module" + ], + "authorIds": [ + "zQ6CqhgvN8Qj8Z0lsXU6WWPT1zy1", + "8Ih1aa8f5gWUp4UB2BdhQ2iXWxJ3", + "Khhq7a4Lu8bt91GLLhG0QiGLpfx2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "This module manages the selection, visual, and selection sound for the sprites that have the behaviour: Unique sprite selection. The hovered sound is already managed just by the object having the behaviour.\n\nWhen the [max amount of selected] parameter is 1, pressing on a selectable object will deselect everything and make the hovered sprite selected.\n\nwhen the [max amount of selected] parameter is above 1, pressing on a sprite toggle its selection unless the max amount is reached.", + "fullName": "Unique selection module", + "functionType": "Action", + "name": "UniqueSelectionModule", + "sentence": "Run selection process and visual for _PARAM1_ with a maximum of selected items at _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsCursorOnObject" + }, + "parameters": [ + "Object", + "", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PickNearest" + }, + "parameters": [ + "Object", + "CursorX(Object.Layer())", + "CursorY(Object.Layer())", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "Object.SpriteUniqueSelection::SelectedScale()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 70, + "g": 196, + "r": 63, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "input for the selection is below" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonFromTextReleased" + }, + "parameters": [ + "", + "\"Left\"" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "PARAM maxselected = 1", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "maxSelected", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "UniqueSelectionVisual::UniqueSpriteSelection::Selected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundSelected()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PickAllInstances" + }, + "parameters": [ + "", + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::SetSelected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::SetSelected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "yes", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "PARAM maxselected > 1", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "maxSelected", + ">", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::Selected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "original_selection_state", + "True", + "" + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PickAllInstances" + }, + "parameters": [ + "", + "Object" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::Selected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "Object", + "<=", + "maxSelected - 1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "validate", + "True", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Not" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::Selected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "validate", + "True", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "original_selection_state", + "False", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "validate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::SetSelected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "yes", + "" + ] + }, + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundSelected()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "validate", + "False", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "this copy-pasted part may seem strange. but this is the easiest way to play \"another\" kind of sound using the same sound as the \"hover sound\".\n\ntimers would not work because the ancestor parent of this action have a condition that triggers once." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundHovered()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch() * 1.5", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.02" + ] + }, + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundHovered()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch() * 1.5", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.02" + ] + }, + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundHovered()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch() * 1.5", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.02" + ] + }, + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundHovered()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch() * 1.5", + "" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "original_selection_state", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "UniqueSelectionVisual::UniqueSpriteSelection::SetSelected" + }, + "parameters": [ + "Object", + "SpriteUniqueSelection", + "no", + "" + ] + }, + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.SpriteUniqueSelection::AssociatedSoundHovered()", + "Object.SpriteUniqueSelection::SoundChannel()", + "", + "Object.SpriteUniqueSelection::SoundVolume()", + "Object.SpriteUniqueSelection::SoundPitch()", + "" + ] + } + ] + } + ] + } + ], + "variables": [ + { + "name": "validate", + "type": "boolean", + "value": false + }, + { + "name": "original_selection_state", + "type": "boolean", + "value": false + } + ] + } + ], + "parameters": [] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Selectable sprite", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Unique selection", + "name": "SpriteUniqueSelection", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + }, + { + "description": "Max amount of selected", + "name": "maxSelected", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "UniqueSelectionModule" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Enables the sprite to be used in the uniqueSelectionModule from the actions of the event sheet. even if you do not use the module, sprites having this behaviour will trigger the hovering sound, unless no sound has been assigned.", + "fullName": "Unique sprite selection", + "helpPath": "", + "iconUrl": "", + "name": "UniqueSpriteSelection", + "objectType": "Sprite", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "do step pre event is only for the sound because its the easiest way to do it" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsCursorOnObject" + }, + "parameters": [ + "Object", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AudioByName::PlaySoundOnChannelByName" + }, + "parameters": [ + "", + "Object.Behavior::AssociatedSoundHovered()", + "Object.Behavior::SoundChannel()", + "", + "Object.Behavior::SoundVolume()", + "Object.Behavior::SoundPitch()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the associatedSound of the object.", + "fullName": "associatedSound", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "AssociatedSoundHovered", + "sentence": "the associatedSound", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "sound_hovered" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "AssociatedSoundHovered", + "group": "Unique selection configuration", + "name": "SetAssociatedSoundHovered", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "sound_hovered", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Checks if the sprite is selected.", + "fullName": "Sprite is selected", + "functionType": "Condition", + "group": "Unique selection configuration", + "name": "Selected", + "sentence": "_PARAM0_ is selected", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "selected", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if selected.", + "fullName": "selected", + "functionType": "Action", + "group": "Unique selection configuration", + "name": "SetSelected", + "sentence": "_PARAM0_ selected: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "selected", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "selected", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Selected", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the soundChannel of the object.", + "fullName": "soundChannel", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "SoundChannel", + "sentence": "the soundChannel", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "soundChannel" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SoundChannel", + "group": "Unique selection configuration", + "name": "SetSoundChannel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "soundChannel", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the soundVolume of the object.", + "fullName": "soundVolume", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "SoundVolume", + "sentence": "the soundVolume", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "soundVolume" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SoundVolume", + "group": "Unique selection configuration", + "name": "SetSoundVolume", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "soundVolume", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the soundPitch of the object.", + "fullName": "soundPitch", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "SoundPitch", + "sentence": "the soundPitch", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "soundPitch" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SoundPitch", + "group": "Unique selection configuration", + "name": "SetSoundPitch", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "soundPitch", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the selectedScale of the object.", + "fullName": "selectedScale", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "SelectedScale", + "sentence": "the selectedScale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "selectedScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SelectedScale", + "group": "Unique selection configuration", + "name": "SetSelectedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "selectedScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the sound_selected of the object.", + "fullName": "sound_selected", + "functionType": "ExpressionAndCondition", + "group": "Unique selection configuration", + "name": "AssociatedSoundSelected", + "sentence": "the sound_selected", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "sound_selected" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "AssociatedSoundSelected", + "group": "Unique selection configuration", + "name": "SetAssociatedSoundSelected", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "sound_selected", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "UniqueSelectionVisual::UniqueSpriteSelection", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Unique selection configuration", + "children": [ + { + "functionName": "AssociatedSoundHovered" + }, + { + "functionName": "SetAssociatedSoundHovered" + }, + { + "functionName": "Selected" + }, + { + "functionName": "SetSelected" + }, + { + "functionName": "SoundChannel" + }, + { + "functionName": "SetSoundChannel" + }, + { + "functionName": "SoundVolume" + }, + { + "functionName": "SetSoundVolume" + }, + { + "functionName": "SoundPitch" + }, + { + "functionName": "SetSoundPitch" + }, + { + "functionName": "SelectedScale" + }, + { + "functionName": "SetSelectedScale" + }, + { + "functionName": "AssociatedSoundSelected" + }, + { + "functionName": "SetAssociatedSoundSelected" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "false", + "type": "Boolean", + "label": "", + "extraInformation": [ + "audio" + ], + "choices": [], + "hidden": true, + "name": "selected" + }, + { + "value": "", + "type": "Resource", + "label": "sound when hovered", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "sound_hovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "sound channel", + "advanced": true, + "name": "soundChannel" + }, + { + "value": "100", + "type": "Number", + "unit": "Dimensionless", + "label": "sound volume", + "description": "(by percentage). hard caps at 100%", + "advanced": true, + "name": "soundVolume" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "sound pitch", + "advanced": true, + "name": "soundPitch" + }, + { + "value": "1.2", + "type": "Number", + "unit": "Dimensionless", + "label": "sprite scale when hovered", + "advanced": true, + "name": "selectedScale" + }, + { + "value": "", + "type": "Resource", + "label": "sound when selected", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "sound_selected" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "sound_hovered" + }, + { + "propertyName": "sound_selected" + }, + { + "propertyName": "soundChannel" + }, + { + "propertyName": "soundVolume" + }, + { + "propertyName": "soundPitch" + }, + { + "propertyName": "selectedScale" + }, + { + "propertyName": "selected" + } + ] + } + } + ], + "eventsBasedObjects": [], + "requiredExtensions": [ + { + "extensionName": "AudioByName", + "extensionVersion": "1.0.0" + } + ] +}