Axe Software Forums
  Quest Developer Forum
  Collecting objects


Author Topic:   Collecting objects
Niklius posted 02-08-2000 03:15 GMT     
yeah i've been working on making a game..it's a really nice idea..the only problem is i'm not quite positive how to actually make you have an object when you collect it. you took the ..but up in the items box it doesn't say i have it..how do i EXACTLY make it so you can pick up objects
MaDbRiT posted 02-08-2000 09:13 GMT          
Hi Niklius.

Try this code to add a 'gettable' gun

First, in the game block be sure to add your item to the 'items' list like so:-

~code~

items

~code~

Then your 'gun' object looks like so:- (defined somewhere in one of the rooms..)

~code~

define object
look
take {
give
hideobject
msg
}
end define

~code~

That'll do it.. the usual problem is forgetting to add the 'gun' to the items list in the game block. :-)

Hope that helps.

Al


MaDbRiT posted 02-08-2000 09:16 GMT          
ARGGHHH!!! I forgot that this stupid forum is in HTML - last message should look like this...

Hi Niklius.

Try this code to add a 'gettable' gun

First, in the game block be sure to add your item to the 'items' list like so:-

~code~

items <gun>

~code~

Then your 'gun' object looks like so:- (defined somewhere in one of the rooms..)

~code~

define object <gun>
look <It looks thoroughly deadly.>
take {
give <gun>
hideobject <gun>
msg <You take the gun.>
}
end define

~code~

That'll do it.. the usual problem is forgetting to add the 'gun' to the items list in the game block. :-)

Hope that helps.

Al


Niklius posted 02-08-2000 16:09 GMT          
Yah...well thanx..but i have to say i'm sortof..well actually really knew at this..so you probably going to have to tell me exactly what to do ..where to go..and everything..i'm sorry..but i'm not very good at this..i'm making a rather large game..right now it's just my house..but later it will be my hole city..-don't worry it's small-..but i need to get the items thing down..and i still don't understand
MaDbRiT posted 02-08-2000 19:56 GMT          
Hi Niklius

I guess from your reply that you are using QDK to set up your game rather than coding by hand with a text editor?

To do the neccessary in QDK:- If as your game stands you can see the object listed in the room, and you've set the 'take' action to hide the object in the current room and give the item to player, ... all you need to do is click on the 'items' icon and add the name of the object to the declared items list.

If it's of any help, I've recently completed and posted a tutorial in coding Quest ASL to my website. This starts with the absolute basics and explains how to write a simple game 'from the ground up', using a text editor like Windows notepad - it is specifically aimed at the 'newbie' and assumes no previous programming knowledge.

The idea of using hand coding in the tutorial is to illustrate just how simple and easy to learn Quest's Adventure Scripting Language is. Picking up a working knowledge of ASL is a 'breeze'. It will really help with game writing to have the know how to do it by hand - even if you primarily use QDK to write, because when things don't quite work, being able to list or print out the code and fix it because you understand how it works is a HUGE advantage!

You might like to take a look at it :-).

Al

Niklius posted 02-08-2000 23:28 GMT          
Oh..i didn't know you could write it any other way..thanx that's alot of help!!...well see right now....i'm just making the rooms...i've made alot..and connected..them...what's your website...
can i transfer what i already have over to a text editor.
MaDbRiT posted 03-08-2000 08:56 GMT          
Hi again

Until QDK came along, writing ASL in a text editor was the ONLY way to write for Quest, and as I said in an earlier post, even if you prefer to use QDK to whizz through the basic setup of a game, knowing how to code manually is a BIG plus when it comes to making things work.

You can indeed use code generated by QDK in a text editor, in fact you can (with a bit of care) swop development back and forth between using the Text Editor and QDK as you go along, using whichever method you personally prefer to add features, the two coding methods are complimentary rather than mutually exclusive.

Game setup, addition of objects etc and basic handling of them is nice and slick with QDK, but adding the 'fancy stuff' with ASL is better handled by 'doing it by hand' in my opinion.

Al

MaDbRiT posted 03-08-2000 08:57 GMT          
Oops! forgot my website link.....

http://www.alspages.cwc.net/html/qtips.html

There you go...

Al

Niklius posted 03-08-2000 14:18 GMT          
okay thanx. How can i learn to code asl.?
MaDbRiT posted 03-08-2000 18:54 GMT          
Hi Niklius

In your last post you asked...

<<okay thanx. How can i learn to code asl.? >>

Go to my website (linked in my previous post), and download my ASL tutorial.. :-)

http://www.alspages.cwc.net/html/qtips.html

To the best of my knowledge, at the moment mine is the only ASL tutorial available.. so I can claim it's 'the best available' quite safely... lol

Have fun!

Al