LucasArts inventory scrolling

Started by Ytterbium, Sat 03/04/2004 22:56:12

Previous topic - Next topic

Ytterbium

I'm trying to get my inventory window to scroll, but whenever I click a scroll button, the cursor mode is rendered unchangable and I have to quit the game. Oh, and it doesn't work. Here's a diagram:

Displayed area is between *'s
*1 2 3 4 5* 6

I'm trying to change it to...
1 *2 3 4 5 6*

I use...

Code: ags
  else if (button == 5) {
      // scroll down
      game.top_inv_item += 1;
    }
    else if (button == 4){
      // scroll up
      game.top_inv_item -= 1;
    }


in the inventory script, but this code causes the problem to occur. Help!

Currently in production: Septigon

Scummbuddy

This is what my code looks like.  Maybe it can give you some ideas?

Code: ags

      if ((button == 10) & (game.top_inv_item < game.num_inv_items - 7))
         game.top_inv_item = game.top_inv_item + 4;
      if ((button == 9) & (game.top_inv_item > 0))
         game.top_inv_item = game.top_inv_item - 4;

- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk