diff --git a/extensions/community/MazeGenerator.json b/extensions/community/MazeGenerator.json deleted file mode 100644 index 5c78bf2f0..000000000 --- a/extensions/community/MazeGenerator.json +++ /dev/null @@ -1,8979 +0,0 @@ -{ - "author": "", - "description": "Provides functions for generating mazes. \n\nUse **GenerateMaze** action to set up a maze with a particular size and give it a name (MazeID). The maze is stored in scene variables, to be used with other functions by specifying the MazeID. \n\nThere are three other actions that create sprite objects you can use to place the maze into the scene:\n**CreateMazeFloorObjects** : create tiles for each cell in the maze\n**CreateMazeWallObjects**: create objects between each cell. Useful for walls\n**CreateMazeCornerObjects**: create objects on the point between 4 cell corners. Can be useful to improve maze visuals\n\nThere are plenty of other helper functions for getting/setting maze properites or get helpful information. In particular:\n**CheckMazeWall**: a condition to use in event sheet to test which walls exist for a cell\n**FindMazePath**: creates a scene variable array containing a sequence of directions to go from one cell to another cell\n\nFinally, there is a **MazeObject** behavior that can be attached to wall or floor objects to provide some additional helper conditions, expressions, and actions. See the example gdevelop file in the help URL for examples of its use. \n", - "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", - "fullName": "Maze Generator", - "helpPath": "https://luxon5.itch.io/gdevelop-maze-extension-demo", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWRhc2hhcnJheTo2LDY7fQ0KCS5zdDN7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5OjQsNDt9DQoJLnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7fQ0KCS5zdDV7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1kYXNoYXJyYXk6My4xMDgxLDMuMTA4MTt9DQoJDQoJCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2UtZGFzaGFycmF5OjQsMzt9DQo8L3N0eWxlPg0KPHJlY3QgeD0iNCIgeT0iNCIgY2xhc3M9InN0MCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTIiIHkxPSIyOCIgeDI9IjEyIiB5Mj0iNCIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIwIiB5MT0iMjgiIHgyPSIyMCIgeTI9IjQiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOCIgeTE9IjIwIiB4Mj0iNCIgeTI9IjIwIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjgiIHkxPSIxMiIgeDI9IjQiIHkyPSIxMiIvPg0KPC9zdmc+DQo=", - "name": "MazeGenerator", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_grid.svg", - "shortDescription": "Create a maze made of a grid of rectangular cells. Walls are created randomly so that every cell is reachable through a random path through the maze. ", - "version": "0.0.2", - "tags": [ - "Maze", - "Random", - "Grid", - "Procedural", - "Procedural generation", - "Random", - "Rectangular", - "Room", - "Top-down" - ], - "authorIds": [ - "DywSeWMoakatMQn720ZtKbI8u4N2" - ], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Specify the overall size of a maze, and the size of the tile \"cells\" inside the maze. Walls are randomly generated to form the maze. The maze is stored in memory, and can be referenced using a name called MazeID that is chosen here. The maze generator extension comes with other actions that reference this mazeID, which can be used to create actual wall and floor objects to place the maze into the scene. ", - "fullName": "Generate a maze", - "functionType": "Action", - "name": "GenerateMaze", - "private": false, - "sentence": "Create a random maze called _PARAM7_ at point x=_PARAM1_, y=_PARAM2_ of width _PARAM3_ and height _PARAM4_, made with _PARAM5_ by _PARAM6_ cells", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The maze is initialized with 4 boolean arrays (rows * columns elements), one for each direction to track presence of a wall. From a random starting point, a loop moves an index variable through the maze picking a random direction each time to remove a wall and create a path. Once there are no more adjacent cells not yet visited (another array \"FloorToDo\" tracks visited or not visited yet), the completed cell is removed from the \"FloorInProgress\" array and it goes back to a previous cell to try additional directions from there. Once all cells are completed the resulting arrays are stored in a structure to be used with the other maze functions", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].FloorWidth", - "=", - "CellWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].FloorHeight", - "=", - "CellHeight" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].MazeX", - "=", - "MazeX" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].MazeY", - "=", - "MazeY" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].MazeWidth", - "=", - "MazeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].MazeHeight", - "=", - "MazeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].NumColumns", - "=", - "floor(MazeWidth/ Variable(__MazeGenerator[MazeID].FloorWidth))" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].NumRows", - "=", - "floor(MazeHeight/ Variable(__MazeGenerator[MazeID].FloorHeight))" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator[MazeID].NumberOfCells", - "=", - "Variable(__MazeGenerator[MazeID].NumColumns) * Variable(__MazeGenerator[MazeID].NumRows)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorTodo" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator.FloorTodo", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pick a random cell to start from, append it to an array that will track the in-progress spaces in the maze", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "RandomInRange(0,Variable(__MazeGenerator[MazeID].NumColumns) * Variable(__MazeGenerator[MazeID].NumRows)- 1) " - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - ">", - "0" - ], - "subInstructions": [] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "=", - "4" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "Variable(__MazeGenerator.FloorInProgress[Variable(__MazeGenerator.NumFloorInProgress)-1])" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Try each direction in a random order to see if maze can build in that direction (wall exists in that direction, next cell in that direction hasn't been completed yet)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "RandomInRange(0,Variable(__MazeGenerator.numDirections)-1)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The conditions to check for each direction are:\n1. Check the direction picked randomly, stored in Directions variable\n2. There is a wall that could be removed to make a new path in that direction ( ...Wall arrays contain \"TRUE\" if there is a wall there. All walls initialize as existing then we remove some to create the path)\n3. Treat the maze boundaries as impassible. For top and bottom edge, the cell Index number being moved to has to be within the total number of cells in the maze. For the left and right edge, (index Modulo # of columns = zero) for cells on the left edge, and (index Modulo # of columns = # of columns - 1) for cells on the right edge\n4. Don't move to a space we have already visited before (FloorTodo array starts as true for all cells, goes to false once visited). This prevents the maze from being too easy by having too many ways to get to each cell in the maze\n5. Once a valid direction is found, skip all the other directions (FoundDirection is true once a direction is found). If the first direction it finds isn't valid, then the loop repeats again to try one of the other directions instead", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)-1]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "Variable(__MazeGenerator[MazeID].NumColumns) - 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)+1]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - ">=", - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "<", - "Variable(__MazeGenerator[MazeID].NumberOfCells) - Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.Directions", - "Variable(__MazeGenerator.PickDirection)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If no valid directions are found, the cell is completed and can be removed from the inprogress list", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.NumFloorInProgress)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Top-left point, X coordinate of maze in scene", - "longDescription": "", - "name": "MazeX", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Top-left point, Y coordinate of maze in scene", - "longDescription": "", - "name": "MazeY", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Width of whole maze (in pixels)", - "longDescription": "", - "name": "MazeWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Height of whole maze (in pixels)", - "longDescription": "", - "name": "MazeHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Cell Width (in pixels)", - "longDescription": "", - "name": "CellWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Cell Height (in pixels)", - "longDescription": "", - "name": "CellHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Custom name for new maze (MazeID)", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Finds a path through a maze between two cells, storing the result in a scene variable array.", - "fullName": "Find Maze Path", - "functionType": "Action", - "name": "FindMazePath", - "private": false, - "sentence": "Find path through maze _PARAM1_ from row _PARAM2_ column _PARAM3_ to row _PARAM4_ column _PARAM5_, store result as _PARAM6_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Starting from the start cell, traverse through the maze picking random directions until the end cell is encountered. At each step, record the direction taken as a string in a new array.", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorTodo" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.Path" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.StartIndex", - "=", - "(StartRow-1)*MazeGenerator::MazeNumColumns(MazeID)+(StartColumn-1)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.EndIndex", - "=", - "(EndRow-1)*MazeGenerator::MazeNumColumns(MazeID)+(EndColumn-1)" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator.FloorTodo", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "MazeGeneratorPath[StructureName]", - "\"NoPath\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.StartIndex)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "\"Floor in progress\" array is initialized with starting cell number. This loop adds additional cells to the array from random directions, traversing the maze. Once no additional paths are found for a cell, it gets removed from the \"Floor in progress\" array. At that point the search moves back to a previous cell and looks for another direction to go in. This continues until the first cell is removed from the array (all directions explored). Thus, once the \"floor in progress\" array is empty, the maze traversal is complete. ", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - ">", - "0" - ], - "subInstructions": [] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "=", - "4" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "Variable(__MazeGenerator.FloorInProgress[Variable(__MazeGenerator.NumFloorInProgress)-1])" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If the current cell is the end cell, check if the path variable is shortest if so make it the new shortest path", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Variable(__MazeGenerator.Index)", - "=", - "Variable(__MazeGenerator.EndIndex)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "VariableChildCount(__MazeGenerator.Path)", - "<", - "VariableChildCount(MazeGeneratorPath[StructureName])" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "MazeGeneratorPath[StructureName]" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "__MazeGenerator.Path", - "valueIteratorVariableName": "__MazeGenerator.PathChild", - "keyIteratorVariableName": "", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "MazeGeneratorPath[StructureName]", - "VariableString(__MazeGenerator.PathChild)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Try each direction in a random order to see if no wall is there and haven't been to the cell in that direction yet", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "RandomInRange(0,Variable(__MazeGenerator.numDirections)-1)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The conditions to check for each direction are:\n1. Check the direction picked randomly, stored in Directions variable\n2. There is no wall in that direction, add continue with next floor in that direction\n3. Don't move to a space we have already visited before (FloorTodo array starts as true for all cells, goes to false once visited). \n4. Once a valid direction is found, skip all the other directions (FoundDirection is true once a direction is found). If the first direction it finds isn't valid, then the loop repeats again to try one of the other directions instead", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Path", - "\"Left\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Path", - "\"Right\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Path", - "\"Up\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Path", - "\"Down\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.Directions", - "Variable(__MazeGenerator.PickDirection)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Once all directions are checked, no new exit path found, mark the cell as processed and remove it from the \"FloorInProgress\" array list. Next loop will go back to previous cell (last cell now in the \"FloorInProgress\" list) to check if any more directions haven't been explored yet from there", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.NumFloorInProgress)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "-", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.Path", - "VariableChildCount(__MazeGenerator.Path)-1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Start Row", - "longDescription": "", - "name": "StartRow", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Start Column", - "longDescription": "", - "name": "StartColumn", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "End Row", - "longDescription": "", - "name": "EndRow", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "End Column", - "longDescription": "", - "name": "EndColumn", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Path Name", - "longDescription": "This will be the name of the child array stored in the __MazeGeneratorPath scene structure variable", - "name": "StructureName", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Returns how many cells away from a cell with at least three exits.", - "fullName": "Maze Cell Depth", - "functionType": "Expression", - "name": "MazeCellDepth", - "private": false, - "sentence": "Traverse maze Test _PARAM1_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Starting from the start cell, traverse through the maze picking random directions until getting to a cell with at least 3 exits. This can be used, for example, for counting how deep a dead-end is. Useful to add extra treasure, add additional exits etc. to less", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorTodo" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.MinDepth", - "=", - "Variable(__MazeGenerator[MazeID].NumberOfCells)+1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator.FloorTodo", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "(RowNumber-1)*MazeGenerator::MazeNumColumns(MazeID)+(ColumnNumber-1)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - ">", - "0" - ], - "subInstructions": [] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "=", - "4" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "Variable(__MazeGenerator.FloorInProgress[Variable(__MazeGenerator.NumFloorInProgress)-1])" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Try each direction in a random order to see if maze can build in that direction (wall exists in that direction, next cell in that direction hasn't been completed yet)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "MazeGenerator::MazeNumWalls(MazeID,floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1,mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1)", - ">", - "1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "RandomInRange(0,Variable(__MazeGenerator.numDirections)-1)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The conditions to check for each direction are:\n1. Check the direction picked randomly, stored in Directions variable\n2. There is no wall in that direction, add continue with next floor in that direction\n3. Don't move to a space we have already visited before (FloorTodo array starts as true for all cells, goes to false once visited). This prevents the maze from being too easy by having too many ways to get to each cell in the maze\n4. Once a valid direction is found, skip all the other directions (FoundDirection is true once a direction is found). If the first direction it finds isn't valid, then the loop repeats again to try one of the other directions instead", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.Directions", - "Variable(__MazeGenerator.PickDirection)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.NumFloorInProgress)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If we've reached a cell with at least three exits, check if the new distance is the shortest so far", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "MazeGenerator::MazeNumWalls(MazeID,floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1,mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1)", - "=", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.MinDepth", - ">", - "Variable(__MazeGenerator.Counter)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.MinDepth", - "=", - "Variable(__MazeGenerator.Counter)" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Counter", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator.MinDepth)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNumber", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNumber", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Traverse maze Test.", - "fullName": "Traverse maze Test", - "functionType": "Action", - "name": "TraverseMaze", - "private": true, - "sentence": "Traverse maze Test _PARAM1_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This traverses a previously built array. Serves no purpose (set as private), except to provide a template for other functions ", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorTodo" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VariableClearChildren" - }, - "parameters": [ - "__MazeGenerator.TraverseTest" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushBool" - }, - "parameters": [ - "__MazeGenerator.FloorTodo", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pick a random cell to start from, append it to an array that will track the in-progress spaces in the maze", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "RandomInRange(0,Variable(__MazeGenerator[MazeID].NumColumns) * Variable(__MazeGenerator[MazeID].NumRows)- 1) " - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - ">", - "0" - ], - "subInstructions": [] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushString" - }, - "parameters": [ - "__MazeGenerator.Directions", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "=", - "4" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "Variable(__MazeGenerator.FloorInProgress[Variable(__MazeGenerator.NumFloorInProgress)-1])" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)]", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Try each direction in a random order to see if maze can build in that direction (wall exists in that direction, next cell in that direction hasn't been completed yet)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.PickDirection", - "=", - "RandomInRange(0,Variable(__MazeGenerator.numDirections)-1)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The conditions to check for each direction are:\n1. Check the direction picked randomly, stored in Directions variable\n2. There is no wall in that direction, add continue with next floor in that direction\n3. Don't move to a space we have already visited before (FloorTodo array starts as true for all cells, goes to false once visited). This prevents the maze from being too easy by having too many ways to get to each cell in the maze\n4. Once a valid direction is found, skip all the other directions (FoundDirection is true once a direction is found). If the first direction it finds isn't valid, then the loop repeats again to try one of the other directions instead", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Up\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarSceneTxt" - }, - "parameters": [ - "__MazeGenerator.Directions[Variable(__MazeGenerator.PickDirection)]", - "=", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FloorTodo[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.Directions", - "Variable(__MazeGenerator.PickDirection)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.numDirections", - "-", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator.FoundDirection", - "False" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableRemoveAt" - }, - "parameters": [ - "__MazeGenerator.FloorInProgress", - "Variable(__MazeGenerator.NumFloorInProgress)-1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.NumFloorInProgress", - "-", - "1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariablePushNumber" - }, - "parameters": [ - "__MazeGenerator.TraverseTest", - "Variable(__MazeGenerator.Index)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "The number of rows in a maze.", - "fullName": "Number of rows in maze", - "functionType": "Expression", - "name": "MazeNumRows", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].NumRows)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "The number of columns in a maze.", - "fullName": "Number of columns in maze", - "functionType": "Expression", - "name": "MazeNumColumns", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "The number of cells (floor tiles) inside of a maze.", - "fullName": "Number of cells in a maze", - "functionType": "Expression", - "name": "MazeNumCells", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].NumberOfCells)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Width of maze cells.", - "fullName": "Maze Cell Width", - "functionType": "Expression", - "name": "MazeCellWidth", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].FloorWidth)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Height of maze cells.", - "fullName": "Maze Cell Height", - "functionType": "Expression", - "name": "MazeCellHeight", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].FloorHeight)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "X position of maze.", - "fullName": "Maze X", - "functionType": "Expression", - "name": "MazeX", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].MazeX)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Y position of maze.", - "fullName": "Maze Y", - "functionType": "Expression", - "name": "MazeY", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].MazeY)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Width of whole maze.", - "fullName": "Maze Width", - "functionType": "Expression", - "name": "MazeWidth", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].MazeWidth)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Height of whole maze.", - "fullName": "Maze Height", - "functionType": "Expression", - "name": "MazeHeight", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator[MazeID].MazeHeight)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Chosen cell within a maze has a wall in a particular direction.", - "fullName": "Cell within a maze has a wall", - "functionType": "Condition", - "name": "CheckMazeWall", - "private": false, - "sentence": "Cell in row _PARAM2_ and column _PARAM3_ of maze _PARAM1_ has a wall in direction _PARAM4_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][WallDirection][(RowNum-1)*MazeGenerator::MazeNumColumns(MazeID)+(ColumnNum-1)]", - "True" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Wall Direction", - "longDescription": "", - "name": "WallDirection", - "optional": false, - "supplementaryInformation": "[\"LeftWall\",\"RightWall\",\"UpWall\",\"DownWall\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Remove a wall in a particular direction for a maze cell.", - "fullName": "Remove a maze wall", - "functionType": "Action", - "name": "RemoveMazeWall", - "private": false, - "sentence": "Remove a wall for cell in row _PARAM2_ and column _PARAM3_ of maze _PARAM1_ in direction _PARAM4_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "First, convert row and column number into maze array index and store it in a scene variable to modify the wall arrays", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "(RowNum-1)*MazeGenerator::MazeNumColumns(MazeID)+(ColumnNum-1)" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarSceneTxt" - }, - "parameters": [ - "test", - "=", - "WallDirection" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][WallDirection][Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Also modify the wall arrays in the opposite direction in the cell adjacent", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"LeftWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"RightWall\"][Variable(__MazeGenerator.Index)-1]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"RightWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "Variable(__MazeGenerator[MazeID].NumColumns) - 1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"LeftWall\"][Variable(__MazeGenerator.Index)+1]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"UpWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - ">=", - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"DownWall\"][Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"DownWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "<", - "Variable(__MazeGenerator[MazeID].NumberOfCells) - Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"UpWall\"][Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Wall Direction", - "longDescription": "", - "name": "WallDirection", - "optional": false, - "supplementaryInformation": "[\"LeftWall\",\"RightWall\",\"UpWall\",\"DownWall\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Add a wall in a particular direction for a maze cell.", - "fullName": "Add a maze wall", - "functionType": "Action", - "name": "AddMazeWall", - "private": false, - "sentence": "Add a wall for cell in row _PARAM2_ and column _PARAM3_ of maze _PARAM1_ in direction _PARAM4_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "First, convert row and column number into maze array index and store it in a scene variable to modify the wall arrays", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "(RowNum-1)*MazeGenerator::MazeNumColumns(MazeID)+(ColumnNum-1)" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarSceneTxt" - }, - "parameters": [ - "test", - "=", - "WallDirection" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][WallDirection][Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Also modify the wall arrays in the opposite direction in the cell adjacent", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"LeftWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"RightWall\"][Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"RightWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "Variable(__MazeGenerator[MazeID].NumColumns) - 1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"LeftWall\"][Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"UpWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - ">=", - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"DownWall\"][Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "WallDirection", - "=", - "\"DownWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "<", - "Variable(__MazeGenerator[MazeID].NumberOfCells) - Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID][\"UpWall\"][Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Maze ID", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Wall Direction", - "longDescription": "", - "name": "WallDirection", - "optional": false, - "supplementaryInformation": "[\"LeftWall\",\"RightWall\",\"UpWall\",\"DownWall\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "The number of directions with walls.", - "fullName": "Number of Walls in a Maze Cell", - "functionType": "Expression", - "name": "MazeNumWalls", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.count", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MazeGenerator::CheckMazeWall" - }, - "parameters": [ - "", - "MazeID", - "RowNum", - "ColumnNum", - "\"LeftWall\"", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.count", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MazeGenerator::CheckMazeWall" - }, - "parameters": [ - "", - "MazeID", - "RowNum", - "ColumnNum", - "\"RightWall\"", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.count", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MazeGenerator::CheckMazeWall" - }, - "parameters": [ - "", - "MazeID", - "RowNum", - "ColumnNum", - "\"UpWall\"", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.count", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MazeGenerator::CheckMazeWall" - }, - "parameters": [ - "", - "MazeID", - "RowNum", - "ColumnNum", - "\"DownWall\"", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.count", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MazeGenerator.count)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID chosen during maze creation", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNum", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "For a previously created maze, create maze floor objects that will tile the cells of the maze.", - "fullName": "Create Maze Floor Objects", - "functionType": "Action", - "name": "CreateMazeFloorObjects", - "private": false, - "sentence": "Create _PARAM2_ floors for maze _PARAM1_ in layer _PARAM3_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The maze information (number of rows and columns) is looked up from __MazeGenerator structure variable which was created when the Generate Maze Action was used. This creates a sprite object for each cell in the maze (acting as a floor object)\nSome object variables are created in case the MazeObject behavior is being used (its optional, simply enables some useful object functions)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "FloorObject", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "FloorObject", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "FloorObject", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "FloorObject", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "FloorObject", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "FloorObject", - "=", - "ResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "FloorObject", - "=", - "ResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorX", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorWidth) + Variable(__MazeGenerator[MazeID].MazeX)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorY", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorHeight) + Variable(__MazeGenerator[MazeID].MazeY)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "FloorObject", - "=", - "Variable(__MazeGenerator.FloorX) + Variable(__MazeGenerator[MazeID].FloorWidth)/2 - FloorObject.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) + Variable(__MazeGenerator[MazeID].FloorHeight)/2 - FloorObject.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID chosen during maze creation", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Floor Object", - "longDescription": "", - "name": "FloorObject", - "optional": false, - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Layer", - "longDescription": "", - "name": "Layer", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Z Order", - "longDescription": "", - "name": "Zorder", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Width (optional)", - "longDescription": "", - "name": "ResizeWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Height (optional)", - "longDescription": "", - "name": "ResizeHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "For a previously created maze, create maze wall objects along the edges of the cells of the maze.", - "fullName": "Create Maze Wall Objects", - "functionType": "Action", - "name": "CreateMazeWallObjects", - "private": false, - "sentence": "Create _PARAM2_ and _PARAM3_ walls for maze _PARAM1_ in layer _PARAM4_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The maze information (number of rows and columns) is looked up from __MazeGenerator structure variable which was created when the Generate Maze Action was used. This creates a sprite object between each cell in the maze, to represent walls\nSome object variables are created in case the MazeObject behavior is being used (its optional, simply enables some useful object functions)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorX", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorWidth) + Variable(__MazeGenerator[MazeID].MazeX)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorY", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorHeight) + Variable(__MazeGenerator[MazeID].MazeY)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For walls above cell\nThe extra condition is to prevent duplicate walls (cells are processed from top left to bottom right; \"above\" walls are first created as \"below\" walls for the cell above already processed)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Variable(__MazeGenerator.Index)", - "<", - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Hwall", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Hwall", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_WallDirection", - "=", - "\"UpWall\"" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "HwallResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "HwallResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Hwall", - "=", - "HwallResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Hwall", - "=", - "HwallResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Hwall", - "=", - "Variable(__MazeGenerator.FloorX) + (Variable(__MazeGenerator[MazeID].FloorWidth)/2) - (Hwall.Width()/2)", - "=", - "Variable(__MazeGenerator.FloorY) - Hwall.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For walls to the left of cells\nThe extra condition is to prevent duplicate walls (cells are processed from top left to bottom right; \"left\" walls are first created as \"right\" walls for the cell to the left already processed)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index) , Variable(__MazeGenerator[MazeID].NumColumns))", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Vwall", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Vwall", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_WallDirection", - "=", - "\"LeftWall\"" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "VwallResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "VwallResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Vwall", - "=", - "VwallResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Vwall", - "=", - "VwallResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Vwall", - "=", - "Variable(__MazeGenerator.FloorX)-Vwall.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) + (Variable(__MazeGenerator[MazeID].FloorHeight)/2) - (Vwall.Height()/2)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For walls to the right of cells", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Vwall", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Vwall", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Vwall", - "__MazeGenerator_WallDirection", - "=", - "\"RightWall\"" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "VwallResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "VwallResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Vwall", - "=", - "VwallResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Vwall", - "=", - "VwallResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Vwall", - "=", - "Variable(__MazeGenerator.FloorX) + Variable(__MazeGenerator[MazeID].FloorWidth) - Vwall.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) + (Variable(__MazeGenerator[MazeID].FloorHeight)/2) - (Vwall.Height()/2)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For walls below cells", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Hwall", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Hwall", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Hwall", - "__MazeGenerator_WallDirection", - "=", - "\"DownWall\"" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "HwallResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "HwallResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Hwall", - "=", - "HwallResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Hwall", - "=", - "HwallResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Hwall", - "=", - "Variable(__MazeGenerator.FloorX) + (Variable(__MazeGenerator[MazeID].FloorWidth)/2) - (Hwall.Width()/2)", - "=", - "Variable(__MazeGenerator.FloorY) + Variable(__MazeGenerator[MazeID].FloorHeight) - Hwall.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID chosen during maze creation", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Horizontal Wall Object", - "longDescription": "", - "name": "Hwall", - "optional": false, - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Vertical Wall Object", - "longDescription": "", - "name": "Vwall", - "optional": false, - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Layer", - "longDescription": "", - "name": "Layer", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Z Order", - "longDescription": "", - "name": "Zorder", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Width of Horizontal Wall (Optional)", - "longDescription": "", - "name": "HwallResizeWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Height of Horizontal Wall (Optional)", - "longDescription": "", - "name": "HwallResizeHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Width of Vertical Wall (Optional)", - "longDescription": "", - "name": "VwallResizeWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Height of Vertical Wall (Optional)", - "longDescription": "", - "name": "VwallResizeHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "For a previously created maze, create maze corner objects at the intersection point of maze cells.", - "fullName": "Create Maze Corner Objects", - "functionType": "Action", - "name": "CreateMazeCornerObjects", - "private": false, - "sentence": "Create _PARAM2_ corners for maze _PARAM1_ in layer _PARAM3_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The maze information (number of rows and columns) is looked up from __MazeGenerator structure variable which was created when the Generate Maze Action was used. This creates a sprite object at the intersection point between four cells, if there are two walls interseting there to act as a corner\nSome object variables are created in case the MazeObject behavior is being used (its optional, simply enables some useful object functions)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Variable(__MazeGenerator[MazeID].NumberOfCells)", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorX", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorWidth) + Variable(__MazeGenerator[MazeID].MazeX)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.FloorY", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) * Variable(__MazeGenerator[MazeID].FloorHeight) + Variable(__MazeGenerator[MazeID].MazeY)" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For top left corner, check if two walls meet there in any orientation", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Corner", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Corner", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Corner", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Corner", - "=", - "ResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Corner", - "=", - "ResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Corner", - "=", - "Variable(__MazeGenerator.FloorX)- Corner.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY)- Corner.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For top right corner, check if two walls meet there in any orientation", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Variable(__MazeGenerator.Index)", - "<", - "Variable(__MazeGenerator[MazeID].NumColumns)" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index)+1, Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index)+1, Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].UpWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Corner", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Corner", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Corner", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Corner", - "=", - "ResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Corner", - "=", - "ResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Corner", - "=", - "Variable(__MazeGenerator.FloorX) + Variable(__MazeGenerator[MazeID].FloorWidth) - Corner.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) - Corner.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For bottom left corner, check if two walls meet there in any orientation", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index) , Variable(__MazeGenerator[MazeID].NumColumns))", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)-1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].LeftWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Corner", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Corner", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Corner", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Corner", - "=", - "ResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Corner", - "=", - "ResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Corner", - "=", - "Variable(__MazeGenerator.FloorX) - Corner.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) + Variable(__MazeGenerator[MazeID].FloorHeight) - Corner.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "For bottom right corner, check if two walls meet there in any orientation", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index) +1 , Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index)+1 , Variable(__MazeGenerator[MazeID].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)+1]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "True" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[MazeID].NumColumns)]", - "False" - ], - "subInstructions": [] - } - ] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].RightWall[Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[MazeID].DownWall[Variable(__MazeGenerator.Index)+1]", - "False" - ], - "subInstructions": [] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Create" - }, - "parameters": [ - "", - "Corner", - "0", - "0", - "Layer" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Column", - "=", - "mod(Variable(__MazeGenerator.Index),Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjet" - }, - "parameters": [ - "Corner", - "__MazeGenerator_Row", - "=", - "floor(Variable(__MazeGenerator.Index)/Variable(__MazeGenerator[MazeID].NumColumns)) + 1" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangePlan" - }, - "parameters": [ - "Corner", - "=", - "Zorder" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarObjetTxt" - }, - "parameters": [ - "Corner", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeWidth", - ">", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "ResizeHeight", - ">", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "ChangeWidth" - }, - "parameters": [ - "Corner", - "=", - "ResizeWidth" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ChangeHeight" - }, - "parameters": [ - "Corner", - "=", - "ResizeHeight" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreXY" - }, - "parameters": [ - "Corner", - "=", - "Variable(__MazeGenerator.FloorX) + Variable(__MazeGenerator[MazeID].FloorWidth) - Corner.Width()/2", - "=", - "Variable(__MazeGenerator.FloorY) + Variable(__MazeGenerator[MazeID].FloorHeight) - Corner.Height()/2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID chosen during maze creation", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Corner Object", - "longDescription": "", - "name": "Corner", - "optional": false, - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Layer", - "longDescription": "", - "name": "Layer", - "optional": false, - "supplementaryInformation": "", - "type": "string" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Z Order", - "longDescription": "", - "name": "Zorder", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Width of Corner (Optional)", - "longDescription": "", - "name": "ResizeWidth", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Resize Height of Corner (Optional)", - "longDescription": "", - "name": "ResizeHeight", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ - { - "description": "This behavior adds some helper functions to be used with Maze Generator extension, that can be used in the event sheet. Search for \"Maze\" in the events editor to find them after attaching this to an object. Objects with this behavior need to be used with the \"CreateMazeFloorObject\", \"CreateMazeWallObjects\" or \"CreateCornerObjects\" functions of the maze generator in order to benefit from the helper functions. For example, \"CheckMazeObjecetLocation\" condition filters objects from a row number and column number of a maze.", - "fullName": "Maze Object", - "name": "MazeObject", - "objectType": "", - "eventsFunctions": [ - { - "description": "Check if maze object belongs to a certain maze, by the MazeID.", - "fullName": "Check mazeID of object", - "functionType": "Condition", - "name": "CheckMazeObjectMazeID", - "private": false, - "sentence": "Maze object _PARAM0_ is in maze _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarObjetTxt" - }, - "parameters": [ - "Object", - "__MazeGenerator_MazeID", - "=", - "MazeID" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "MazeID of maze, set during maze creation", - "longDescription": "", - "name": "MazeID", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Maze object is in a certain row and column of a maze.", - "fullName": "Maze object has particular row and column numbers", - "functionType": "Condition", - "name": "CheckMazeObjectLocation", - "private": false, - "sentence": "Maze object _PARAM0_ is in row _PARAM2_ column _PARAM3_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__MazeGenerator_Row", - "=", - "RowNumber" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__MazeGenerator_Column", - "=", - "ColumnNumber" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Row Number", - "longDescription": "", - "name": "RowNumber", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Column Number", - "longDescription": "", - "name": "ColumnNumber", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if maze object is a wall in a particular direction.", - "fullName": "Check Wall Direction of Maze Object", - "functionType": "Condition", - "name": "CheckMazeObjectWallDirection", - "private": false, - "sentence": "Maze Object _PARAM0_ has is Wall in Direction _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "VarObjetTxt" - }, - "parameters": [ - "Object", - "__MazeGenerator_WallDirection", - "=", - "WallDirection" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Wall Direction of Maze Object", - "longDescription": "", - "name": "WallDirection", - "optional": false, - "supplementaryInformation": "[\"LeftWall\",\"RightWall\",\"UpWall\",\"DownWall\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Return the maze ID of the maze object as a string.", - "fullName": "Maze ID of Maze Object", - "functionType": "StringExpression", - "name": "MazeObjectMazeID", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnString" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_MazeID)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the row number of the maze object as a number.", - "fullName": "Row of maze object", - "functionType": "Expression", - "name": "MazeObjectRow", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Variable(__MazeGenerator_Row)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the row number of the maze object as a number.", - "fullName": "Column of maze object", - "functionType": "Expression", - "name": "MazeObjectColumn", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Variable(__MazeGenerator_Column)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the wall direction of the maze object as a string (only exists for wall objects).", - "fullName": "Wall Direction of Maze Object", - "functionType": "StringExpression", - "name": "MazeObjectWallDirection", - "private": false, - "sentence": "", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnString" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_WallDirection)" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Delete the Maze Object, also updating the corresponding maze scene variables.", - "fullName": "Delete Maze Object", - "functionType": "Action", - "name": "DeleteMazeObject", - "private": false, - "sentence": "Delete Maze Object _PARAM0_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This delete action will delete the object, but before doing so if its a wall it will update the maze in the scene structure variable to modify the wall array there as well", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "=", - "(Object.Variable(__MazeGenerator.RowNum)-1)*MazeGenerator::MazeNumColumns(Object.VariableString(__MazeGenerator.MazeID))+(Object.Variable(__MazeGenerator.ColumnNum)-1)" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)][Object.VariableString(__MazeGenerator_WallDirection)][Variable(__MazeGenerator.Index)]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_WallDirection)", - "=", - "\"LeftWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns))", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)][\"RightWall\"][Variable(__MazeGenerator.Index)-1]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_WallDirection)", - "=", - "\"RightWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "mod(Variable(__MazeGenerator.Index), Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns))", - "!=", - "Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns) - 1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)][\"LeftWall\"][Variable(__MazeGenerator.Index)+1]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_WallDirection)", - "=", - "\"UpWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - ">=", - "Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)][\"DownWall\"][Variable(__MazeGenerator.Index)-Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns)]", - "True" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "StrEqual" - }, - "parameters": [ - "Object.VariableString(__MazeGenerator_WallDirection)", - "=", - "\"DownWall\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "VarScene" - }, - "parameters": [ - "__MazeGenerator.Index", - "<", - "Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumberOfCells) - Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns)" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)][\"UpWall\"][Variable(__MazeGenerator.Index)+Variable(__MazeGenerator[Object.VariableString(__MazeGenerator.MazeID)].NumColumns)]", - "False" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "Delete" - }, - "parameters": [ - "Object", - "" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "MazeGenerator::MazeObject", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [] - } - ] -} \ No newline at end of file