you're going to have to give each of your 'room-type' Objects an Attribute, which you can then thus check for:
quest has the 'editor_room' Inherited Attribute (Object Type ~ Type:
http://docs.textadventures.co.uk/quest/types.html ), except that this disappears during the actual game play, as it is only designed for telling quest during the editor mode (not actual game play mode), that the object is a 'room type' Object.
so, just make your own such attribute (you'll have to do it for each~every object that you want to be a 'room type' Object), then you got to check for it.
-------
you may want to refine your searched Objects via the other Scopes, as the 'AllObjects ()' searches through ALL OBJECTS IN THE ENTIRE GAME (if you use 'AllObjects ()', you'll likely need more checks in your scriptings):
http://docs.textadventures.co.uk/quest/scopes.html(for example, usually you just want to search for Objects only within the room that you're in, and not the entire game's Objects)
<object name="room_1">
<inherit name="editor_room" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<attr name="object_type_string" type="string">room</attr>
</object>
<object name="room_2">
<inherit name="editor_room" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<attr name="object_type_string" type="string">room</attr>
</object>
<object name="object_1">
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<attr name="object_type_string" type="string">object</attr>
</object>
<object name="npc_1">
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<attr name="object_type_string" type="string">npc</attr>
</object>
<object name="player_1">
<inherit name="editor_player" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<attr name="object_type_string" type="string">player</attr>
</object>
<function name="function_1">
foreach (object_x, AllObjects () ) {
if (object_x.object_type_string = "room") {
msg ("blah1")
} else if (object_x.object_type_string = "object") {
msg ("blah2")
} else if (object_x.object_type_string = "npc") {
msg ("blah3")
} else if (object_x.object_type_string = "player") {
msg ("blah4")
}
}
</function>
~OR~
you can use the 'inherited' Attribute (Object Type ~ Type) too:
<type name="room_object_type">
<attr name="blah1A" type="string">blah1</attr>
<attr name="blah1B" type="int">50</attr>
// etc attributes
</type>
<type name="object_object_type">
<attr name="blah2A" type="string">blah2</attr>
<attr name="blah2B" type="int">50</attr>
// etc attributes
</type>
<type name="player_object_type">
<attr name="blah3A" type="string">blah3</attr>
<attr name="blah3B" type="int">50</attr>
// etc attributes
</type>
<type name="npc_object_type">
<attr name="blah4A" type="string">blah4</attr>
<attr name="blah4B" type="int">50</attr>
// etc attributes
</type>
<object name="room_1">
<inherit name="editor_room" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="room_object_type" />
</object>
<object name="room_2">
<inherit name="editor_room" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="room_object_type" />
</object>
<object name="object_1">
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="object_object_type" />
</object>
<object name="npc_1">
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="npc_object_type" />
</object>
<object name="player_1">
<inherit name="editor_player" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="editor_object" /> // this attribute unfortunately is only temporary (editor mode only, not actual game play mode)
<inherit name="player_object_type" />
</object>
<function name="function_1">
foreach (object_x, AllObjects () ) {
if (HasAttribute (object_x, "room_object_type") {
msg ("blah1")
} else if (HasAttribute (object_x, "object_object_type") {
msg ("blah2")
} else if (HasAttribute (object_x, "npc_object_type") {
msg ("blah3")
} else if (HasAttribute (object_x, "player_object_type") {
msg ("blah4")
}
}
</function>
-------
OR, if you notice, you could use a structured 'naming~labeling' convention~system, then with a little bit of 'advanced' (it's not really advanced in the coding world, but for noobs to coding it is a bit 'advanced' ) scripting, you could just skip the extra Attribute, and just use the 'NAME' (ID) Attribute of the Objects, itself~themselves.