Hello.
I added a flood fill function to my level editor.
I found it here on the forums.
construct.net/en/forum/construct-2/how-do-i-18/best-flood-fill-tilemap-141678
I tried to adapt it to my editor. (it functions a little different)
I managed to go a bit, ironing out a lot of bugs/glitches/getting stuck.
But I am having a bit of glitches.
If you draw small boundaries or figures and try to flood fill them (try several times!) it will sometimes be stubborn and NOT floodfill it, until you found a sweet spot and it manages to fill.
Sometimes it will flood fill but in WRONG boundary area!
I have to be honest, I don't play well with that kind of array manipulation. I prefer fixed array, setting values, ha ha!
But it might be a problem elsewhere. I am confused why the original code only needed X coordinate and not Y (for the inital push)
Capx file is here:
funnybunny.se/files/bugwithff.capx
And just to take a glance of the editor in action here's the uploaded version.
funnybunny.se/files/project
Again, I have tried to clean the code as much as I could. Let me know if I forgot third party plugin.
Thank you and I hope you can help me.
Also if you feel helpful, maybe also give advice to work in that i won't touch the boundary tiles (1tile border)