Reprint list of objects in the room
Sharkycast
21 Dec 2016, 10:54Hello again everyone,
When a player enters a room, Quest can print a list (with hyperlinks) of all the objects in there. Is there some way I can get this to be reprinted as part of a script?
The Pixie
21 Dec 2016, 12:02This will get the list as a string:
FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
Sharkycast
21 Dec 2016, 17:23Thanks. Unfortunately, if I try to add that into the coding on the web version it just says "an internal error has occurred" and crashes. It there a way of doing it via the options on the web version?
The Pixie
21 Dec 2016, 20:50It works for me on-line. You are adding it in code view, right?
Sharkycast
22 Dec 2016, 09:49Yes; I tried again and got:
Call function FormatObjectList
with parameters:
game.pov.parent.objectslistprefix
GetNonTransparentParent(game.pov.parent) Template("And")
"."
However if I play the game I don't get a list.
Any suggestions? Presumably I need a function called FormatObjectList, but I don't know what this function should contain.
The Pixie
22 Dec 2016, 10:16Sorry, this just gets a list. You need to do something with it. Eg:
s = FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
msg(s)
Sharkycast
22 Dec 2016, 12:02Thanks... where should that code go?
Sorry for being a complete idiot.
The Pixie
22 Dec 2016, 12:28In the script you mentioned in the OP, I guess.
Sharkycast
24 Dec 2016, 11:29That's brilliant, thanks!
Next question... is it possible to show a list like that but with, say, only 'Object1' in it?
I.e. "You can see [blue hyperlink] Object1."