Originally Posted by sinnereso
Looking for some help rotating an image like an hourglass while in combat.. Ive tried many WHILE and IF setups but every one freezes the game.
Im looking basically to do this :
Code:
zo_callLater(function() TeleportHourglass:SetTransformRotationZ(math.rad(45)) end, effectDelay)-- test
the entire time before this executes when combat ends:
Code:
EVENT_MANAGER:RegisterForEvent("RidinDirty", EVENT_PLAYER_COMBAT_STATE, RidinDirty.TeleportQueue)
Basically im looking to be able to repeat the following or something similarly effective, looped until combat ends and then jump to new code:
Code:
zo_callLater(function() TeleportHourglass:SetTransformRotationZ(math.rad(45)) end, effectDelay)-- test
|
SetTransformRotationZ(math.rad(45)) does not rotate the texture by 45°, it sets the texture to a 45° position, if you want a rotation effect you'll have to increment or decrement the value by 1 or a bigger number each time that part of code is called.
EDIT:
Inspect the code in the function FyrMM.CheapAnimation(pin, rotate) in my Minimap by Fyrakin version, I use it to make the world event cyclon texture spin when it's active.