[SOLVED] Delete if X is colliding with a ZONE with variable set to false unless X also collides with ZONE with variable set to true

Thanks for the suggestion but I don’t think it works for me. Not without additional problem solving. I tried it. It causes some enemies to pop into existence on screen.

I knew it felt like something here was overcomplicated
Hold space to activate deleting ballz IF they are not in collision with wall with which player does not collide

And only very last event here is responsible for deleting ballz

See being curious is your best friend
So always do not ask if you are doing something right
But just try whatever you can until you are out of ideas and then report it did not work
Took me 5 tries to get this to work

If you want to auto delete enemies also when player is not in collision with any spawn zone you just need one additional event on bottom

1 Like

This may have already been resolved but i would think an easy solution would be to have a zone variable on tge enemies when spawned.

Then simply you can use enemy in collision with zone not equal to enemy.zone delete.

Yoy could add a a wait 10 then would not be so obvious and would allow sneaky escapes.

Update:
I finally got everything working, thanks to Zero’s advice.
I faced additional troubles though. Long story short, I realized my SPAWN IN events weren’t working as I hoped after all. I had to rethink everything. I also didn’t take into a count the fact that the player can kill the enemies, which complicated things even farther. I had to give every Spawner an ID, which gets “transmitted” to the instances that the Spawner spawns.

But everything works now.

Thank you

1 Like