UNDO Revisited [Seems to be completely solved with Quest 5.8]

In March, in a now-closed thread on the use of UNDO, I suggested:

There are so many problems with undo that it is probably better to design games so that it isn't needed.

Sorry for the negativity! After the recent success of finding ways to make hyperlinks, game panes and the map dynamic, no problem seems too great!

One basic issue with UNDO is that it doesn't adjust the map. However, as this was solved in handling dynamic game panes, the fix for UNDO now seems simple, i.e. introduce an UNDO command that recentres the map each time it is used:

  <command name="new_undo">
    <pattern>undo</pattern>
    <script>
      undo
      Grid_DrawPlayerInRoom (game.pov.parent)
    </script>
  </command>

I was worried that this might be recursive, infinitely repeating, but it seems fine in practice.

What are the other problems with UNDO? I know I've had trouble using UNDO when playing games with turnscripts, but never investigated these at the time. If we can spell out the problems precisely perhaps fixes can be found?


Just to cover all the bases:

  <command name="undo">
    <pattern type="string">[undo]</pattern>
    <script>
      undo
      if (GetBoolean (game, "gridmap")){
        Grid_DrawPlayerInRoom (game.pov.parent)
      }
    </script>
    <isundo/>
  </command>

Also note that this is the default UNDO command in Quest 5.8.


Also note that this is the default UNDO command in Quest 5.8.

Perfect! Sounds like further discussion needs to be based on 5.8 which perhaps solves all problems? Better load it and try it out...
...oops, that didn't work too well. Produced a system error on loading my first game "L Too". Perhaps need to wait a while for this to stabilise.


Actually, I think it should be (but I'm not sure; Pixie may be suppressing the turn scripts when isundo is true):

  <command name="undo">
    <pattern type="string">[undo]</pattern>
    <script>
      undo
      if (GetBoolean (game, "gridmap")){
        Grid_DrawPlayerInRoom (game.pov.parent)
      }
      game.suppressturnscripts = true
    </script>
    <isundo/>
  </command>

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums