Quest: Run Script on Description

Is there a way to do something like this…

(I think this is a way to do it on Inform 7)
"The Shore is a room. The description is “Along the shore, you see the
tips of sharp rocks through the waves of the water. You note in your
head that you will [italic type]never[roman type] (unless if there are
any emergencies), ever swim on that water. [if key is in the
shore]Your eyes are blinded by a shine of an object.[end if] [if
amulet is in the shore]Lying on the sand is a familiar, emerald green
amulet.[end if]”

A key is a thing. It is in the shore. It is undescribed. The
description is “A rusty key with silver specks and [’]House[’]
engraved on it.”

A amulet is an object. It is in the shore. It is undescribed. The
description is “You faintly remember that the amulet belongs to you,
but that’s all you know.”."

… On Quest? I’m trying to do it on the Run script option, but I
can’t get it to work.

What I am trying to say is, I want “Lying on the sand is a familiar, emerald green
amulet.” to appear only if the amulet is on the ‘shore’ room, and “Your eyes are blinded by a shine of an object.” to appear only if the key is, also, on the shore room.

Never mind, found out a way.

I tried to get into Quest twice in my experience in IF. I gave it up because I couldn’t really figure out how to write conditions, or to launch scripts conditional based on game state (which of course is very important in any game). So, you found out how to insert conditions into the text of a room description. Without resorting to manual coding by editing the ASL file?

It is straightforward to add an “if” to any script - there’s an “Add If” button on the Script Editor toolbar.

Oh, there’s the “Add Condition” command in the Script drop-down menu on the toolbar (next to Edit). Before, I tried expanding all the options in the list in the main window of the dialog box (Print, Game Control, Objects, etc.), going through every sub-option to try to find how to set conditions. And now I see that the second “+” button is a shortcut for adding a condition. Thank you. :slight_smile:

Someday I’d like to look into Quest more. I like the fact that it uses both a GUI and a script language that can be manually editted or written. But I want to look into JACL and ALAN, and maybe ADRIFT again, too. :unamused: