|
Axe Software Forums
Quest Developer Forum another scream for help
|
Author | Topic: another scream for help |
Jim Jones |
posted 14-12-2002 02:34 GMT
i am wondering how the library works... i am trying to make a file where it will acknowlage eat or drink... |
MaDbRiT |
posted 14-12-2002 10:17 GMT
Hi Jim My library doesn't handle "eat" or "drink" at the moment, mainly because there is a very good example of how to code this in Alex's Quest manual (comes with Quest) and it is actually relatively easy to code. However, if you are working from QDK rather than coding the old fashioned way, the explanation might not help that much - people like myself who have been coding for (AGHHH!) 25 years tend to assume a lot of prior knowledge sometimes. Later today I will make up a small demo for you, using just QDK, showing an easy way to have your player take and eat a sandwich, you can then load this into QDK and see just what I did to make things work. Looking to see "how others did it" is an essential part of learning to write code, which (although QDK tries its best to hide this fact from you) is going to be essential to get very far in writing adventure games - (To a basic level, you don't need to be a heavy duty programmer with Quest!) Al |
Jim Jones |
posted 14-12-2002 18:03 GMT
okay then, i tryed making a library but it said something was wrong with it... |
Computer Whizz |
posted 14-12-2002 23:48 GMT
Libraries aren't anything like normal game files... They have to be written (well - you could just cut & paste most of the stuff - but...) because it is in a different "format". Computer Whizz |
Jim Jones |
posted 15-12-2002 00:29 GMT
That is pritty much what i did, i got most of the info from a page on this site |
MaDbRiT |
posted 15-12-2002 09:35 GMT
Hi again Right, Firstly I suspect there are as many ways to make 'eat' work as a command as there are Quest coders, but here's ONE way of making a library that gives you 'eat' functionality. Obviously there are two parts to this demo - so here's the ASL code as made in QDK
quote: Cut & paste the 'quoted' bit saving it as "food.asl" O.K. now here is a very simple library, it provides a eat command, an eat action with default behaviour for non edible items, and an edible "type". The thing has a QDK interface too :-) Here's the actual library, save this as "food.lib"
quote: And that basically is all there is to it! Al |