yep, look into the 'foreach' and~or 'for' Script Commands (and using lists and dictionaries, and the Scopes):
(though this stuff is quite a bit advanced, if you're new to coding or to quest's coding)
http://docs.textadventures.co.uk/quest/ ... reach.html (do for all~every~*EACH*)
http://docs.textadventures.co.uk/quest/scripts/for.html (do for specific range and by skipping interval)
http://docs.textadventures.co.uk/quest/ ... lists.htmlhttp://docs.textadventures.co.uk/quest/ ... aries.htmlthe Scopes (scroll down to the 'S' category):
http://docs.textadventures.co.uk/quest/ ... tions.htmlalso the Scope-likes (the "A" category):
http://docs.textadventures.co.uk/quest/ ... tions.htmlthe 'Alls': AllObject, AllExits, AllCommands, AllTurnscripts
-------------
an example:
(increasing all of our 4 primary attributes by 5, such as when leveling up)
game.primary_attribute_stringlist = split ("strength;endurance;intelligence;mentality", ";")
foreach (attribute_x, game.primary_attribute_stringlist) {
-> player.attribute_x = player.attribute_x + 5
}
----------------
if you jsut mean to set the same attributes upon multiple Objects, then you'll want to use Object Types:
http://docs.textadventures.co.uk/quest/ ... /type.htmlhttp://docs.textadventures.co.uk/quest/ ... types.htmlhttp://docs.textadventures.co.uk/quest/ ... types.htmlObjects hold Attributes and~or other Objects
Object Types hold Attributes
think of an Object Type (confusingly shortened to 'Type', which gets confused with other uses of the word: 'type', such as Attribute Types: <attr name="xxx" type="xxx">xxx</attr>, sighs) as a basket holding eggs (attributes), so instead of giving each of those eggs individually to each object, instead you can give the basket (Object Type: via as an Inherited Attribute) to each of those Objects.
for example:
(YUCK!)
<object name="orc1">
<inherit name="editor_object" />
<alias>orc</alias>
<attr name="strength" type="int">10</attr>
<attr name="endurance" type="int">10</attr>
<attr name="dexterity" type="int">10</attr>
<attr name="agility" type="int">10</attr>
<attr name="speed" type="int">10</attr>
<attr name="luck" type="int">10</attr>
<attr name="intelligence" type="int">10</attr>
<attr name="spirituality" type="int">10</attr>
<attr name="mentality" type="int">10</attr>
</object>
<object name="orc2">
<inherit name="editor_object" />
<alias>orc</alias>
<attr name="strength" type="int">10</attr>
<attr name="endurance" type="int">10</attr>
<attr name="dexterity" type="int">10</attr>
<attr name="agility" type="int">10</attr>
<attr name="speed" type="int">10</attr>
<attr name="luck" type="int">10</attr>
<attr name="intelligence" type="int">10</attr>
<attr name="spirituality" type="int">10</attr>
<attr name="mentality" type="int">10</attr>
</object>
<object name="orc3">
<inherit name="editor_object" />
<alias>orc</alias>
<attr name="strength" type="int">10</attr>
<attr name="endurance" type="int">10</attr>
<attr name="dexterity" type="int">10</attr>
<attr name="agility" type="int">10</attr>
<attr name="speed" type="int">10</attr>
<attr name="luck" type="int">10</attr>
<attr name="intelligence" type="int">10</attr>
<attr name="spirituality" type="int">10</attr>
<attr name="mentality" type="int">10</attr>
</object>
<object name="dragon1">
<inherit name="editor_object" />
<alias>dragon</alias>
<attr name="strength" type="int">100</attr>
<attr name="endurance" type="int">100</attr>
<attr name="dexterity" type="int">100</attr>
<attr name="agility" type="int">100</attr>
<attr name="speed" type="int">100</attr>
<attr name="luck" type="int">100</attr>
<attr name="intelligence" type="int">100</attr>
<attr name="spirituality" type="int">100</attr>
<attr name="mentality" type="int">100</attr>
</object>
<object name="dragon2">
<inherit name="editor_object" />
<alias>dragon</alias>
<attr name="strength" type="int">100</attr>
<attr name="endurance" type="int">100</attr>
<attr name="dexterity" type="int">100</attr>
<attr name="agility" type="int">100</attr>
<attr name="speed" type="int">100</attr>
<attr name="luck" type="int">100</attr>
<attr name="intelligence" type="int">100</attr>
<attr name="spirituality" type="int">100</attr>
<attr name="mentality" type="int">100</attr>
</object>
<object name="dragon3">
<inherit name="editor_object" />
<alias>dragon</alias>
<attr name="strength" type="int">100</attr>
<attr name="endurance" type="int">100</attr>
<attr name="dexterity" type="int">100</attr>
<attr name="agility" type="int">100</attr>
<attr name="speed" type="int">100</attr>
<attr name="luck" type="int">100</attr>
<attr name="intelligence" type="int">100</attr>
<attr name="spirituality" type="int">100</attr>
<attr name="mentality" type="int">100</attr>
</object>
VS, using Object Types:
(MUCH BETTER!)
<object name="orc1">
<inherit name="editor_object" />
<inherit name="orc_object_type" />
</object>
<object name="orc2">
<inherit name="editor_object" />
<inherit name="orc_object_type" />
</object>
<object name="orc3">
<inherit name="editor_object" />
<inherit name="orc_object_type" />
</object>
<object name="dragon1">
<inherit name="editor_object" />
<inherit name="dragon_object_type" />
</object>
<object name="dragon2">
<inherit name="editor_object" />
<inherit name="dragon_object_type" />
</object>
<object name="dragon3">
<inherit name="editor_object" />
<inherit name="dragon_object_type" />
</object>
<type name="orc_object_type">
<alias>orc</alias>
<attr name="strength" type="int">10</attr>
<attr name="endurance" type="int">10</attr>
<attr name="dexterity" type="int">10</attr>
<attr name="agility" type="int">10</attr>
<attr name="speed" type="int">10</attr>
<attr name="luck" type="int">10</attr>
<attr name="intelligence" type="int">10</attr>
<attr name="spirituality" type="int">10</attr>
<attr name="mentality" type="int">10</attr>
</type>
<type name="dragon_object_type">
<alias>dragon</alias>
<attr name="strength" type="int">100</attr>
<attr name="endurance" type="int">100</attr>
<attr name="dexterity" type="int">100</attr>
<attr name="agility" type="int">100</attr>
<attr name="speed" type="int">100</attr>
<attr name="luck" type="int">100</attr>
<attr name="intelligence" type="int">100</attr>
<attr name="spirituality" type="int">100</attr>
<attr name="mentality" type="int">100</attr>
</type>
-----------------------
or, lastly, do you mean you want to SUM UP the total of Attributes on~from multiple Objects ???
(such as in leveling up, applying gained attribute points to multiple party members, instead of just a single main character)
you can use the 'foreach~for' and~or Commands+Functions+Parameters to achieve this.