Inventory problems!

Started by OftenK, Sun 15/08/2004 22:10:33

Previous topic - Next topic

OftenK

EDIT: Allright, apparently I had the script the whole time. (I actually think I remember sticking it in there too. Jeez, I'm such a goon.) but, for some reason, when the player picks up more than two objects, the third disappears. Or rather, it just doesn't show up. I thought this was because of scrolling, but I'm not so sure now. When I click the "scroll down" button, nothing happens. My inventory box is large enough horizontally to fit the third object, but, for some reason, it just doesn't appear. Just for reference, here's the scrolling script (In case something got screwed up somehow):

Code: ags
if ((button == 6) && (game.top_inv_item > 0)){
Ã,  Ã,  Ã,  // scroll up
Ã,  Ã,  Ã,  game.top_inv_item = game.top_inv_item - game.items_per_line;
Ã,  Ã,  Ã,  
if ((button == 7) && (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;



As always, any help is greatly appreciated, and rewarded with enternal gratitude and possibly cupcakes.


Etcher Squared Games

hey there, I'm new to all this myself, but I may be able to offer something to you from what I've learned so far....

have you set your inventory item size?

SetInvDimenstions

that and are you inventory items of the same size as set by said function?

perhaps it's too big and getting pushed off to the right or left?
website: http://www.etcher2games.com/
email: etcher2games@yahoo.com
forum: http://www.etcher2games.com/forums

Anyone want to make my website for free?

Goot

You didn't close the bracket for the scroll up script. That's why scroll down isn't working, because it's inside the scroll up bracket. Your script should be:

if ((button == 6) && (game.top_inv_item > 0)){
      // scroll up
game.top_inv_item = game.top_inv_item - game.items_per_line;
      }
if ((button == 7) && (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;
}

OftenK

Worked like a charm! Thanks! (I hate it when I miss little things like that!)

SMF spam blocked by CleanTalk