Similarly, you can add an event to stop the fill function and call the clear function if your flood fill algorithm reaches an edge or boundary...
I kinda understand what you mean but im not sure how that would work for part 1. But I think I got a way of how I can get the line to auto-delete by making a point mark for them. For ex, there will be a point A and B sprite. Player will spawn point A on the press of the key of drawing the line trap. On key release, Point B will spawn, but if Point B is not overlapping Point A, set tile (0,0) 100x100 to tile 0 ( back black to what it was).
Good to see you are making progress with this project :)
Thanks! Im getting there!
For the second part, deleting the tiles if there are no enemies trapped in the completed section...
Thanks for your help and advice for this. I will try it out to see if it works