When I left Click on my inventory GUI the item doesn't get picked up. I get no reaction at all.
Can someone please help me?
The code I used is:
if (button == eMouseLeftInv) {if (character[GetPlayerCharacter()].activeinv==-1){SetCursorMode(4); SetMouseCursor(GetCursorMode());SetActiveInventory(game.inv_activated);}
else {RunInventoryInteraction(game.inv_activated, GetCursorMode());SetCursorMode(0);}}
First of all, make sure the "Override built-in inventory window click handling" option is enabled in General Settings.
On a side note, I noticed that you are using lots of obsolete functions. Are you restoring some old script, or were watching a very old tutorial?
I may not know something about your intentions, but if you are working in latest version of AGS I recommend use code like:
if (button == eMouseLeftInv)
{
if (player.ActiveInventory == null)
{
Mouse.Mode = eModeUseinv;
player.ActiveInventory = inventory[game.inv_activated];
}
else
{
player.ActiveInventory.RunInteraction(Mouse.Mode);
Mouse.Mode = eModeWalkTo;
}
}