Reprint list of objects in the room

Sharkycast

Hello 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

This will get the list as a string:

FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")

Sharkycast

Thanks. 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

It works for me on-line. You are adding it in code view, right?


Sharkycast

Yes; 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

Sorry, 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

Thanks... where should that code go?
Sorry for being a complete idiot.


The Pixie

In the script you mentioned in the OP, I guess.


Sharkycast

That'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."


Log in to post a reply.

Support

Forums