How to connect objects/walls, make a space in between and create another object that can dynamically change depending on how big the connection area is?

How do I…

I’m wondering how you would recreate this action at the 20 second mark of this video. When the walls (tetris styled pieces) are placed and they make a connection it creates an area (the black area) inside of those connected walls/objects. At any point in the game (like at the 1:55 mark) if you connect walls it will create that (black area) inside of just the connected walls. How would you do that in gdevelop? I’m asking for a step by step explanation or a screenshot of the code if possible on how to do it?Rampart - NES Gameplay - YouTube