Jump to content

Quit cartdridge WITHOUT saving


Followers 1

Recommended Posts

Hi there,

Folks from this forum have already helped me a LOT, so I allow myself to post another question. I'm not an urwigo nor an LUA guru, so it helps a lot.

 

In Urwigo, there's an action you can use in order to save and close the game.

For my cartridge, I want to create an event when the cartridge closes without saving the game. I want to do save states at specific times during gameplay, and I also want to be able to close the game at very specific times. Is there a way to do that with an LUA function ?

Edited by Plateo et Ana
Link to comment

We had this discussion here in the forum some time ago. The consensus was, that it is no good behavior to do this, because the players are frustrated. It will be no good encouragement.

 

If you want to do it anyway, than you could use a Lua command to crash the cartridge. Try

 

local func = nil
func()

It's not good to do this at all, because the Wherigo players are in an undefined state, but should do, what you want.

Link to comment

There's an easier way to get what you want.

 

Close the cartridge

Just deactivate all your zones and tell the player they lost the game. (There is a call to exit the game, but I think that is usually accompanied by saving the game.)

 

Save only during certain times

Maintain a number variable. At certain stages in the cartridge, increment the variable. This represents the player passing a checkpoint. As for resuming the cartridge, there's an event for that. Write something that tests for the checkpoint variable's value and then set the cartridge objects up (zones, items, characters, etc.) in the way they should be right after passing the checkpoint. It now no longer matters when the player saves because you are controlling what the cartridge looks like when it is resumed.

 

Close the cartridge, reprised

Instead of closing the cartridge, tell the player they lost and call your script to resume the cartridge at the checkpoint variable.

Link to comment

A few years later :rolleyes: I am also looking for an implementation of something like "checkpoints" (= reset the gameplay to a specific time / situation). The difficult part for me is

 

Quote

...then set the cartridge objects up (zones, items, characters, etc.) in the way they should be right after passing the checkpoint.


From the checkpoint to the time when the game is to be reset, there may have been quite a lot of changes. It can be quite challenging to get all of them back to the state of the checkpoint.

 

So I was wondering if there is a way to save and load the current state of the gameplay under a qualified name (something like "Save As" via a Lua command for example)?

Link to comment
2 hours ago, watersphere said:

So I was wondering if there is a way to save and load the current state of the gameplay under a qualified name (something like "Save As" via a Lua command for example)?

No, there is only a 'save' command. No way to save under another name. You could make some variables that remember the state at some point and save them too.

Then you could reload in your cartridge the stage-variables back into the 'running'variables...

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...
Followers 1
×
×
  • Create New...