[SUPPORT] Advanced Turn Based Tile Toolkit

Hey, sorry it took a while to reply. Been busy. Good to see that you’re almost there. There are just a couple of small changes you need to do to get it working, as well as some less important suggestions.

Lets start at the left side of your graph. This is minor, but I think it would be cleaner to include the static mesh in your custom GridActor itself so you don’t have to add a component manually every time. Also, since you are not using the Box variable any place later (unless you have more stuff that I’m not seeing) you do not need to set that variable. Buy yeah, minor stuff.

The first real issue is for your MapAdd node. It works great the first time you add a tile (provided the grid manager is at Z location 0), as you set the grid location to 0 + the top of the box. However when you then add a new box on top of that one the new location stored at Z in the map will also be 0 + the top of the box, which I assume is not what you want. You want it to increment by the box height every time you add a new one. Therefore you need to add the Z location that is already there (which you have in your BreakVector node) to the socket location.

The next and final issue is when you check the height differences of surrounding tiles. Your last branch in the graph you linked is not connected, so will of course not work, but I assume you’re aware of this. You’re getting the correct height values, but I think you want to change how it is checked. I assume how you want it to be is that you can walk between two tiles unless the height difference between them is equal to or higher than twice the height of a box. So you don’t need two branches for this. After subtracting the height of the clicked tile index from the height of the neighboring tile use the “abs” node to get the absolute value (which does not care if the value is positive or negative). Use a branch and check if this absolute value is lower than BoxHeight2. If so, AddTileEdgeBothWays. If not, RemoveTileEdgeBothWays. Since the locations are vectors made up of floats their values are not 100% precise (a float of 0 might for instance really be 0.00001), so you should add a tiny bit of leeway in your calculations. Instead of checking if the absolute value is smaller than BoxHeight2, maybe check BoxHeight2-1 or something, or even BoxHeight1.5 if you want some leeway in the heights of your box meshes.

Edit: Checking the video you sent me on the board game you are basing this on it seems you want to be able to move down any distance, but to move up only one box. This changes my suggestion a bit. Instead of using absolute value you need to keep the information if the difference is negative or positive. Then when you get all the surrounding indexes, if a surrounding tile is higher than BoxHeight1.5 compared to the center tile you want to RemoveTileEdge (not both ways) with the tile index as the center tile as TileIndex input and the tile index of the tall neighbor as Edge. Then you want to do the opposite for the neighbor, using AddTileEdge (again not both ways) with this tile as the TileIndex input and the center tile as the Edge. If instead the neightbor tile is lower than negative BoxHeight1.5 compared to the center tile you do the opposite, with AddTileEdge for the center tile and RemoveTileEdge for the neighbor tile. Lastly if the difference is somewhere between positive and negative BoxHeight*1.5 you can use AddEdgeBothWays like before. Hope that makes sense.