hi guys,
i am working on a digging mechanic and i am stuck.
I need your help guys.
How the current mechanic works:The "diggable area" is just a background and has a border of actors (lets call them "dirt").
Hitting one of these "dirt actors" kills it and creates a new one in the direction needed (checking position of player).
It also changes the tile below so it looks like your are expanding the "walkable area" (just cosmetical):

It won't create a "dirt" actor when there is a tile on another layer (which is good):

I can add "dirt actors" above and below checking the players situation related to the dirt actor (which is good):

Here is the code (also attached):
My problem:How do i tell the behaviour not to create "dirt actors" when in free space (aka "check if connected")?
Check somehow if there are dirt actors not attached?

I tired a lot but wont get it working.
Maybe its the wrong approach in general?
Thanks a lot for help!