[HugoMan] ch3 Objects - questions
Posted: Tue Dec 16, 2003 6:43 pm
Some questions after going through the first part (roughly through section d.-properties) of the chapter:
In III.a, the manual states that if you don't specify an "object name", the compiler will assign it as ("object name"). Do the parentheses change the nature of "object name" in any way? In other words, is object myobject "myobject" different from object myobject ("myobject")?
III.b-Object Tree: eldest and younger functions are said to be same as child and sibling, respectively. What do youngest and elder correspond to? (p. 43) The same thing (youngest -> child; elder->sibling)? If so, maybe that could be included in future updates of the manual, as well as indicating how one determines the sibling hierarchy? (Eg, why, in a room with 4 children, is 'Player' necessarily the youngest? (p 43)
III.c. -Attributes: p.47 says up to 128 attributes can be defined. 28 are listed as being defined in the lib. Does that mean the game author can define 100 others? If so, how would s/he go about doing so?
...The alias thing is confusing. On one hand, I understand the concept of an alias. On the other, I'm don't understand why I would necessarily use one. Help?
III.d.-Properties: can I define other properties? How?
...p.54 renders me senseless. :) "Whereas a simple property is expressed as <object>.<property>..." What? And I was following along pretty well up until that! :) It feels like a sudden leap in assumed knowledge that I don't possess. Does this mean that in order to access a given property in code, I'd use (for example) suitcase.size? A complete example of this would be appreciated.
...Maybe a little more discussion on 'initializing space in the property table' (p.55)? Do I understand this correctly...I've got a suitcase, with property found_in kitchen. If I want it to be 'findable' elsewhere, then I have to include something like found_in #4? Would that make it SUITCASE FOUND_IN #4, or SUITCASE FOUND_IN KITCHEN, #4? How does this apply to objects that get picked up and dropped at places other than their starting rooms? OR is this the way to initialize where the object starts out, and that's all?
Sorry for the barrage of questions. And I haven't even made it to IIIe yet! :) Any help appreciated.
In III.a, the manual states that if you don't specify an "object name", the compiler will assign it as ("object name"). Do the parentheses change the nature of "object name" in any way? In other words, is object myobject "myobject" different from object myobject ("myobject")?
III.b-Object Tree: eldest and younger functions are said to be same as child and sibling, respectively. What do youngest and elder correspond to? (p. 43) The same thing (youngest -> child; elder->sibling)? If so, maybe that could be included in future updates of the manual, as well as indicating how one determines the sibling hierarchy? (Eg, why, in a room with 4 children, is 'Player' necessarily the youngest? (p 43)
III.c. -Attributes: p.47 says up to 128 attributes can be defined. 28 are listed as being defined in the lib. Does that mean the game author can define 100 others? If so, how would s/he go about doing so?
...The alias thing is confusing. On one hand, I understand the concept of an alias. On the other, I'm don't understand why I would necessarily use one. Help?
III.d.-Properties: can I define other properties? How?
...p.54 renders me senseless. :) "Whereas a simple property is expressed as <object>.<property>..." What? And I was following along pretty well up until that! :) It feels like a sudden leap in assumed knowledge that I don't possess. Does this mean that in order to access a given property in code, I'd use (for example) suitcase.size? A complete example of this would be appreciated.
...Maybe a little more discussion on 'initializing space in the property table' (p.55)? Do I understand this correctly...I've got a suitcase, with property found_in kitchen. If I want it to be 'findable' elsewhere, then I have to include something like found_in #4? Would that make it SUITCASE FOUND_IN #4, or SUITCASE FOUND_IN KITCHEN, #4? How does this apply to objects that get picked up and dropped at places other than their starting rooms? OR is this the way to initialize where the object starts out, and that's all?
Sorry for the barrage of questions. And I haven't even made it to IIIe yet! :) Any help appreciated.