Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How to loop through all objects in inventory or any room?

A topic by Garry Francis created Sep 05, 2019 Views: 50 Replies: 1
Viewing posts 1 to 2
Submitted

Is it possible to write a loop (using :while) so that you can test and/or describe every object in your inventory, the current room or a specific room?

Host

Nothing is supported that will perform this type of activity nicely (right now). There are some really horrible methods of achieving some of what you want, but please, don't do it.

The while loop was intended to be used for such a feature, but this is another undocumented feature of Adventuron that you have discovered. Anything that is undocumented can be assumed to be undocumented by design (either not beginner friendly, or not fully realised yet).

Please don't imagine that Adventuron is anywhere near as powerful as general purpose code you can write in Inform 5 / 6. It's still a database-driven format, and an in-development one at that.