So, newconverse has this feature where >UNDO can remind the player what is being undone:
> talk to manIt exists for a couple different reasons. I think, originally, the point was so that in a game where >UNDO skips over whole conversations, I wanted a mechanism to allow for a "[undoing to before conversation]" (which it does, under the right circumstances). It's also useful because it clarifies what really is being undone. Sometimes, as Hugo game authors, we might accidentally put important game text or code in something that returns false or, just as likely, a player might perceive a turn as counting (when it did not). This feature always keeps the player in the loop as to what's being done. Take, for instance:
The man's eyes catch the torchlight for a moment as he looks up atyou.> undo[ undoing >talk to man ]Gloomy Hall>
> talk to man
The man's eyes catch the torchlight for a moment as he looks up atyou.> sleepNot now--there's work to be done.> undo[ undoing >talk to man ]Gloomy Hall>
ANYWAY...
So I noticed that the above feature was having a conflict with the issue from the last post. If you type only an object, the engine runs FindObject. After that, it jumps straight to SpeakTo. Oddly enough, it clears the word array before calling SpeakTo so my undo-command-saving code (which I stuck in an event, as that runs after every successful turn) wasn't saving the command properly (as concise as it was).Anyhow, lots of futzing later, I got it working, but I also found out that a major culprit to it not working had been that while roodylib uses the word array to save states during UNDOs, RESTOREs, and RESTARTs, I was saving too low on the word array so some of it was actually being written over after a successful UNDO, screwing over the word-array-checking after-UNDO code.
I don't know how well I described all that, but that's what I did today!
No comments:
Post a Comment