QDK language...

theRazor
27 May 2005, 23:37
Hello. I'v used QDK to make several games in the past, but I guess I'm what you would call a noob. I don't know any commands in the scripting language of QDK and lean solely on the graphical interface, but I'd like to change that. I was wondering if anybody here knows of a good rescourse, like a series of lessons or tutorials, that will give me an overview of the scripting language.

I know C++, so hopefully it won't be too dificult for me to pick up, I just can't find any good overviews to start with (and trying to get it from the help files isn't exactly easy) Thank you in advance for any help; and now that I've found this website, you'll probably be hearing a lot of dumb questions from my directon.

The Razor

francisstokes
27 May 2005, 23:46
If you look through these forums you will quickly pick up the language.Its been made in such a way that its almost the way you would speak what you wanted to do.

Theres alot of code on the forums but if your using QDK, you don't actully have to learn the ASL language, though you should still learn it so you can fix errors and stuff.

But anyway.....QDK writes the code for you.All you need to do is get to grips with the development enviroment and work out how to use things correctly.

theRazor
27 May 2005, 23:56
Well, I'd like to think I'm already capable with QDK, francisstokes. The problem for me is that I want to get more advanced, and it seems like to do that I need to learn the scripting language.

Oh, annother question, is there any alternative to a long string of "if" statements. (EG, something like the "switch" command in C++)

007bond
28 May 2005, 08:10
To answer your first question: no, everything you find QDK is avaliable in the ASL scripting language. The only reason it's there is so that people who learn the language don't have to bother with all those dialog windows.

francisstokes
28 May 2005, 10:43
And for easier de-bugging and quicker editing.

But!!!

There are things you can't do in QDK such as make a library.For that, you do need to know the ASL language quite well.

And!!!

Yes, a quicker way to make your if statements is to "hand Code" them.
Basicaly if i wanted to check if an object was in the current room id just type:

if here <myobject> then msg <wow an object> else say <Wheres my object!!!>

paul_one
28 May 2005, 13:29
Alot of it is down to preference - but QDK does have some features that aren't documented (or at least I couldn't find them in there)... Like custom error messages and some of those things.

There isn't a switch command, although if you need a switch, then instead of writing:
case #value#:
#script#
break
case #other value#

You would write:
if (#var#=#val#) then {
#commands#
}
if (#var#=#othervalue#) then {
}

No need for else's.
There may be some instances where you need the "knock-on" effect of cases (although I doubt it'll be needed alot).
In which case you'll use alot of or's.

I did start some guidelines but ASL (Adventure Scripting Language) isn't the easiest to write for.
In C++ it just goes from top to bottom - with exceptions for loops, jumps, etc. But with ASL it is contained in definition blocks for various rooms/objects and far more modular.

The easiest way I found of learning was to get some games, open them up and see what's in them. Then to look at the documentation about define blocks (because that'll show what's needed in each of the blocks).
Then to get a hold of Al's PDF reference, which is everything in the documentation (erm, ASL300 - not 350) in alot of pages. You print this out and look through it to get info.

After a while you get into the hang of it. - good luck.

theRazor
28 May 2005, 14:15
Thank you for all of the suggestions. You'll probably be hearing from me over the course of the summer as I get a handle on ASL code.