Help please?

katiegreen
Hello!

I'm a theatre director/playwright from Austin, TX, and I'm trying to integrate this program into an immersive theatre production. The idea being that you are actually doing and seeing the prompts on the screen in real life, and having to use the codes you find to unlock new information to further the narrative. This is my first rodeo for programming, and I promise I already watched a bunch of tutorial videos, but I'm still hitting some walls, so please bear with me. I've attached my game below. Right now I'm just trying to create a brief demo for a crowd funding campaign.

I'll walk you through what I've done so far, and then explain the walls I'm hitting, and what I'd like to happen:

You are in a wooded clearing.
You can see a bottle.
There is a large nest-like structure made of broken limbs and moss.
> look at bottle
There appears to be a message inside (and spiders...)
> read message bottle
HYMNAL TWICE
------------
Here's where I got stuck:
1) I want it to read "read message" not "read message bottle" (but I need the message to be INSIDE the bottle, not a separate object)
2) I want to be able to click on "HYMNAL TWICE" and for a message to appear that reads "It appears to be some kind of anagram..."
3) In the "type text here" box I want people to be able to try to unscramble the anagram
4) I want it to read "that is not the correct passphrase" every time someone enters in a phrase that is not "TWIN ALCHEMY"
5) When "TWIN ALCHEMY" is entered, I want it to read "Coming Spring 2015"

george
hi, welcome to the forum.

I made a quick demo of what you were looking for, I'll try to explain what's different from the file you uploaded:

* the read verb I put on the message just prints the message's description attribute (the attribute is this.look).
* I don't use a separate hymnal twice object.
* added a say command to say the anagram -- there's a few ways you could go about that but making a separate command seemed the simplest to me.
* added a link in the message's description that prints the message

I'm talking about this description:

<a class='cmdlink' onclick='addTextAndScroll("It appears to be some kind of anagram...")'>HYMNAL TWICE</a>


Originally I made it a command link, but that seemed kind of ugly as command links print an extra command word (like > command). I couldn't find a documented way to do this in Quest (a link that just prints text when clicked) so that's my workaround. The addTextAndScroll is a Javascript function that's not part of the Quest language, but part of the UI for playing Quest games, so it's not really documented for authors. I think if you were to put this into production you'd want something more robust.

Anyway, here's a playthrough:


You are in a wooded clearing.
You can see a bottle.

> look at bottle
There appears to be a message inside (and spiders....).

> read message
HYMNAL TWICE
It appears to be some kind of anagram...

> say ham lit neywc

> say twin alchemy
Coming Spring 2015



And code for those using code view:


<!--Saved by Quest 5.5.5173.27901-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Alchemy">
<gameid>c7a92a3a-5d36-4bd5-ad18-662d8f0509a6</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
</object>
<object name="wooded clearing">
<inherit name="editor_room" />
<object name="bottle">
<inherit name="editor_object" />
<inherit name="container_open" />
<feature_container />
<transparent />
<close type="boolean">false</close>
<open type="boolean">false</open>
<hidechildren />
<listchildren type="boolean">false</listchildren>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<look type="script">
if (Contains (bottle,message)) {
msg ("There appears to be a {object:message} inside (and spiders....).")
}
else {
msg ("It's empty. ")
}
</look>
<object name="message">
<inherit name="editor_object" />
<look><![CDATA[<a class='cmdlink' onclick='addTextAndScroll("It appears to be some kind of anagram...")'>HYMNAL TWICE</a>]]></look>
<read type="script">
msg (this.look)
</read>
</object>
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<command name="say">
<pattern>say #text#</pattern>
<script>
input = LCase (text)
if (input = "twin alchemy") {
msg ("Coming Spring 2015")
}
</script>
</command>
</asl>

katiegreen
George,

First of all, thank you so, so much for taking the time to help me with this. Unfortunately, I'm unable to download the attachment you sent. Do I need Java or another program to open it, or should I be able to upload this directly someplace I'm just not aware of? I also tried to copy and paste the code you provided into the code view under "game," as well as individual code, (such as the HYMNAL TWICE code under "code view" in Inventory for that child), but it says "Sorry, an internal error occurred." Again, thank you so much for all the work you've already done. I'm in a bit of a time crunch for this crowd funding campaign, but after this video, I'll have a good 4-5 months to take the time to learn the ins and outs of this program.

george
Not sure what the problem is -- are you using the web-based Quest on a Mac maybe?

katiegreen
Exactly, yes.

george
Unfortunately the web-based creator lacks some of the capabilities of the Windows desktop creator, but it might be possible. I have some time to take a quick look now.

I'm not sure if anyone has successfully run desktop Quest with Crossover/WINE on a Mac.

If none of that works, your best bet might be to use a different tool, like Twine for example.

katiegreen
I have a really old PC that is running on its last leg, and sometimes spontaneously shuts down, but I'll give it a go because I like Quest better than Twine. I'll let you know if it will download on my pc.

george
If you have Windows OS discs, you could install it on your Mac in a virtual machine using Virtual Box or VMWare too.

george
OK, that was easier than I thought. I'm not sure where the pasting of code into code view went wrong, but it is possible. I wish there was an easier way to share game code in the web creator, but lacking that here's the link

http://play.textadventures.co.uk/Play.a ... ti0btuuxhq

Does that look OK? If so I can make some instructions on how to write it up.

edit: remember, you try the passphrase by typing 'say phrase'.

katiegreen
George,

This looks great! A tutorial would be fantastic, so I can see where I went wrong, and do it myself. I've watched 7-8 youtube tutorials, but I've been missing something vital. The only things I would change if it's not too much work for you is to delete the "alchemy" title at the top, and leave it untitled. Also, if it would be possible to make it so that when you type "say" "TWIN ALCHEMY" doesn't automatically appear, so that it doesn't give away the correct anagram? Thank you again so much! I tried to download it on my PC, but I forgot how much I hate my PC (and also it still didn't work).

george
No problem, here's how to type it in, starting from a new game:

1. Select 'game' in the pane on the left and delete the game name.

2. Select 'Commands' and add a new command called 'say'. For the pattern type 'say #text#'. Choose to run a script and paste this into code view:


input = LCase (text)
if (input = "twin alchemy") {
msg ("Coming Spring 2015")
}
else {
msg ("That is not the correct passphrase.")
}


The input = LCase (text) just makes sure that someone can type the phrase with different capitalization of letters and it'll still work. LCase means to lowercase the text, see http://quest5.net/wiki/LCase . Writing 'text' matches the command pattern of #text#. You could write #myText# and myText if you wanted to.

Btw, I couldn't reproduce that bug of typing only 'say' and getting the correct response -- could you paste in a transcript of that?

3. Add a new room called 'wooded clearing'.

4. Add an object called 'bottle', move it into wooded clearing if necessary ('Move') is in the upper right of the UI).

5. Add an object called 'message' and put it in the bottle.

6. Select the player and move it into the wooded clearing.

7. Select the bottle. For its look at description choose to run a script, and paste this into code view:


if (Contains (bottle,message)) {
msg ("There appears to be a {object:message} inside (and spiders....).")
}
else {
msg ("It's empty. ")
}


{object:message} creates an object link you can click on, see http://quest5.net/wiki/Text_processor .

8. Select the Features tab of bottle and check off that it's a container. In the Container tab I then choose that it's open, transparent, cannot be opened and closed, and to hide children until looked at.

9. Select the message. For its description choose text and paste in


<a class='cmdlink' onclick='addTextAndScroll("It appears to be some kind of anagram...")'>HYMNAL TWICE</a>


Giving it a class of cmdlink makes it a command link like you would with Quest's {command:command name}, but then you create your own custom behavior by adding the onclick attribute.

One thing I didn't fix was the text style of the "It appears..." response (it's different from everything else). You might be able to wrap it with a span tag and CSS to match the normal text style, I haven't looked into that though.

10. Select the verbs tab of message and add 'read', select Run Script and paste into code view,

msg (this.look)


this is shorthand for 'this object', you could write 'message' too if you wanted. look is the attribute that Quest stores the description in.

And that's it (I think).

katiegreen
Wow. Seriously, thank you so much! I'll let you know if I hit any snags, but this seems really thorough. I'm sure if something goes wrong it's probably on my end. Thanks again.

katiegreen
Hey George,

So I got it up and running on my own, except for that pesky auto-complete of "TWIN ALCHEMY." I cleared out all the cookies on my Mac just now, so it's not my computer. It's also appearing again in a yellow bar after it's entered and reads "Coming Spring 2015." Not sure what you mean by "send you a transcript"...how can I help?

katiegreen
Hey George,

Actually, don't worry about fixing the auto-complete. This is just meant to be used as a trailer, not a demo, so I can edit the film a bit to get rid of that. Many thanks again!

george
OK cool. If you do make a screen recording of the demo with the autocomplete I'd be interested in seeing it, since I still don't know where it's bugging out. Maybe it's a browser thing?

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums