Thanks. I was kind of trying to avoid to set up a new string list with the names of verbs in it. I was assuming that that would already exist as a list somewhere but couldn't find it. So I set up a new list as below, and this works well. My next question is: does Quest deal with junking of string lists well and will this give a performance hit down the road if I use this type of set-up multiple times? I can foresee many opportunities where I need an
ad hoc stringlist. Would I be better off creating this at the game level just once, rather than every time I jump into this function?
For those wondering why I'm doing this: I want the player to be able to see along corridors and across large rooms in my game. But then only relatively large objects like monsters and NPCs, which will be moving around. In this way the player will be able to see what's coming!
<function name="DescribeCorridorObjects" parameters="BaseRoom" type="string">
ExitVerbs = NewStringList()
list add (ExitVerbs, "go")
Printed = BaseRoom.InitialDescription
Index = 0
foreach (pointer, BaseRoom.ViewRoom) {
obj = GetObject(pointer)
Prefix = StringListItem(BaseRoom.ViewRoomPrefix,Index)
Direction = GetObject(GetExitByLink(BaseRoom, obj))
Printed = Printed + " " + Prefix + " " + GetDisplayNameLink(Direction, "exit", ExitVerbs)
+ " you can see " + DescribePeopleInRoom(obj, BaseRoom)
Index = Index + 1
}
return (Printed)
</function>
And by the way if I use Direction.displayverbs instead of ExitVerbs, I get a hyperlink on the exit, but it raises an error if I try to click it.