Non-player things

Hi folks. Sorry for what is a n00b question but I wrote a game several years ago and I’m revising it.

At some point in the old code, I wanted to go through a list of things that were in a room that are other than the player. The old code was essentially:

“If any nonplayer thing that is not fixed in place is in the study”

The Inform 7 compiler no longer recognizes the descriptor “nonplayer thing.”

Any suggestions?

1 Like
Definition: a thing is other if it is not the player.
Definition: a thing is another if it is not the player.

if there is another portable thing in the Study:

Thanks so much, Daniel!!!

I include those two lines in every single Inform thing I write. They’re just so useful!

Out of curiosity, why do you need both?

Not strictly necessary, but it lets me phrase things more naturally.

Instead of eating in the presence of another person...
repeat with the item running through other things in the location...

I harp on this a lot, but Inform’s biggest advantage over other languages is how easy it is to skim when you’re coming back to your code later, and making it read as naturally as possible helps that.