Hey mate, this is Simon's script. But it just for when you over the item in inventory and not the object in the scene. Hmm I'll try to look the script and maybe modify it
.. Thank you so much bro!
Simon's script;
oldItem = nil
function mainLoop()
local curObj=game:getLink(VGameCurrentObject)
if oldItem~=nil then
oldItem:setValue(VAnimationFirstFrame,1)
oldItem:setValue(VAnimationLastFrame,1)
oldItem=nil
end
if curObj:getId().tableId==eObjects then
if curObj:getBool(VObjectIsItem) then
local act = getObject("ActiveAnimations["..curObj:getName().."]")
act:setValue(VAnimationFirstFrame,2)
act:setValue(VAnimationLastFrame,2)
oldItem = act
end
end
end
function animStartedH(anim)
local data = anim:getLink(VAnimationSavedObject)
local curObj = data:getParent()
if curObj:getId().tableId==eObjects then
if curObj:getBool(VObjectIsItem) then
anim:setValue(VAnimationFirstFrame,1)
anim:setValue(VAnimationLastFrame,1)
end
end
end
registerEventHandler("animationStarted", "animStartedH")
registerEventHandler("mainLoop","mainLoop")