Need Help Getting Inventory Button On GUI To Work [SOLVED]

Started by emma_north1, Fri 17/10/2008 15:10:38

Previous topic - Next topic

emma_north1

I'm using a blank script (new game) and have uploaded my Inventory Screen and my control bar (the one at the top with all the buttons across, including inventory). I've successfully scripted the bar to only appear when the mouse gets to the top of the screen, and have had no problem programming the curser buttons to work. However I can't seem to get my Inventory button script right. Obviously when the player clicks that button I want them to be taken to my Inventory screen (gInventory), but nothing I try seems to work.

I've loaded up the demo game to see how that did it, but the script it's using doesn't work at all for me even though it's still in the new AGS. This is what they used:


function btnIconInv_Click(GUIControl *control, MouseButton button)
{
  show_inventory_window();
}


I know the top bit needs to be:


function Inventory_OnClick(GUIControl *control, MouseButton button)


But cannot get the next bit right. Please help!
Emma North


emma_north1

Perfect! Thanks! I'll try and get the Inventory Window buttons working now!
Emma North

SMF spam blocked by CleanTalk