|
Axe Software Forums
Quest Developer Forum Containers
|
Author | Topic: Containers |
Jim Jones |
posted 08-12-2002 05:25 GMT
I was wondering if i could make it so i could make a room container. like when i open the backpack it displays everytnhing in the room called inside of backpack. and i was also wondering how to fix that typelib.qlb error. it messed up some things so i can no longer ask yes no questions |
MaDbRiT |
posted 08-12-2002 08:44 GMT
quote: One of the basic functions of my "typelib.qlb" is that it automatically provides the ability to have a backpack (or other container) that describes the contents when it is "looked inside" or examined. You shouldn't have to do more than create a backpack object and make it of type "TLTcontainer" and also of type "TLTopenable" - everything else you mention you need your backpack to do will then happen automatically. The "typelib.qlb" library also handles putting stuff in and out of the container (backpack in this case) making sure it is available where the backpack is etc etc. You do of course have to provide some 'TLTcontainable' objects to go in the backpack (and set sensible weight/size limits if you want to do any fancy stuff) I am not aware that "typelib.qlb" prevents you from coding 'ask yes or no" questions, if it does then obviously I need to find and kill the bug responsible! Please give me an example of your code showing where "typelib" interferes so that I may investigate and fix the problem. Al |
MaDbRiT |
posted 08-12-2002 16:05 GMT
Oh yes.. Just to prove the point as regards the "backpack" I have created a bare bones demo in QDK which provides one room, and an openable, closeable, takable backpack with a rope inside (that can be viewed, taken out put back inside etc). The amount of new code required to do this is nil - "typelib.qlb" does all the nasty stuff just by including it! Below is the 'asl' file as saved by QDK, you can cut the code out, save it as 'backpack.asl' (in the folder you have 'typelib.qlb' in) and run it to see a basic backpack object that works as you described - all without doing anything more than ticking a few boxes in Q.D.K. That's the whole idea of 'typelib.qlb', you add it in, set a few paramters and let it do the work! Here's the code for a complete, working backpack demo...
quote: You can play with this, then load it into QDK to see what I set to make it happen. It really is as easy as that. Al |
Jim Jones |
posted 08-12-2002 18:58 GMT
sorry but it wasnt your program, i was my fault. sorry.... |