|
Axe Software Forums
Quest Developer Forum what is the best way to 'wear' something in Q?
|
Author | Topic: what is the best way to 'wear' something in Q? |
carlii |
posted 31-12-2001 10:15 GMT
In QDK, I wanna make it so I can wear a robe. How would I do that in QDK? |
Tyrant |
posted 31-12-2001 16:27 GMT
There are a couple things you can do. The easiest is to just simply give the character the object "robe", so when he has it, he is automatically wearing it. You could also use a numeric variable to set that the player can't see. Just go make a numeric variable called robe, and initially set it to 0. When the player is able to wear the robe (by typing "wear robe", for example), then set the numeric variable robe to 1. When robe = 1, that means you are wearing it. If you want to take it off, just make a command for it, then set robe to 0. If you have multiple clothes, do the same, except make a numeric called clothes. 0 = Wearing Nothing |
Pikaflare |
posted 31-12-2001 18:27 GMT
That's an interesting idea, Tyrant. I simply used properties. Each object able to be worn was given the property [not] worn. When it was put on, it was changed to worn. Maxpowr |
Pikaflare |
posted 31-12-2001 18:34 GMT
Tyrant: Do you have any way of using status variables if you wanted to wear several things at once (i.e. gloves, hat, etc.)? It's an interesting idea. Maxpowr |
Alex |
posted 31-12-2001 18:51 GMT
Take a look at MaDbRiT's current version of Q3EXT library, included with Quest 3.1 Beta. (The 3.0x version might include clothing support too, I can't remember) |
Tyrant |
posted 31-12-2001 21:14 GMT
Pikaflare: Well, I guess you could use multiple numeric variables, such as: gloves (0 or 1) With 0 meaning not worn and 1 mean you are wearing it. Another way could be just to use string variables, which is what I used in my games: #handwear# Handwear is things you wear on your hands, such as gloves, and headwear is things for your head such as hats and caps. If, for example, you can't pick a certain item up unless you have certain gloves, just make a condition that asks if the string variable #handwear# is equal to the name of whatever gloves you need. I should also make myself familiar with Quest 3.1's variable properties which is probably much easier. I'm still using my techniques that I used prior to Quest 3.0. |
MaDbRiT |
posted 31-12-2001 22:46 GMT
Alex wrote...
quote: Ii did / does. A very complete set of clothing objects is part and parcel of said library and is ( I hope ) dead easy to use. Al |
MaDbRiT |
posted 31-12-2001 22:49 GMT
Oh yes... Apart from providing a full set of clothes - my lib also checks for the sense of putting them on and off (can't put on a shirt if you already wearing a jacket etc.) and also adds all the necessary commands. Al |
carlii |
posted 01-01-2001 12:39 GMT
Well I still don't get ya's.....I've tried so many different things I but I want the player to know what he/she is wearing by looking in the inventory window and it says something like: Jacket (being worn) That way, the player can carry clothes, and is not forced to wear them as well. (You could carry a red jacket but wear a yellow one). |
MaDbRiT |
posted 01-01-2001 19:49 GMT
Carlii.. My q3ext.qlb library does everything you appear to want clothes wise and a lot of other stuff too. Read the manual that comes with it - and you should be able to save yourself a LOT of heavy code writing. Al |
carlii |
posted 01-01-2001 23:21 GMT
I know I know I know!!!!! I have looked over it a billion times, I will look again and somehow I will figure it out but now it doesn't matter cuz QDK can't open the file. |
MaDbRiT |
posted 02-01-2001 09:08 GMT
quote: It doesn't NEED you to open it in QDK Carlii.. just add the lines shown in the manual to include the lib into your game's ASL file and make sure the lib is in the same folder... The whole idea is that you DON'T edit the library file itself, just use an include command and start writing "misc ASL code" to make use of it. Al |