How to set up distance formula + retrigger logic in my current block?

Hi everyone,

I’m developing an app with geolocated stories in Barcelona (where the app takes place). Right now, I have it configured with the geolocation of the city, but we are experiencing problems: the audio that should play at a specific location doesn’t always trigger correctly.

What I want to achieve:

  1. Check the distance between the user’s location and each geofence (so the story only plays if the user is inside the radius).

  2. Prevent retriggering until the user exits the radius (so the same story doesn’t repeat constantly if the user stays in the same spot).

My questions are:

  • In which part of my current “When Location Change” block should I place the distance formula?

  • How do I configure the variable/list for retriggering so that a story only plays once until the user exits the radius?

I’ve attached a screenshot of my current block setup (see below).

Thanks a lot for your help — I’m new to this and not sure where to insert each part.

Best,
Mireia