Blockland Forums > Modification Help
ItemData::onUnUse
(1/2) > >>
Bauklotz:
Is there a way to register when a client has kind of 'unselected' a item?
Headcrab Zombie:
function WeaponImage::onUnmount(%this,%obj,%slot)
{
    %client = %obj.client;
    //do stuff
}
Bauklotz:
What if I don't have a WeaponImage for it, only a ItemData?
Headcrab Zombie:
Well I found an ItemData::onUse, but not an ItemData::onUnUse, so you'd have to use onUse, and then have it figure out whether or not it is the item you want.

What are you doing that has an item but not image, anways?
Bauklotz:
Well, a kind of 'ghost item' which is kinda used for selecting a action (setting %cl.hasTheToolSelected, and stuff).
Navigation
Message Index
Next page

Go to full version