Enemies fire when get closer

I am makimg a platformer game and I want to enemies shoot the player when the player gets close enough…

Plz help me how can I do that… :question:

You can add a condition under the position section, “Distance between two objects.”


Player distance to Enemy is below 500 pixels. - Then add your shooting action.

I’m new here myself, but I think the distance is measured between Centers, so you might have to factor that in.