Hyperlinks in the room description

timetolose
17 Dec 2011, 23:50
I think this is a very important issue. Somebody already asked, but I did not find a good answer.
I'd like to know how to add the hyperlinks to the objects as they appear in the room description. What I want to do is to disable the "You can see [object]" line, but have [object] hyperlinked in the actual description of the room.

I'd like to know how to do this with an explanation for... dummies (newbie) :D

Alex
19 Dec 2011, 11:33
The easiest way to do this at the moment is using v5.1 Beta, with the ObjectLink function.

You can run a script to print an expression like this:


"You can see a " + ObjectLink(book) + " here."


That will give you the hyperlink for the "book" object, with the correct list of display verbs when clicked.

I'd really like to make this easier somehow... but how? Any suggestions appreciated!

timetolose
19 Dec 2011, 11:40
It looks great! So, I must use 5.1 beta and *not" 5.0.2. Correct?

But, if I hyperlink objects in descriptions, how to disable object lists? Maybe the easiest way is to change CoreDescription.asxl?

Alex
19 Dec 2011, 11:44
Yes that's a new feature in 5.1 so it won't work in 5.0.2.

You can disable the object lists on the right-hand side of the screen by turning off the "Show Panes" option on the game editor Display tab.

Or do you mean the list of objects automatically printed for the room? You can either edit the ShowRoomDescription function, or you could try turning off "Automatically generate room descriptions" on the game editor Options tab.

timetolose
01 Jun 2012, 11:07
Sorry to bother again, but I need help...
I need to hyperlink objects in the room description and in Quest 5.2 I don't know how to do.

I need something like:
"You are in the forest,
the trees [hyperlink "trees"] are big, the stars [hyperlink "stars"] are above; yes, you are scared".

Should I run a script in the room description? How? Somebody can please to post a clear example?
thanks in advance

Pertex
01 Jun 2012, 16:05
Here are two ways how to do this. In the first room the room description is generated with a script.

In the second room there is a text description with
<object verbs="look/take">trees</object>

in it. You can only work with this if you create your game with an external editor. If you try to do it in the gui, Quest removes this links.

timetolose
01 Jun 2012, 16:49
Thank you Pertex!
So I can implement the first room using GUI, correct?
Well, too bad that the "window" for expressions on the GUI is very small and does not allow an easy writing. Anyway, you solved my issue!
I think that the feature, objects hyperlinks in room description, should be customized in the next release; it is very good to write "narrative adventures"!

timetolose
01 Jun 2012, 17:18
An important note about this. I think that you cannot write a long room description with object hyperlinked using an expression, because expressions must be short.

So, if you need a long room description with object hyperlinked inside, you must alternate your description with "messages" and "expressions".

Said that, two questions about expressions grammar:
How to avoid that the text in the expression goes down, on a "new line"? (I mean, text don't remain in the same line of the messages above)
How to create a blank line before the beginning of a text of an expression?
cheers.

Pertex
01 Jun 2012, 20:15
timetolose wrote:An important note about this. I think that you cannot write a long room description with object hyperlinked using an expression, because expressions must be short.

Why can't you use long expressions? Perhaps it's better to edit them in code view.

timetolose wrote:
How to avoid that the text in the expression goes down, on a "new line"? (I mean, text don't remain in the same line of the messages above)

Why do you have new lines in your description? You can print normal text with expressions, too.

timetolose wrote:
How to create a blank line before the beginning of a text of an expression?
cheers.

If you use script with the room description just add a 'print message' without any text before the expression line.

sgreig
02 Jun 2012, 09:04
Pertex wrote:timetolose wrote:
An important note about this. I think that you cannot write a long room description with object hyperlinked using an expression, because expressions must be short.
Why can't you use long expressions? Perhaps it's better to edit them in code view.


I can only assume he's referring to the fact that the input area in the gui doesn't scroll when your text extends beyond it's length.

@timetolose Expressions don't have to be short, the text area just doesn't scroll. It's still keeping track of everything you type, but if your expression needs to be longer it's better to use the code editor so you can see what you're typing.

timetolose
02 Jun 2012, 14:48
Sorry, guys, I was wrong: expressions can be long!

In the code editor, anyway, I am not able to write the text of an expression on many lines: if I press "Enter" to continue on a second line below, Quest returns an error. Should I use another, external editor?

Said that, I need another help for expressions. Example of a room description:

"You are in a bedroom, there is a bed (hyperlinked) and a cat (hyperlinked)".

Well, now, if I take the cat, of course the cat should not be anymore in the room description, and the room description must change to: "You are in a bedroom, there is a bed".

How can I do that?

sgreig
03 Jun 2012, 09:03
timetolose wrote:Well, now, if I take the cat, of course the cat should not be anymore in the room description, and the room description must change to: "You are in a bedroom, there is a bed".

How can I do that?


Make the room description a script with an if statement to check for the cat, and modify the description based on that.

timetolose
03 Jun 2012, 13:22
sgreig wrote:

Make the room description a script with an if statement to check for the cat, and modify the description based on that.


Somebody can please make an example of such an "if statement"?

Pertex
03 Jun 2012, 18:46
You can create a stringvariable like this
cat.png