Jump to content

Workaround for Multiple Choice Inputs on Colorado?


ModelCitizen

Recommended Posts

I've been refining my first Wherigo cartridge and hope to release it soon, but when I tested it today it ran fine on my Moto Droid, but not on my Colorado. There are a couple of explanatory message boxes at the beginning of the cartridge. Those worked. However, as soon as I entered the first zone, the Colorado screen quickly dimmed and the device shut off. I tried fresh batteries. It's not a battery issue. When the first zone is entered, the cartridge is supposed to show a message with a picture, then when the user clicks "OK" it gets a multiple choice input from the player. The Colorado dies before it even displays the first message.

 

So, I did a bunch of searching here on the forum and other places. I believe it might be related to the known bug with the Colorado and multiple choice inputs. When I first wrote the cartridge it was very simple. No inputs at all. Everything worked properly on the Droid and the Colorado. Now that I've added the multiple choice questions the Colorado crashes. I downloaded the latest firmware for my CO, but that didn't help either.

 

Does anyone know of a good work-around for this? I don't want the user to have to type the answers in, and I don't want to have to specify in my cartridge description that it won't work on a Colorado.

Edited by ModelCitizen
Link to comment

Another possibility I considered is to present some answer options to the user whith an option number in front of each and then have them enter the number of the option they choose in a text input. However, it looks like I can't format the question part of an input with line breaks to arrange the answer options neatly without having them run together. What I'd like to end up with is something like this:

 

Here's your first question: What part of the Sun has the highest temperature?

1. The core

2. The surface

3. The corona

<Text input field>

 

I think what I would end up with would be this:

 

Here's your first question: What part of the Sun has the highest temperature? 1. The core 2. The surface 3. The corona

<Text input field>

 

Anyone know of a better way to do this so that I can support Colorado devices?

 

Blue skies!

Edited by ModelCitizen
Link to comment

The known issue with the Garmin Wherigo Player is this: the Player will crash the device (power if off) if an input is triggered while one is already on screen, be it the same or another input. The Player also only tends to raise the OnEnter event only when the player gets within zero feet/meters of a zone. Thus, it's possible to assume you have triggered OnEnter, the device then recalculates its position to outside the zone, then recalculates again to put the player back within the zone, firing the event a second time.

 

I have two good examples of this happening to me in the field for a good reason. In Washington, I had to get information from a sign on a bridge. In Kentucky, I had to get a number from a tank. In both instances, I had to move around quite a bit until I found the information. This placed me outside the zone, then back in, and crashed the device.

 

To avoid things like this, it's a good rule of thumb to deactivate your zone (or whatever triggered the event) before doing anything else.

 

I would like to encourage you to post your event's code to this discussion so we can have a look (as we're assuming it's a zone's OnEnter event, but it could just as well be OnProximity or anything else).

Link to comment

Thanks. In the OnEnter event for the zone I already have code to deactivate the zone and make it invisible, but it's not the first code in the script. The MessageBox comes first, then I change the active and visible states of an item before deactivating the zone whose OnEnter event was triggered. After that, some item, task, and zone updating is done, but the next zone isn't activated until the user answers the Input question correctly. I only have one zone active at a time, and during the time that the user is answering the multiple choice question no zones are active. I'll try moving the zone deactivation to the top of the script.

 

By the way, the Multiple Choice Input I was worried about isn't executed until the user clicks on the first MessageBox that is presented. I'm not using any proximity or other zone events; just OnEnter. Here's a code snippet: (in case it matters, I'm using Wherigo Builder)

 

-- Enter One Zone --

Enter One Zone Comment

Show a message to the player (Contains Button Script)

Set zitemOne Visible true

Set ztaskGotoOne Complete true

Set zoneOne Visible false

Set zoneOne Active false

Set ztaskGotoTwo Complete false

Set ztaskGotoTwo Active true

Set ztaskGotoTwo Visible true

Set zoneTwo Visible true

Move zitemOne to zoneAll

 

-- Message Box Button Script: Script run when default "OK" button is clicked on the message above --

One Question Comment

GetInput zinputOneQuestionInput

 

-- One Question Input Code: When a player inputs data --

One Question Comment

If OneAnswer Equal The surface

Show a message to the player

Set zoneTwo Active true

Save cartPOB game

else

Show a message to the player (Contains Button Script)

end

 

I won't be able to try this fix with the zone deactivation first in the script until probably tomorrow. I'll post an update later.

 

Thanks!

Model Citizen - Zero Discipline

Link to comment

Just for curiosity's sake, before you test, put the deactivation code above the input code. Also, you don't need to set the zone as invisible if it's inactive. You can if you'd like, but there isn't any point to it.

 

I'll be interested in what you report. From Thursday on, my replies might be a bit slower because I'll be in South Dakota doing some geocaching. I'll still check every evening, of course.

Link to comment

Update: Moving the zone deactivation command to the very beginning of the OnEnter event completely fixed the crashing problem. I was able to walk the entire cartridge and verify its operation. I can certainly see how the OnEnter might get triggered more than once the way I was doing it. The Colorado is very slow to complete the display of the MessageBox and then deactivate the zone. In the meantime, the coordinates have plenty of time to be recalculated and bounce in and out of the zone. Thanks so much for clearing this problem up for me!

 

Blue skies!

Model Citizen - Zero Discipline

Edited by ModelCitizen
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...