I can think of two ways this would be implemented in general, not necessarily with Construct 2.
1. Use bluetooth to discover and communicate with nearby devices. Construct 2 can't do this as far as I'm aware, and I'm unsure of the feasibility of writing a plugin for it.
2. Setup a remote server to exchange data. Every X units of time(5 seconds, perhaps) the player's device polls the service, including their own location with the request. The server takes that location and responds with a list of nearby players and their info. At this point there are a couple things you could do:
2(a). Open a direct connection to nearby players using websockets and bypass the server once contact is initiated.
2(b). Have the two clients communicate through the server, sending actions to the server as they happen and frequently polling the server for the latest actions of the other player. This would preclude the possibility of fast paced games.
Construct 2 should have everything you need to allow for either of the methods(a and b) outlined in option 2. Just know that this opens a can of worms concerning privacy, as user data -- likely non identifying, of course -- has to be shared with and persisted on a server somewhere, even if only briefly. The fact that we're talking location data here makes the issue especially touchy.
Actual implementation details would be complicated and depend a lot on what you ultimately want to do, so I'm just going to leave you with the general overview above. Hopefully that pushes you in the right direction, though.