treshold82
New member
Hi!
I have bit problems understanding TPC internal event system. I followed example from documentation about OnImpact event and I managed to get it work but when I would like to hook up to OnInventoryUseItemType, I can't get it work.
Here is simple script made along the documentation:
If I put this script to playercharacter and I shoot arrow for example, I don't get debug.log message to console.
What I am missing?
I have bit problems understanding TPC internal event system. I followed example from documentation about OnImpact event and I managed to get it work but when I would like to hook up to OnInventoryUseItemType, I can't get it work.
Here is simple script made along the documentation:
Code:
public void Awake()
{
EventHandler.RegisterEvent<ItemType, int>(gameObject, "OnInventoryUseItemType", OnUsedItem);
}
public void OnUsedItem(ItemType item, int count)
{
Debug.Log("inventory used:" + item.name + " amount: " + count);
}
If I put this script to playercharacter and I shoot arrow for example, I don't get debug.log message to console.
What I am missing?