links:
http://docs.textadventures.co.uk/quest/http://docs.textadventures.co.uk/quest/ ... lists.htmlhttp://docs.textadventures.co.uk/quest/ ... aries.htmlhttp://docs.textadventures.co.uk/quest/scripts/http://docs.textadventures.co.uk/quest/ ... reach.htmlhttp://docs.textadventures.co.uk/quest/scopes.html// specifically for your Player Objects only, as an alternative to using the 'getdirectchildren' and 'getallchildobjects' :
http://docs.textadventures.co.uk/quest/ ... ntory.htmlhttp://docs.textadventures.co.uk/quest/ ... ntory.htmlhttp://docs.textadventures.co.uk/quest/functions/ (categorical order)
http://docs.textadventures.co.uk/quest/ ... tions.html (alphabetical order)
http://docs.textadventures.co.uk/quest/ ... ldren.htmlhttp://docs.textadventures.co.uk/quest/ ... jects.htmlhttp://docs.textadventures.co.uk/quest/scopes.html// the lazy way (lol):
http://docs.textadventures.co.uk/quest/ ... jects.html---------
basically, the quest engine has already built-in ways to populate+get various Objectlist Attributes, and also Objects~Attributes within Objects (or other Elements within Elements), and once with an Objectlist Attribute, populated with the desired Objects, then you can use the built-in Functions~Scripts to iterate through the lists (and~or dictionaries) and do whatever you want with them.
also, quest's 'class~group' is known as an 'Object Type (Types)' and their use via Inherit Attributes, see here:
http://docs.textadventures.co.uk/quest/ ... /type.htmlhttp://docs.textadventures.co.uk/quest/ ... types.htmlhttp://docs.textadventures.co.uk/quest/ ... nced_.html (this mostly covers tabs and making types specifically for Pixie's 'Magic System + Simple Combat System' Library, so it's a bit, tangent~off topic or is too advanced+specific, as a link for about Object Types)
http://docs.textadventures.co.uk/quest/ ... types.html-------
an example:
you got your 'clothing' Objects on~inside~added_to your 'player' Player Object
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="chest" type="object">none_clothing</attr>
<attr name="waist" type="object">none_clothing</attr>
<attr name="left_hand" type="object">none_armor</attr>
<attr name="right_hand" type="object">none_weapon</attr>
<object name="none_clothing">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">clothing</attr>
</object>
<object name="none_weapon">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">weapon</attr>
</object>
<object name="none_armor">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">armor</attr>
</object>
<object name="pants">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">clothing</attr>
</object>
<object name="shirt">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">clothing</attr>
</object>
<object name="sword">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">weapon</attr>
</object>
<object name="shield">
<inherit name="editor_object" />
<attr name="type_of_object" type="string">armor</attr>
</object>
</object>
<function name="equip_clothing">
foreach (object_variable, GetDirectChildren(player)) {
if (HasString (object_variable, "type_of_object") and object_variable.type_of_object = "clothing") {
// etc equip scripting, I left out some needed Attributes, such as whether it is 'worn' and also Attributes to determine what body location for what Object Attribute to equip (assign) the Object to, lol, meh. This is just a brief simple example, not a full sample~functional equipment system, example, lol.
}
}
</function>
or, since this example is using a Player Object, you can also do this too:
foreach (object_variable, ScopeInventory()) { scripts }