Jump to content
Sign in to follow this  
Followers 1
niks.dk

Distance to a zone, where zone is a variable?

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 ?

Share this post


Link to post

If I put the stop timer in the Zone, and not on the Timer, i get what i want.

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 1

×