Core function Customization (AddInventory)

Started by Chim, Wed 20/10/2010 14:09:28

Previous topic - Next topic

Chim

Hello AGS community,

I would to know if there is any way to modify and customize a core function such as AddInventory()

I am currently working on a GUI that displays the inventory status bar for a few second every time an item is received and that would help me greatly if I could customize this function.

Cheers !

Wyz

No there is not, but for AddInventory you are in luck.
There is a special event triggered each time inventory is added are lost.
Code: ags

function on_event (EventType event)
{
    if (event == eEventAddIneventory)
    {
        // ...
    }
    else if (event == eEventLoseInventory)
    {
        // ...
    }
}
Life is like an adventure without the pixel hunts.

Chim

Cool, thank you very much, I'll try that right away :)

SMF spam blocked by CleanTalk