Jump to content

Distance to a zone, where zone is a variable?


niks.dk

Recommended Posts

Hi,

In Urwigo I try to set up my first Wherigo.

I have zones with questions and a timer that countdown. It works fine but !

I would like to reuse my Countdown.

Right now my CountDown timer validate if Player are in the zone using 'Distance to a zone'

The problem with that is, the specific zone should be use so I should create a new timer for every zone.

I would like to come around that using a variable, but I can't figure out how to do it !

Do you have any idea how it can be done ?

Link to comment

I haven't heard of someone putting a timer in a zone and, upon the timer's expiration, checking to see which zone contains it.  That's an interesting approach.  If I couldn't adjust the code directly, I'd probably just assign each zone a number and store that number in a variable.  When the timer expires, I'd do this large if-then-else to test for the variable's value.  (Since I can touch the code, I'd likely either store a reference to the zone and all other important objects the timer's event needs or--better yet--create the tick event handler dynamically so I can take advantage of closure.)

 

I believe you might be showing an input and, if the timer elapses, showing a message saying the player failed to answer the question in time.  Please be aware this will cause the Garmin Wherigo Player to crash, powering off the GPSr in the process.  Showing any message while an input dialog is displayed causes the crash.  As long as you don't have any holdovers still using the Garmin Wherigo Player in your area, you should be fine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...