- Joined
- Feb 2, 2006
- Messages
- 1,631
Hey,
in my inventory system I want to use different actions for dropping an item and pawning one.
Dropping, drops an item with all charges but pawning sells an item with only one charge. Otherwise the gold received does not work for non usable items (items which stay in the inventory when being used).
The problem is now that when an item is pawned the drop trigger of course triggers as well. I tried to disable the drop trigger in the pawn trigger action and enable it again but it did not work.
I am starting a 0 timer in the drop trigger action now. If the item is null in the timer function it has been removed. So it could either be pawned or it could have been given to another character where it is removed as well.
How can I detect the item has been pawned? I could store the handle id (which does not become null) and check it in the timer function of the drop trigger but handle IDs might be reused in that time? Is that a problem?
edit: I would not have that problem at all if there was a way to receive the proper gold amount (for every charge price of the item).
in my inventory system I want to use different actions for dropping an item and pawning one.
Dropping, drops an item with all charges but pawning sells an item with only one charge. Otherwise the gold received does not work for non usable items (items which stay in the inventory when being used).
The problem is now that when an item is pawned the drop trigger of course triggers as well. I tried to disable the drop trigger in the pawn trigger action and enable it again but it did not work.
I am starting a 0 timer in the drop trigger action now. If the item is null in the timer function it has been removed. So it could either be pawned or it could have been given to another character where it is removed as well.
How can I detect the item has been pawned? I could store the handle id (which does not become null) and check it in the timer function of the drop trigger but handle IDs might be reused in that time? Is that a problem?
edit: I would not have that problem at all if there was a way to receive the proper gold amount (for every charge price of the item).