Changing room description depending on where and what an object is doing

I think I know how to do this, but basically, I wanna know what would be the easiest way to print in the description if the object is in the room and what it's doing in the current room, but if the object isn't in the room the player is currently in, it will print something else. Also, if there were more than 1 object in the room, is it possible change the room description further to include both of those objects? Sorry if I'm asking too much.


Also, if there were more than 1 object in the room, is it possible change the room description further to include both of those objects?

Sounds like you might want to try "in room descriptions"

You can enable this feature on the 'features' tab, and then you can give any objects an in-room description. The descriptions of objects will be added to the end of whatever room they're in.

If you want a specific description for when an object is not present; or if you only want the description to appear in a particular room, you could do that with the here/nothere text processor commands.

For example, a room description could be:

The field is just an open expanse of grass. There is {nothere bull:{nothere sign:nothing particularly interesting to look at}}{here sign:a {object:sign} in the middle of the field warning "beware of the bull".  It seems pretty pointless, as by the time you're close enough to read it{here bull: your attention is dominated by }{nothere bull:, it is clear that there is no bull in sight.}}{here bull:a massive {object:bull} charging towards you}.

Obviously, in that example I've got quite a lot of the {}, because there's a bunch of very different things it can say. In most cases, unless the objects interact with each other, it might be simpler.


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

Support

Forums