Changing a room description via a function

ajikeshi
12 Jan 2011, 03:44
Hi,

Is there an easy way to change a room's description after a player interacts with something?
For example, I want a player to look at an object, and the current room's description (or perhaps another room's description) will change.
I also probably want a way to keep track of when a room's description has been modified, but I guess I could do that with flags.
In any case, I've tried using the "modify room property description" option, but it doesn't seem to do anything.

I have managed to change room descriptions by setting the room description as a variable, defined by a function.
But if I do that the room no longer displays objects, the exit, or the room name in red, etc. How can I preserve these things while changing the room desc?

Thanks!

Dr.Froth
13 Jan 2011, 05:28
I don't know if it will work for what you want to do or not but this is my method for displaying differant room descriptions.

You can list the name (complete with color change) first and then begin to list your if/than clauses. Only use the if not the else and list them from least likely to occur to most likely (Quest runs the list from top to bottom until it finds something that fits the criteria...once it does it stops).

The other thing I do is make several differant "Same" rooms. I had 7 "Mossy Caves" once. The player does not know and you just use a script to move everything from one room to another when you change the exits. This makes it easier to juggle complicated scernerios and also covers the problem of the player droping something in the room.

Good luck and hope that helps.