I try to handle inv.window in a global script. Unchecked the "handle inventory items..." in the AGS main menu.
Now when I pick an inventory item from the inv. window, it is not removed from there.
How can I turn it off??
I hope someone can help.
Kind regards,
Martijn
QuoteNow when I pick an inventory item from the inv. window, it is not removed from there.
How can I turn it off??
You mean you want to know how to remove it? I just ask because AGS sets up the inv cursor to appear with an item image but the last is not remove from the inventory. It's by-design.
You could do it manually:
LoseInventory(<item>);
or if that will change the cursor then the next instead:
character[GetPlayerCharacter()].inv[<item num>] = 0;
UpdateInventory();
but once you want to change the active item you have to get it back to the inventory, so it wouldn't get lost:
int active = character[GetPlayerCharacter()].activeinv;
character[GetPlayerCharacter()].inv[active] = 1;
//then choose another one
QuoteUnchecked the "handle inventory items..." in the AGS main menu.
You want to say it's checked? Or otherwise you can't handle 'em.
-Cheers
Thanks for the help. It owrks great!
martijn