Changing the original description of an object

In a Quest game if I look at the paper I get a message that there's a sheet of paper on the ground. If I put up the paper then look at the paper then I'm going to get the same message telling me that the paper is on the ground.
The only way I've found around this is to write a conditional script command that tests if the player has the paper then prints the correct message else if the player does not have the paper then a different description is displayed.

I was wondering if there was a better way then using script commands and was hoping that you could change the objects description.

Also I noticed that I need an "else" command after a if


You can use a text processor command inside an object's description. For example, your description could be: {either Contains (player, sheet of paper):It's somebody's shopping list.|There is a sheet of paper lying on the ground.}

Alternatively, the description for an object's description is stored in its look attribute. So if you want to change it permanently, just change that attribute. For example, if you allow the player to dip the piece of paper in water, you could include the script command:

sheet of paper.look = "A damp piece of paper. The ink has run, rendering it illegible."

That simply changes the description, so the new one will appear every time the player looks at it, without needing an additional check. The new description can be either a string or a script.

If you are using in-room descriptions (which I mentioned in my other post), you might also want to change the inroomdescription attribute at the same time.

Good to know that you can change the objects description thanks meangel.

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