Absolutely the most basic questions

derekb
:lol:

Yesterday discovered this great program. When I was in my teens (20 years ago) I crafted many text adventures with the use of Basic and other simple program languages ... and they were detailed etc .... so, when I saw this program, I immediately had to try it and learn it .....

Yet, even with the tutorial and supplimental links to specific topics, I have hit many roadblocks in getting some of the basics to work.

For starters:
I placed an introduction and later learning that I can add a 'press a key to continue', I tried to add 'wait' .... but no matter how I try to set it up, (in the 'game' or before the first room) it doesnt wait and continues to list what I have set up in the first room.

Also, wondering if there is any game which I could download where I can still 'open for editing' where I can see how another made their introduction to wait and overall learn how they made their game.

Many thanks. :D

Pertex
Your first visit here and immediately finding a bug. Yes, a wait-command in the gamestartscript or in the "first enter a room"-script does not stop the game displaying the room-description. Alex, is there a workaround for it?

Also, wondering if there is any game which I could download where I can still 'open for editing' where I can see how another made their introduction to wait and overall learn how they made their game.


Yes you can. Go to the gamesite, look at the newest games and if you find "Written for Quest 5.0" in the description of a game, download it to play offline. Then change the fileextension from .quest to .zip. Now you can open the file with a zipper and extract the gamefile game.aslx, which you canload in Q5

derekb
Hello Pertex ... I appreciate your reply.

I never imagined that the 'wait' command could be a bug. Thought I just didn't do it right. Looking forward to learn if there is another way that I can achieve this for the intro page and for other times a 'pause' would be required

Yet, I am only on day 2 of using this unique and powerful program, i am sure as I develop learning it ... many questions I may post will definately be those newbie type of questions.

I have so far been successful in having locked doors and thus locked movement to another room etc ... and objects appearing when something else is done (such as opening a drawer), so -- so far so good.

Your suggestion on .aslx was most helpful and I greatly appreciate it. It definately will help me out.

When I was a teen, my text games were mainly RPG's .... lot of scoring (stats) which of course changes the storyline based on these scores. Will have to learn how to do that, but I think that can be another topic and I have other basics to learn, before then.

Cheers,
derekb

Alex
When you run a "wait" in Quest 5.1, the script that is nested inside will run after the player has pressed a key. But, any script that appears after the wait command will run immediately.

Maybe this will explain better:

wait.png


So, if you have a "wait" in the game start script, that won't stop the room description from appearing, because that's controlled by a script which runs after the game start script - so it won't be affected by the "wait".

To work around the problem, in your start script, use "set variable or attribute" to set:


game.displayroomdescriptiononstart = false


Next, in your "wait" script, add the "call function" command. Call the function "OnEnterRoom" with one parameter "null". This will display the room description when the player presses a key.

I've logged http://quest.codeplex.com/workitem/989 to think about an easier to use fix for this.

AvecPardon
The best I was able to come up with as a workaround to the introduction screen was to create a hidden room called intro and move the player into it, sealing it by not creating any exits and using its room description as the actual game introduction, written as a nested script that uses a lot of 'wait for key press' scripts.

The final 'key press' then cleared the screen and moved the player directly out of the intro room into the first room of my game. The code ended up looking like this:


<object name="intro">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<description type="string"></description>
<descprefix type="string"></descprefix>
<alias>Introducing...</alias>
<objectslistprefix type="string"></objectslistprefix>
<enter type="script"><![CDATA[
SetObjectFlagOn (wallet, "scenery")
SetObjectFlagOn (smartphone, "scenery")
SetFontSize (30)
PrintCentered ("Mallcrawler<br/><br/><br/>")
SetFontSize (12)
wait {
msg ("Welcome to the Reeshman Mall! This two-level structure boasts many fine retailers and restaurants, as well as some of the most luxurious decor one could ever find in a shopping mall. Anything you could possibly want can be found here at Reeshman Mall. We've got boutiques, jewelry stores, electronics, household wares, bookstores, fine dining, everything under the sun is right here! Relax by the beautiful Ivy Dream fountain in our Central Plaza, or treat yourself to a day at the spa. At Reeshman Mall, shopping is more than an excursion. It's an experience!<br/>")
wait {
msg ("Now, some of you may have heard of the urban legend surrounding this beautiful shopping mall. The story goes that Reeshman Mall is haunted by ghostly shoppers who appear just after the doors close at the end of the business day. Anyone caught inside the mall during this time will be whisked away to join the ghosts, or at least that's what the story says. While it's true that some mallcrawlers have disappeared over the past few months, it would be ridiculous to think that they all became victims of this urban legend.<br/>")
wait {
msg ("Then again, even if someone went into the Reeshman Mall to debunk this myth, no one's ever come back to say different....")
wait {
ClearScreen
MoveObject (player, frontentrance)
}
}
}
}
]]></enter>
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>


It still shows the alias and location title at the top of the screen but I managed to incorporate it into the introduction. I don't know if this is the kind of workaround you're looking for, but it's one way of doing it.

derekb
Hi Alex ...

Thank you for your suggested steps. Unfortunately, I am too green to understand it ... but in trying to understand what to do, I came up with something similar to cause a different type of wait for an introduction (which I am sure I can improve). I would attach a picture of what I did, as you did, but I don't know how to do that either (LOL).

Basicially what I did (for the time being) ... in the start script:
8)
1) "Print message" :
This is an introduction test for the game.
Seeing if i can use a player input to cause the 'wait'
This is much like the INPUT command in Basic programming
Anything can be entered to continue
Although, hitting return replaces 'any key'
I would prefer 'wait' but this example does work and stops the first room from appearing until the player enters something and hits 'return'.

2) "Set a Variable or attribute": and choose 'player's input'.

3) Clear the screen.

The good thing about this, is that these three steps, does what I needed but definately not a wait.
In basic programming this would be a 'input' .... rather then a 'get' command to pause until a key is pressed.

If you have a screen shot of the example you have suggest Alex, that would be most appreciated.

Cheers,
derekb

Pertex
Here is a screenshot of Alexs suggestion.

You could do this with 'player input', but there will be a change in this function in the future, so you will have the same problem then.
intro.jpg

derekb
Hi Pertex ....

Thank you again for your contribution to my questions, as I try to get over this hump ... :)

I did exactly what you posted and the result didn't work for me.

It posted my intro, then add my 1st room info and then when I pressed a key, it printed what I put in the field after the wait and repeated the info from my 1st room.

So, I still either didn't enter it properly or missed something. In some ways I wish the title of this posted question no longer said 'absolutely the most basic questions', as it definatley has become a discussion on 'pausing' a page for an intro or at other times. In my original games from 20 years back, the pause definately came in handy, especially when one wishes to add an important storyline.

You mentioned that the 'player input' was going to change. Hopefully, it wont be eliminated, as to me that can be a powerful tool and in this case allow for a 'pause' until something specific is entered by the player.

On a side-note, it is interesting how all the memories and specifics of all those text-based games that I crafted so many years ago has streamed back since discovering this great program. And how I realize, I still remember exactly how I use to program very detailed and I guess they were quite complicated RPG games. It may take me awhile to learn this program and all its special features but I will complete a large game for all to play.

Anyone can Skype me at derek.bistricky

Cheers,
derekb :mrgreen:

Pertex
Could you post your gamefile here? Then we could hav ea look at it

derekb
Here is the program I am using just to learn,

Thanks,
derekb

Pertex
:D
you are writing
game.displayroomdescriptionstart = false


instead of

game.displayroomdescriptiononstart = false

derekb
Tricky Pertex ...

Even after 30 seconds, I couldnt see it .... and then did ..... 'onon' :lol:

I will see how it works later today.

Now, what is going to change with the 'players input' command (which you mentioned) earlier?

Cheers again to you,
derekb

Pertex
At the moment 'players input' stops the script, so you can input data and after it the script continues. In the future this function will not stop the script (same as wait. If you look in the wiki, you can find WaitForKeyPress () , which is the old wait-command). This is necessary for using it in Apps.

timetolose
I need as well an intro like this: message + press a key + clear screen + message + press a key + clear screen + first room description.

The "problem" has been solved on Quest 5.2 or we still need the workaround explained in this thread?

Alex
You no longer need the workaround as of Quest 5.2.

timetolose
Unfortunately, I get an error on Quest 5.2.

I have this:
questError.JPG


And I get this error:
QuestError2.JPG


Please help

Alex
You need to move all the stuff underneath your "wait" inside it, otherwise it will run immediately.

timetolose
Thank you!

TriangleGames
Hi, this is my first post here, and this is exactly the topic I was looking for. However, I am using the WebEditor. I've tried too many crazy ideas to remember them all. Is there gonna be any way for me to do this right now? Also, can you confirm for me whether the WebEditer is a beta of 5.3 or an older version?

P.S.: I saw quest like a year ago, dabbled with it for a few minutes, then played "Things That Go Bump..." until I was devoured by moths. I meant to do more with it, but I always have many projects going on, and I forgot all about it. Then about a week ago I was hunting for text games on my phone, and what do you know, I came across that same game! I played it obsessively until I beat it twice, and now I'm getting into Quest again. I use the WebEditor so I can work on it here and there all day through my phone.

Alex
What are you looking to do exactly? The WebEditor is running v5.3, so you can safely use "wait" inside a script that runs when entering a room etc.

TriangleGames
Sorry for my poor etiquette at 3am, I plead lack of sleep. Now that I'm awake I figured it out, and the story's kinda funny.

To explain better, I wrote a rather verbose intro and wanted to use "wait" to break it up. I was trying to do it VERY wrong. My last idea was to use the script command "Run a script returned by an expression" to enter code for "wait" without entirely understanding what I was doing.

At any rate, after a solid one and a half hour sleep, I awoke with a new suspicion, which I have now confirmed by going to the WebEditor on my PC. The problem is my phone. When I use my phone's web-browser to access the Quest WebEditor it does not display correctly. Among other things, the list of options for Output in the New Script dialog box adds extra space between lines and stops at "Print a list," because there's no more room at the bottom of the box. Which means that I couldn't see (and cannot use from my phone) "Wait for key press." So I spent about three hours last night trying to figure out some other way of doing it, because I didn't even know that there was a functional Wait command available.

So the lesson is, anyone trying to use the WebEditor from a phone should at least look at it on their computer so they can know whether it's displaying properly or not.

Alex
Thanks for the explanation :)

I should probably do something to make WebEditor work better on phones. It works well on an iPad but I've not really tested it much with anything smaller, as I didn't really expect people to be using it that way.

TriangleGames
The small screen is certainly less convenient, but having it in my pocket all the time makes me use it for everything. I can add a room while in line for coffee. :)
As soon as I finished "Things That Go Bump..." I searched for a Quest phone app, but the WebEditor mostly makes that unnecessary.

HegemonKhan
quick question:

we can use multiple same level ' Wait ' scripts, without the error, if we use the ' On Ready ' function, if I understand correctly?

As the error comes from it trying to run the next ' Wait ' pause+script, while the first ' Wait ' pause+script is still in progress, is this correct?

TriangleGames
I've had some strange things happen while trying to figure out how to use 'on ready' to make consecutive 'wait' commands work in the WebEditor. I tried several indirect methods involving expressions, because just using a new script for 'call function' and typing in 'on ready' kept resulting in an error of "can't find function." I wasn't really sure what to enter as a parameter. Eventually, I did this...

New Script, Call Function, "on ready"...
onreadyP1.JPG


Then, I entered a parameter as: <script> </script>
I pushed enter and got, "Sorry, internal error."
It then reloaded the WebEditor and presented me with this...
onreadyP2.JPG


I don't understand what happened, but great! There's my 'on ready' script.
But, when I try to nest another 'wait' command inside of 'on ready,' the continue button for the wait never appears, and the game just seems to lock up. So ... I still don't get it.

Alex
You don't need to use "on ready" at all. Just put your second wait command inside the script for the first. Then it will be triggered afterwards.

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

Support

Forums