inventory size - only 8 items?

Started by dikla, Fri 07/05/2004 00:11:49

Previous topic - Next topic

dikla

i tried my game and there is only 8 items in my inventory althou i have more but they dont show up. (i saw that they are exist when i tried it with 2 items).
i serach for some facts here but from what i read it seems that there is nothing to do about it.
is it true? you can see only 8 items shown in the inventory???????? (not even up and down arrows?)
dikla

Ashen

#1
Are you asking whether you can have more than 8 items in your inventory, or whether it's possible to see more than 8 items at once? Either way, the answer is that you can. What inventory GUI are you using? If it's a custom one, you might need to play around with the inventory window size, or the button coding.
I know what you're thinking ... Don't think that.

Moox

Look at the bottom 2 buttons script in this gui, They scroll the inventory up and down

Code: ags

 if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
    
    if (button == 1) {
      // They pressed SELECT, so switch to the Get cursor
      SetCursorMode (MODE_USE);
      // But, override the appearance to look like the arrow
      SetMouseCursor (6);
    }
    
    if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK);  
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }
  }

Proskrito

if i remember correctly, there is a 'game.' variable called game.inv_items_displayed or something like that (i dont have ags here) that lets you define how many items are displayed in the inventory.
However, your inventory window must be big enough, of course ; ).
There were also a game.items_per_line or so variable, look them up in the manual, in the game. variables part.
I hope im right and not confusing you : )

Ashen

game.items_per_line and game.num_inv_displayed are listed as read only variables, so I don't think you can use them to set anything.
I know what you're thinking ... Don't think that.

Skio

 You can also reduce the size of your item placeholders putting the command

SetInvDimensions(x, y);

in the game_start() function in the global script.

Ofcourse the items themeshelves should be drawn smaller.
Î'νδρων Επιφανων Πασα Î"η ΤαφοÏ,

SMF spam blocked by CleanTalk