• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Decay item

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:
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
 
Just to add for other people, it didnt work, because items with unique ids cannot decay probably.
 
Back
Top