How do I change a certain room using an object in another room?

Hello, I’m really new when using text adventures, and it would be amazing if I could get some help. I’m trying to make so I leave to another room, full of people, where I eat a pie, and when I return to the first room, all the people are gone. Help would really be appreciated.
Thank you!

  1. Make a “junk room” with no entrances or exits. Leave it empty to start.
  2. When player eats pie, run a script that moves all the people in the room to the “junk room”.
  3. Perhaps you might want to change the room Description as well. If so... set a flag on the room with people when the pie is eaten and maybe name it ‘pieeaten’.
  4. In the room description of the changed room, select run script. If room has flag ‘pieeaten’ print message indicating the room is empty. In the else Part of this script print a message indicating there are people in the room.

How about a second room, same description, but with no people.
and show or hide the exits from there.
(Nice thing about programing, more than one way to get something done.)

thank you, I've been stuck on this for a while, this helped a lot!

I don't think you need a junk room for removed objects; objects are perfectly happy not being in a room. You even have the built-in RemoveObject function, which moves an object outside of any room.


Truth. I still do it the way I learned it despite it being archaic and probably inefficient. Old dog new tricks thing, ya know. Also, I think it helps me organize things especially if I have plans to
Use them again.

Yeah. I often create inaccessible rooms to store objects that might be moved to where the player can reach them later; or the originals of objects I intend to clone. Sometimes I have several of those rooms, organised by type of object, so I can quickly build a list of them. Not to mention making it easier to organise stuff in the editor.

It's only for objects that start in some room and are later removed that there isn't much point creating a room to move them to.

Log in to post a reply.