Axe Software Forums
  Quest Developer Forum
  Is there an Object Hierarchy in Quest?


Author Topic:   Is there an Object Hierarchy in Quest?
HaDel posted 31-10-2002 08:18 GMT     
If I:
1. define a Type "tEyes" with a property "color=green"
2. define a object "Witch" and add type tEyes
3. When I run the game and look at the debuger I see that the "Witch" has the property "green".

Where is the "eyes"?
Now my witch has a "color=green"!?
How can I assemble a Witch out of tEyes, tClothes, tBag, ect? If all of them has the property "color", how am I going to distinguish what is what?

Or am I asking to much?

Alex posted 31-10-2002 22:40 GMT          
That's the way types are designed to work - types are just collections of properties and actions which can be included in an object definition by including the type, rather than having to include each property and action individually.

For your purposes I don't see what the point of your "tEye" type is if it only contains one property (I don't know if you omitted any from your post) - it would be easier just to include a property such as "eyecolor = green" for any object you want to have green eyes.

If you do need a "tEye" type, the same advice applies anyway - in the "tEye" type definition, call the "color" property "eyecolor" instead.