Jump to content

Displaying Timer/Function to Cacher


Troopbiz

Recommended Posts

Greetings fellow cachers, I'm wondering if you could help me out with a situation that's occurring while I'm trying to build my Wherigo. Note, I'm using Urwigo for the main reason that it is more user friendly than the "offical" builder. My question is, is there a way that I can display how much time is left or what a function score is to the cacher while he/she is playing the Wherigo?

 

For example; At the start of the Wherigo a timer begins. The cacher is told he/she has to complete the Wherigo in 60 minutes. Is there a way to program the Wherigo for the cacher to view how much time is left? I'm having the same issue trying to create a score system using functions. I want to reward the cacher for doing something correctly in a fast amount of time by giving him/her points. They can then use the points for hints and tips, but how can they view those points? I've tried making the function act like an item in the inventory, but couldn't figure it out. I'm open to any suggestions. Thanks

Link to comment

(I'm answering this on a cell phone while in line for a car wash. I need to be brief.)

 

Set a countdown timer that expires every minute. Every time it expires, increment or detriment a variable to track the remaining time.

 

To show the player, set the description of an item. You might have to get creative using Urwigo. For example:

Your points: ]] .. pointsvariablename.. [[ [\b]

 

Or something like that. Look at the source for my "Run to the Outback" cartridge as I show the player a timer every three seconds.

 

Some things might require custom code.

 

(I'm still in line for the car wash.)

Link to comment

(I'm answering this on a cell phone while in line for a car wash. I need to be brief.)

 

Set a countdown timer that expires every minute. Every time it expires, increment or detriment a variable to track the remaining time.

 

To show the player, set the description of an item. You might have to get creative using Urwigo. For example:

Your points: ]] .. pointsvariablename.. [[ [\b]

 

Or something like that. Look at the source for my "Run to the Outback" cartridge as I show the player a timer every three seconds.

 

Some things might require custom code.

 

(I'm still in line for the car wash.)

 

I appreciate you replying so fast, but I'm still confused. I tried downloading your "Run to the Outback" Wherigo, but I couldn't open it... even in the official builder. When you have more time can you please explain it to me in more detail? Thanks

Link to comment

Try looking at the attached file. I know the forum has attachment issues, so if the attachment doesn't work, try this link (it's a temporary link on one of my domain servers).

 

I created a zone, timer, item, and two variables. The zone uses OnEnter to start the timer. The timer is a one second countdown timer. It's not an interval timer due to compatibility with Garmin devices and to be lighter on resources on those some devices. The timer ticks every second. More on this later. I have one item that tells the number of seconds remaining. There are two variables. The first variable keeps track of the number of times the timer has ticked (since it's a one second timer, I'll be incrementing this by one each time). The second variable stores the maximum number of ticks or seconds the timer should loop. I could have used the ticks counter to count the number of ticks and the total variable to contain the number of total ticks, or I could have make the ticks counter count the number of seconds and the total variable contain the total number of seconds. That's an implementation detail and it's just whichever way the author wants. I'm using that total ticks variable so I can change the entire cartridge by changing the value of this one variable; doing it this way would save me time in testing and implementing a game. Again, it's based on the author's cartridge creation style.

 

Now, for the timer tick event. First, I increment the tick counter. I then test to see if the number of ticks is still less than or equal to the total number of ticks. In other words, I'm checking to see if there's time left on the timer. If there is still time left on the timer, I set the item's name and description equal to "Seconds left" and the number of total ticks minus the tick counter. In my example cartridge, the player will see a two minute timer. Thus, for the first time through, total ticks will be 120 and ticks will be 1, so the user will see "Seconds left: 119", and the next second will show "Seconds left: 118".

 

You will need to view the author script after you import this into Urwigo to see what I'm doing. I wrote it in Groundspeak's builder for compatibility's sake (as Urwigo can import from this format). In Groundspeak's builder, it wouldn't build the cartridge when I had this under the builder-generated code as it left off the beginning double quotes. I ran out of time to play around with this in Urwigo. But take a look and see what you can see. I'll be on the forum all week, every week, so I'm not going anywhere.

 

It would be interesting if there was an Urwigo update to allow people to show a variable's value simply by enclosing it in double square braces. That might make cartridges like this easier.

troopbiz.zip

Link to comment

I may be able to figure it out from what you have written, but I am a much more visual person. I tried opening the attached Wherigo, but the same error popped up. This time I took a screenshot of it and I will attach it below so you can take a look at it. I opened the .lua file in Groundspeak's Wherigo builder. How could I go about fixing this? post-2464712-048953000 1454296199_thumb.jpg

Edited by Troopbiz
Link to comment

Greetings fellow cachers, I'm wondering if you could help me out with a situation that's occurring while I'm trying to build my Wherigo. Note, I'm using Urwigo for the main reason that it is more user friendly than the "offical" builder. My question is, is there a way that I can display how much time is left or what a function score is to the cacher while he/she is playing the Wherigo?

 

For example; At the start of the Wherigo a timer begins. The cacher is told he/she has to complete the Wherigo in 60 minutes. Is there a way to program the Wherigo for the cacher to view how much time is left? I'm having the same issue trying to create a score system using functions. I want to reward the cacher for doing something correctly in a fast amount of time by giving him/her points. They can then use the points for hints and tips, but how can they view those points? I've tried making the function act like an item in the inventory, but couldn't figure it out. I'm open to any suggestions. Thanks

 

When I do something like this I use items because I'm not used to work with functions.

You have two way you can do it when you do it with Items.

  • You can change the name of the item on the moment that the value of the points/time has changed. With concatenate you can put variables and text (as value) in the name (set name...)
  • You can make a command for your item. There you can put a message with the points/ time left. You have to put concatenate into the message box and then drag your variables and
    text (as value) into concatenate

If you want that I send you an example please send me your email adress

Email

 

De GC-lopers

Link to comment

Greetings fellow cachers, I'm wondering if you could help me out with a situation that's occurring while I'm trying to build my Wherigo. Note, I'm using Urwigo for the main reason that it is more user friendly than the "offical" builder. My question is, is there a way that I can display how much time is left or what a function score is to the cacher while he/she is playing the Wherigo?

 

For example; At the start of the Wherigo a timer begins. The cacher is told he/she has to complete the Wherigo in 60 minutes. Is there a way to program the Wherigo for the cacher to view how much time is left? I'm having the same issue trying to create a score system using functions. I want to reward the cacher for doing something correctly in a fast amount of time by giving him/her points. They can then use the points for hints and tips, but how can they view those points? I've tried making the function act like an item in the inventory, but couldn't figure it out. I'm open to any suggestions. Thanks

 

When I do something like this I use items because I'm not used to work with functions.

You have two way you can do it when you do it with Items.

  • You can change the name of the item on the moment that the value of the points/time has changed. With concatenate you can put variables and text (as value) in the name (set name...)
  • You can make a command for your item. There you can put a message with the points/ time left. You have to put concatenate into the message box and then drag your variables and
    text (as value) into concatenate

If you want that I send you an example please send me your email adress

Email

 

De GC-lopers

 

I would love to see an example!

Link to comment

Greetings fellow cachers, I'm wondering if you could help me out with a situation that's occurring while I'm trying to build my Wherigo. Note, I'm using Urwigo for the main reason that it is more user friendly than the "offical" builder. My question is, is there a way that I can display how much time is left or what a function score is to the cacher while he/she is playing the Wherigo?

 

For example; At the start of the Wherigo a timer begins. The cacher is told he/she has to complete the Wherigo in 60 minutes. Is there a way to program the Wherigo for the cacher to view how much time is left? I'm having the same issue trying to create a score system using functions. I want to reward the cacher for doing something correctly in a fast amount of time by giving him/her points. They can then use the points for hints and tips, but how can they view those points? I've tried making the function act like an item in the inventory, but couldn't figure it out. I'm open to any suggestions. Thanks

 

When I do something like this I use items because I'm not used to work with functions.

You have two way you can do it when you do it with Items.

  • You can change the name of the item on the moment that the value of the points/time has changed. With concatenate you can put variables and text (as value) in the name (set name...)
  • You can make a command for your item. There you can put a message with the points/ time left. You have to put concatenate into the message box and then drag your variables and
    text (as value) into concatenate

If you want that I send you an example please send me your email adress

Email

 

De GC-lopers

 

I would love to see an example!

 

I can't put it on this forum so I need your E-mail adress so I can send it to you

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...