[solved] Flashback scenes -- how to, the right way?

I sense I’m missing some important commands, here. The following code works but feels highly artificial. Basically, I want to be able to flashback to a scene where you have no items, and then give you the items back once you return.

Creating a nonfunctional person to safeguard your items seems grossly artificial, and I think there has to be a better way.

Is there an extension for this? Or some simple part of Inform syntax I’m missing? I didn’t find anything in the docs’ chapter on scenes.

Thanks!

[code]“inventory” by Andrew

the thingamabob is a thing.

when play begins:
now the player carries the thingamabob.

room 1 is a room.

shazaming is an action out of world. understand the command “shazam” as something new. understand “shazam” as shazaming.

zashaming is an action out of world. understand the command “zasham” as something new. understand “zasham” as zashaming.

Bob T[period] Hingama is a person.

carry out shazaming:
repeat with q running through things:
if player carries q:
now Bob carries q;

carry out zashaming:
repeat with q running through things:
if Bob carries q:
now player carries q;

test pow with “i/shazam/i/zasham/i/shazam/i/zasham”[/code]

It might be easier to have the flashback scene played out by a different viewpoint character in a different room (or set of rooms). This will take care of both inventory and X ME automatically.

[code]“inventory” by Andrew

the thingamabob is a thing.

when play begins:
now the player carries the thingamabob.

Present-day Room 1 is a room.
Bob Hingama is a man in Present-day Room 1. The player is Bob Hingama. The description is “You look old.”

Room 1 of the Distant Past is a room.
Young Bob is a man in Room 1 of the Distant Past. The description is “You look young.”

shazaming is an action out of world. understand the command “shazam” as something new. understand “shazam” as shazaming.

zashaming is an action out of world. understand the command “zasham” as something new. understand “zasham” as zashaming.

carry out shazaming:
say “SHAZAM!”;
now the player is Young Bob.

carry out zashaming:
say “ZASHAM!”;
now the player is Bob Hingama.

test pow with “i/x me/shazam/i/x me/zasham/i/x me/shazam/i/x me/zasham”[/code]

Man, that’s nice. Thanks much. I’ve wanted to try for a way to make you play 2 different characters, but I’d been intimidated, and this is a great introduction. And, like you said, it takes care of a few other things, too.

You might also want to check out the “Pine” series of examples in the documentation, which have lots of flashbacks. As I remember, it creates a special room to store your pre-flashback inventory, which is not so different from your approach.

Thanks, again…somehow, I missed those examples. It’s good to have more than one way to do things. I like the solution of a different room.

Switching the player is often the right thing to do. I sometimes wish I’d chosen to do my WIP that way, but I ended up doing it more like the Space Patrol example, which is like your Bob T. Hingama except it uses separate containers for carried and worn objects.

But for me, the critical problem with your first attempt is not the approach, but the naming of objects. I’d probably name the backup person “the costume dummy” or “the storage mannequin.” In my WIP, things sometimes have to be removed from rooms as well as people, so I have a holder for those things called “the present place.”

I agree. I would definitely change Bob’s name during actual coding of something I’d release. The thing is, when I’m trying to write a chunk of code as an exercise–simple, dumb humor goes a long way in reducing frustrations. It doesn’t have to be a gut-buster, or classic humor, or anything like that, and it probably shouldn’t be. Too much would detract. But I really believe that the humor in some of the Inform IDE or even in some extension documentation eases the pain of cluelessness.

Other people’s mileage may vary. But yes, for actually doing something meaningful, I like your place/person names for games.