Inline Hyperlinks for "Scenery" objects

BTownTKD
29 Jan 2013, 02:16
I have a few objects that I have marked as 'scenery,' because I include them in my room's static description. However, they are interactable, and as such I would like to know if there is some way to highlight certain words in my room description, treating the words as hyperlinks representing my scenery objects.

Is there an easy way to do that?

Pertex
29 Jan 2013, 07:28
Sure, you can do this with ObjectLink() http://quest5.net/wiki/ObjectLink

<look type="script">
text="There is a " + ObjectLink(tree) +" next to you."
msg(text)
</look>

TriangleGames
03 Feb 2013, 14:37
I'm having trouble getting this to work.
I'm using the WebEditor, and I'm trying to apply this to a container object within a room, not to an actual room description.
The target object is a 'crowd' which contains NPC objects.
Attached is a screen shot, but I will also explain more.

I have taken the following code and placed it, as is, directly into the "Look at" object description text for the 'crowd' object. When I play it, I get an error saying, "Unrecognized element: 'look' "
<look type ="script">
text="You see an assorted gathering of villagers, travelers, and adventurers. Most are fairly common. What stands out is an " + ObjectLink(urban ranger) + "."
msg(text)
</look>


I also tried this method, but it didn't work any better.
<description>This is a <object verbs="examine">urban ranger</object>.</description>


Part of why it's hard for me to figure out what I'm doing wrong is that I'm a bit uncertain what limitations the WebEditor has. I know it's a beta and it also lacks certain features for direct editing of things like attributes, but are there some things it cannot do at all, or is it simply that they have to be done "the hard way?"
I also feel unclear on where code can be placed. You can see what I did in the img attachment, but I'm not at all confidant that putting that sort of thing in that spot would ever do what I'm expecting.

So, did I do it wrong, correctly in the wrong spot, or does that not even work in the WebEditor?
ObjectLink.JPG

HegemonKhan
04 Feb 2013, 03:13
in your example, you've got a space, which shouldn't be there, this might be causing the problem. Otherwise, Pertex will have to help you, as I don't really understand this stuff.

this:

<look type ="script">

has a space that shouldn't be here:

<look type(unwanted space)="script">

so, try changing it to this:

<look type="script">

(NO space on either side of the "=" sign)

---------

also, you need to indent the lines [ "text=..." and "msg(text)" ] of code that are of the script.

so, here, try using this (copy and paste):

<look type="script">
text="You see an assorted gathering of villagers, travelers, and adventurers. Most are fairly common. What stands out is an " + ObjectLink(urban ranger) + "."
msg (text)
</look>

Pertex
04 Feb 2013, 08:29
No, you have to use "run a script". Here is a screenshot how to do it:
link.jpg

TriangleGames
04 Feb 2013, 20:25
Ah ha! Thank you so much for clearing that up, it's working perfect now!
I'm really trying not to do anything unnecessary while I get the hang of Quest, but that crowd object is in a tavern bar which was going to end up with about fourteen objects listed all together with its description, and it just looked messy.

So, for future reference, if I see an example code that just looks like "raw code," as in your first example, it would probably need to be put into the actual code view, which is only available in the installed version of Quest, not the WebEditor.
Is that correct?

Pertex
04 Feb 2013, 20:53
yes, thats right.