humm, the topic didn't show in my search but thanks for the link to it. I mostly wanted to know if the function would be implemented in a future release.
Anyway I tried both Simon's and AFRLme scripts from that topic, both seem easy to work with though I have a question.
I created the two frame animation in the item with both instances and added an execute script to the first frame, but in the game the inventory shows the animated two frames in the item until I hover the mouse over it, and then it works as intended.
Am I doing something wrong?, how do I make the inventory not animate the icon every time it opens?.
This is the script I used in the first animation frame of the item:
prevItem = nil -- initial value of previously highlighted item
function checkItemStatus()
if prevItem ~= nil then prevItem:setValue(VAnimationFirstFrame, 1); prevItem:setValue(VAnimationLastFrame, 1); prevItem = nil end
-- + --
if game:getLink(VGameCurrentObject):getId().tableId == eObjects then
if game:getLink(VGameCurrentObject):getBool(VObjectIsItem) then
prevItem = getObject("ActiveAnimations[" .. game:getLink(VGameCurrentObject):getName() .."]"); prevItem:setValue(VAnimationFirstFrame, 2); prevItem:setValue(VAnimationLastFrame, 2)
end
end
end
function onMouseEvent(eventType)
if eventType == eEvtMouseMove then checkItemStatus() end
end
registerEventHandler("mouseEvent", "onMouseEvent", {eEvtMouseMove})