maxil
New Member
- Joined
- Oct 10, 2008
- Messages
- 12
- Reaction score
- 4
Hi. I have trouble with decay item created in lua.
When i create item on map i wanna add unique id attribute and decay it.
I creating item using this code:
This code working and item is decaying, but when i wanna add unique id using this code:
Item decay don't work. So how can I add unique id and decay item?
I use TFS 1.2 engine
When i create item on map i wanna add unique id attribute and decay it.
I creating item using this code:
Lua:
local itemHandle = Game.createItem(9957, 1, v.pos)
itemHandle:decay()
itemHandle:setAttribute(ITEM_ATTRIBUTE_DURATION, 7200000)
itemHandle:setAttribute(ITEM_ATTRIBUTE_DECAYSTATE, true)
This code working and item is decaying, but when i wanna add unique id using this code:
Lua:
itemHandle:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, v.uid)
Item decay don't work. So how can I add unique id and decay item?
I use TFS 1.2 engine