Checking if inventory is empty.

Hi, folks,

I am using the webinterface of Quest because I am working on a macbook. For my game I needed to check if the player inventory is empty: I recreated the scene from Scott Adam's "Adventureland" where you can escape from the quicksand bog by swimming, but only if you are carrying nothing.

Since the clickable script-interface did not help me I did some research and found a solution with the expression

ListCount(GetAllChildObjects (player)) = 0

which is True when the inventory is empty. The solution works fine as expected.

My question: is this there also a "clickable" solution or is my way the only way? I am a bit puzzled because I'd have thought that checking for an empty inventory is a regular thing in text adventures and that webinterface of Quest would provide a prepared attribute for that.

Thanks a lot!

Nele


I don't think there's a way to do it in the GUI; but the graphical interface only has the very basics. It seems a logical thing to test for, but I can't think of any other game that uses that check. I can think of a couple where you have to have greater than or less than a certain number of items in your inventory; and slightly more where the weight of objects you're carrying is relevant. But then you've got other variations. Do you count the clothes you're wearing, if the game has clothes? If you're requiring the player to be carrying less than three objects, does a bell inside a box count as one object or two? Does it make a difference if the box is open?

I think what seems like a simple thing to test for could easily end up being a dozen different expressions, depending on little nuances which might differ depending on which features the game uses.

At this point, it seems that the options you can select in Quest's GUI are the absolute basics; the things that almost every text adventure will probably need at some point. And there are posts on here every few months where someone didn't notice that the thing they want is on the list. I think that the more options there are, the easier it gets for someone to overlook the one they need.

Probably a personal preference thing; but I think Quest today has a reasonably good balance when it comes to the learning curve.

(It would be nice if there was something like Excel's formula builder, if it still has that. Something where you can select any of the game's functions from a list (or a categorised list) and build up an expression in the GUI. But that's going to be a big chunk of javascript, so unlikely to happen in the near future)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums