Can I set a radius for geolocation?

Get help using Construct 2

Post » Wed Jun 28, 2017 1:08 pm

Can I set a radius on the longitude and latitude values so if you come within 100 meters of the location it validates and unlocks part of the game? Or does anyone have any suggestions around this. The idea is that you can unlock new parts of game if you are in a specified location.
B
3
Posts: 3
Reputation: 181

Post » Wed Jun 28, 2017 1:20 pm

If you know your exact location coordinates, you can then check if you are at a
Code: Select all
(PseudoCode)
Longitude > Target.Longitude - Range AND
Longitude < Target.Longitude + Range AND
Latitude > Target.Latitude - Range AND
Latitude < Target.Latitude + Range


If all 4 previous conditions are true, then you are in range of the target coordinates.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,311
Reputation: 71,086

Post » Thu Jun 29, 2017 11:31 am

I couldnt understand what is this code doing. Can you please elaborate it a bit?
Subway Surfer Game Template: http://bit.ly/subwaysurfertemplate
B
60
S
23
G
1
Posts: 102
Reputation: 5,660


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests