+niks.dk Posted December 23, 2018 Share Posted December 23, 2018 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 ? Quote Link to comment
+niks.dk Posted December 24, 2018 Author Share Posted December 24, 2018 If I put the stop timer in the Zone, and not on the Timer, i get what i want. Quote Link to comment
Ranger Fox Posted December 24, 2018 Share Posted December 24, 2018 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. Quote Link to comment
Recommended Posts
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.