onUseItem bug
Posted: Sun Jan 25, 2015 2:49 am
I have problem with detect onUseItem situation.
If I addConnector to item.usableitem it look like good but after using item program made this error:

For way around this problem I try use FW hook. If I create import "mod_assets/scripts/clone_object.lua" as JKos wrote and add
all touched object lost its standard onUseItem features (are only consumed ).
What I must do for managing onUseItem event when I want to define it from script during running game for its correct working?
thx.
If I addConnector to item.usableitem it look like good but after using item program made this error:

For way around this problem I try use FW hook. If I create import "mod_assets/scripts/clone_object.lua" as JKos wrote and add
Code: Select all
modifyObjects{
filter = {
hasComponents = {"item","usableitem"},
},
components = {
fw_addHooks{
class = 'UsableItem',
},
}
}
What I must do for managing onUseItem event when I want to define it from script during running game for its correct working?
thx.