object properties are useful for changing descriptions

Brian123
I have found the object properties useful when I want to display the correct description of an object
For it example in the description of a ball I could have
if ball.wet = False: A ball
if ball.wet = True: A wet ball

I can't remember the correct syntax but I think you will understand what I mean.
This was how the adventure Zork worked when there as a change in the description.

Regards Brian

Silver
You don't need to check for something to be false with a boolean.

if ball.wet = true
then msg ("the ball is wet.") {
else
msg ("the ball is dry.")

Silver
You can also use the text processor in a description.

You can see a ball. {if ball.wet:It is dripping wet.}

Silver
Or: you can see a {object:ball}{if ball.wet: which is wet}.

Brian123
Noted thanks.

I have tried setting flags but in the case of the display e scription properties seems the only way to test objects.
maybe properties are better for tests than using flags as it's easier to read the script.

Brian123

The Pixie
Internally, flags are just what the GUI calls boolean attributes/properties (though they do have functions to turn them on or off, that is just so the GUI interface can handle them).

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

Support

Forums