Jump to content

Storing CompletionCode for later retieval?


ModelCitizen

Recommended Posts

My first Wherigo cartridge is working in the emulator and on my Motorola Droid. When the cartridge completes, I display a message to the user showing them the CompletionCode. I also write that CompletionCode into the description of a "Completion Code" item I created and add it to the player's inventory. In the cartridge code, right after I write the CompletionCode into the item description, I automatically save the completed cartridge for the user, hoping that they would be able to run the cartridge again later at home, restore the saved game, and be able to check the CompletionCode in the item in their inventory.

 

The problem I'm having is that the Completion Code item's description is blank when the saved game is reloaded. I've checked it at the end of the game, and the code is there, but when it's reloaded it's gone. The Completion Code item I created is present in the inventory, but the description is blank.

 

Anyone know what I'm doing wrong or how to get the code to stick with the item after the cartridge is closed and re-opened?

 

Blue skies!

Model Citizen - Zero Discipline

Link to comment

Does onResume work? I get onStart to work, but onResume does not fire on iPhone and don't think I have got it to work on Garmin. Works on Emulator (of course) but that doesn't help much.

 

There are workarounds to onResume to do the same idea but they are much more clunky.. just curious if onResume (and onSave and onExit for that matter) work on all players. Only one I have had luck with is onStart.

 

Until I'm able to play around with this issue, I can suggest a workaround: use the cartridge's start and resume events to set the item's description.

Link to comment

I use the resume event to prevent, that the player plays in emulator, store a level, go outside, load the level and then plays to finish the Wherigo. If the game is saved in emulator a variable "SavedInEmu" is set to true. On event onResume I check this and in case the variable is true, I give out an error message. On garmin oregon these works.

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