??? Please answer
Yes, but make sure AGS is actually using the inventory GUI. You need to check the 'function show_inventory_window' part of the global script, otherwise it uses the internal one you can't edit.
Change it to:
function show_inventory_window () {
GUIOn (INVENTORY);
// switch to the Use cursor (to select items with)
SetCursorMode (MODE_USE);
// But, override the appearance to look like the arrow
SetMouseCursor (6);
}
BFAQ'ed: http://www.rain-day.com/harbinger/faq/#guis08
Thank you I'll try
Please don't lock this topic yet
We don't lock solved topics. :)
ok that was simple
but i dont like the default inventory script
How do I change cursor from "inventory item" mode to "pick up an item from inventory" mode by clicking anywhere in the blank inventory GUI field?
Putting the following lines at the top of the main global script should do the trick:
function on_event(int event, int data) {
if (event == GUI_MUP) {
if (GetGuiAt(mouse.x, mouse.y)==INVENTORY) {
if (GetGUIObjectAt(mouse.x, mouse.y)<=0) {
if (GetInvAt (mouse.x, mouse.y)==-1) {
if (character[GetPlayerCharacter()].activeinv!=-1) {
SetActiveInventory(-1);
SetCursorMode (MODE_USE);
SetMouseCursor (6);
}
}
}
}
}
}
But keep in mind, it won't work if you click somewhere between the inventory items.
Thanks! I am going to be permanent user of AGS.. :)
That wasnt too hard but I couldnt figure it out for myself.:P Now I have one more question: can I make the game time "freeze" when invrntory GUI is on?
Well, if INVENTORY gui's visible property is set to PopUpModal then it automatically pauses the game.