einzelkaempfer, that would be the easiest way if we could set a center point for image files, but as for now the center is automatically set to the center of the image while I want it to be in the upper left corner (where the point of the arrow is).I see.
I could draw larger images with the cursor right in the center, but I think the sprites would become too big.That would work, though. If your cursor image is supposed to have 100 x 100 px, make the sprite 200 x 200 px and put the image in the lower right corner (and add your arrow graphics to the center if you like). Keep the rest of the image transparent. The point of interest is in the center, but appears to be on the upper left. Works fine for me.
local itm = nil
function cursorLoop()
if not game.UsedItem:isEmpty() then
if game.UsedItem:getName() ~= itm then
itm = game.UsedItem:getName(); startAction(Actions["cur_" .. itm])
Conditions["item_used"].ConditionValue = true
end
elseif game.UsedItem:isEmpty() and itm ~= nil then
itm = nil; startAction("Actions[cur_default]")
Conditions["item_used"].ConditionValue = false
end
end
registerEventHandler("mainLoop", "cursorLoop")
I still don't see the advantage of using commands as items or setting the dragged cursor via Lua.
But do as you like. I'll stick with what I think is the easy way...
I still don't see the advantage of using commands as items or setting the dragged cursor via Lua.le possibilities :p
But do as you like. I'll stick with what I think is the easy way...
I use it to have an indicator when an item is above an object like in mobkey island 3 . So i need something with inactive/active animations.Good point.