Absolutely the most basic questions

For help with creating games using Quest

Moderators: Pertex, Alex, sgreig, Cryophile, jaynabonne

derekb
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Absolutely the most basic questions

Postby derekb » Mon Jan 23, 2012 10:31 am

: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

User avatar
Pertex
Posts: 1138
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Absolutely the most basic questions

Postby Pertex » Mon Jan 23, 2012 2:56 pm

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
Attachments
wait.aslx
(1.02 KiB) Downloaded 50 times

derekb
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Re: Absolutely the most basic questions

Postby derekb » Tue Jan 24, 2012 10:42 am

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

User avatar
Alex
Site Admin
Posts: 2109
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK
Contact:

Re: Absolutely the most basic questions

Postby Alex » Tue Jan 24, 2012 11:06 am

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
wait.png (24.03 KiB) Viewed 1202 times


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:

Code: Select all

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
Posts: 25
Joined: Sat Jan 21, 2012 4:24 am
Location: U.S.A

Re: Absolutely the most basic questions

Postby AvecPardon » Tue Jan 24, 2012 7:21 pm

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:

Code: Select all

<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
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Re: Absolutely the most basic questions

Postby derekb » Wed Jan 25, 2012 5:56 am

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

User avatar
Pertex
Posts: 1138
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Absolutely the most basic questions

Postby Pertex » Wed Jan 25, 2012 7:38 am

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.
Attachments
intro.jpg
intro.jpg (129.95 KiB) Viewed 1178 times

derekb
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Getting wait to wait ....

Postby derekb » Wed Jan 25, 2012 9:29 am

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:

User avatar
Pertex
Posts: 1138
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Absolutely the most basic questions

Postby Pertex » Wed Jan 25, 2012 12:21 pm

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

derekb
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Re: Absolutely the most basic questions

Postby derekb » Wed Jan 25, 2012 4:33 pm

Here is the program I am using just to learn,

Thanks,
derekb
Attachments
ADVENTURE WORLD 1.aslx
(3.74 KiB) Downloaded 45 times

User avatar
Pertex
Posts: 1138
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Absolutely the most basic questions

Postby Pertex » Wed Jan 25, 2012 8:19 pm

:D
you are writing

Code: Select all

game.displayroomdescriptionstart = false


instead of

Code: Select all

game.displayroomdescriptiononstart = false

derekb
Posts: 13
Joined: Mon Jan 23, 2012 10:16 am

Re: Absolutely the most basic questions

Postby derekb » Wed Jan 25, 2012 11:00 pm

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

User avatar
Pertex
Posts: 1138
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Absolutely the most basic questions

Postby Pertex » Thu Jan 26, 2012 8:18 am

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
Posts: 32
Joined: Fri Dec 16, 2011 12:07 pm

Re: Absolutely the most basic questions

Postby timetolose » Thu May 31, 2012 7:51 am

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?

User avatar
Alex
Site Admin
Posts: 2109
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK
Contact:

Re: Absolutely the most basic questions

Postby Alex » Thu May 31, 2012 3:27 pm

You no longer need the workaround as of Quest 5.2.


Return to “Quest Forum”

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests

cron