I want to change the sprite animation according to the hoe digging

Hello !
My question is simple : how to reproduce this from stardew valley !
digging3

I want the tile changing according to the others next to it, and it’s pretty hard for me

Yeah, it’s not an easy one to tackle, and I’d seriously question whether you really need to do this. If you’ve programmed before, it may be do-able, but if GDevelop is your first foray into game making, I’d say leave it and manage without it.

To give you an idea of what’s involved :

I’d split the hole into 4 pieces (the corners), and work with each piece at a time. You’ll need 8 images for each corner, and to work out which image to use based on the holes adjacent and diagonally next to the corner piece.

Using the bottom right part of the hole as an example, it can have holes to the right, below and diagonally down & right, You’ll need to create a bottom right hole image for each combination of the adjacent holes. You then need to determine which holes are adjacent to the corner part, and set the corner animation accordingly.

You’ll have to do this for all 4 corners. There is a ‘shortcut’ you can use to determine the animation by using binary values for each hole (1 for right, 2 for diagonally down & right and 4 for down) and adding them up to get the sprite animation number. But I’ll leave that as an exercise for the reader :slight_smile: