by Roody_Yogurt » Tue Sep 06, 2011 2:24 am
This took some looking into, but eventually I found the answer in the Pirate Adventure source. You want this:
Code: Select all
room hillside
{
name
{
if night_flag = true
return "A Shadowy Incline"
else
return "A Sunny Hillside"
}
}
Personally, I'm a little unclear on what are the rules about returning strings from object properties. The other day, I was unsuccessfully trying to return a printed string from a cant_go property or something, so I share your confusion.
My only guess is that since object.name isn't treated like a regular string, wackiness ensues.
EDIT: I have updated the HxE page to reflect this:
http://hugo.gerynarsabode.org/index.php?title=Name
This took some looking into, but eventually I found the answer in the Pirate Adventure source. You want this:
[code]
room hillside
{
name
{
if night_flag = true
return "A Shadowy Incline"
else
return "A Sunny Hillside"
}
}
[/code]
Personally, I'm a little unclear on what are the rules about returning strings from object properties. The other day, I was unsuccessfully trying to return a printed string from a cant_go property or something, so I share your confusion.
My only guess is that since object.name isn't treated like a regular string, wackiness ensues.
EDIT: I have updated the HxE page to reflect this: http://hugo.gerynarsabode.org/index.php?title=Name