Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
ItemData::onUnUse
« previous
next »
Print
Pages: [
1
]
Author
Topic: ItemData::onUnUse (Read 579 times)
Bauklotz
September 28, 2010, 09:59:46 AM
Is there a way to register when a client has kind of 'unselected' a item?
Ad Bot
Advertisement
Headcrab Zombie
September 28, 2010, 11:20:13 AM
function WeaponImage::onUnmount(%this,%obj,%slot)
{
%client = %obj.client;
//do stuff
}
Bauklotz
September 29, 2010, 06:36:04 AM
What if I don't have a WeaponImage for it, only a ItemData?
Headcrab Zombie
September 29, 2010, 01:26:26 PM
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
September 30, 2010, 01:13:55 AM
Well, a kind of 'ghost item' which is kinda used for selecting a action (setting %cl.hasTheToolSelected, and stuff).
Chrono
October 01, 2010, 12:28:58 AM
Quote from: Bauklotz on September 29, 2010, 06:36:04 AM
What if I don't have a WeaponImage for it, only a ItemData?
How do you unuse a normal item?
Bauklotz
October 01, 2010, 02:11:35 AM
Quote from: Chrono on October 01, 2010, 12:28:58 AM
How do you unuse a normal item?
Pressing Q (closing inventory), selecting bricks, selecting paint, scrolling to another item, or stuff like that. Whenever the item is no longer selected (aka has that white circle around it in inventory HUD).
Chrono
October 01, 2010, 07:05:13 AM
You might as well use an image.
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
ItemData::onUnUse