Hi all,
Try as I might, I can't get this to work. I have a "broken sword" type of inventory screen at the top and I can't get my game to register the button click. Any tips?
Here's my code:
if (interface==3) // INVENTORY GUI
{
if ((button == 2) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed))
{
   game.top_inv_item = game.top_inv_item + game.items_per_line; // scroll up
  Â
}
if ((button == 1) && (game.top_inv_item > 0)) // scroll down
game.top_inv_item = game.top_inv_item - game.items_per_line;
}
Are the buttons assigned correct (run script etc)... just to be sure :)
Yeah, that's all correct.
I even added a bit of code to check if the game registered even REGISTERED the button click (I had the character say "hi") and that didn't even work, so I'm totally confuzzled...
Never mind. I'm a dope. I didn't have "run script" enabled for the buttons. :-X
It's always something simple...
how about adding Display("hi"); just after the if (interface==3) {... :P
EDIT: ok :)
This might be in the Beginners' FAQ, the bit about making sure "Run Script" is set. HAH! N00B!! :P
Don't worry, I went for a week trying to figure out what the hell was wrong with my demo before i realized I didn't have that set for the buttons in my GUI. :D