Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

How to set inventory limit?

A topic by Garry Francis created Sep 05, 2019 Views: 79 Replies: 8
Viewing posts 1 to 4

Sorry for all the questions, but...

I've found that there is a test for inventory_item_limit(), but how do I set the limit in the first place? I want to screw down the limit to a more realistic maximum, maybe 5 items. I'm sure I saw this somewhere in the user interface, but my Ctrl+Space hinting and code completion doesn't seem to work properly.


It's under settings...

settings {
   inventory_items_limit_var                                    = 10
   inventory_weight_limit_var                                   = 10
   inventory_worn_items_limit_var                               = 10


I'm not understanding where I put that .-.

should be inside settings right?


Correct, except that you can't use an integer. You have to use a reference to an integer variable as described in my post a little further down in this thread.

Host (1 edit) (+1)

I added a full code snippet to the cookbook.

It may be confusing because the game has a settings section, but each theme has a settings section too. I think your problem is that you are looking in the theme settings, not the game settings. Sorry about that.

I've updated the document, which should prevent this sort of confusion for the future:


Good point. I didn't notice that. That's why you're the expert and I'm the newbie.


I'm the obfuscated syntax designer so I better know my way around or we are all doomed ;-)


Brilliant. Thanks for that.


I couldn't get that to work. I had to use:

integers {
   max_carried : integer_const "5";

settings {
   inventory_items_limit_var = max_carried