You’re on the rigth track for the Corner tiles!
Well done so far! There were a lot of demands for something like that to be implemented into Gdevelop, so it’s pretty impressive how far you already got!
First a few improvements for your Gdevelop script:
When creating new events you added a “Trigger Once” in the conditions. You should to remove that, otherwise you cannot keep building tiles by dragging the mouse quickly. Since you already check in the condition if there isn’t already a tile on the position, you will already build only one tile per spot. If you want to be able to build one tile per click, I’d use the mouse button release condition instead. Or set a boolean variable, and toggle it on mouse button press and release, to build only one tile per press.
Then when you check the tile animation number of the surrounding tiles in your events, you should make sure to “pick all instances” of the island object first. Otherwise it might check only the island you just created, and not actually check the other island tiles:
Then inside your MatrixDetect extension, you used the expression
The standard way of writing it would be
It might still work the way you wrote it, but if I remember well, there can be instances where it messes things up, so I’d rather be safe.
Also I think you did not place all the tiles from the beginning unto the same grid raster, so you might need to recreate that, to avoid blue lines between certain tiles, or a few tile errors.
Now to why your tiles don’t change animations correctly:
The first big issue is that you didn’t name the animations correctly.
You named the animation below the animation, not above. The name of an animation is always written above it. It’s not very obvious, I give you that, but that means your animation names are off set by 1.
And also, in the tutorial you linked, I think they made a little mistake by accident:
There are only 47 tiles, not 48! (You can see that in the list where they describe which number corresponds to which tile. There are only 47) So if you look at the image they provided, you need to use tile 48 as tile 47 actually! Tile 47 is already represented by tile 1, if you compare the two!
After that is fixed, you forgot one more step in your calculations that is described in the tutorial:
You need to do a second bool check of neighbouring tiles of all the diagonal tiles. So if you have a tile on north east for example, you need to check if there is a tile to the right or below that tile as well. And if not set the bool to 0. You skipped that process in your extension so you’d need to add that!
So if you change that it should work.
Feel free to post if you made any progress as well, I’d be curious!