ok got the sound working too yay!! now one last thing.. Id like it to toggle on and off during combat if you press it again. im working with this section now only and like only the if statement line. What im wanting is repeated presses check if the animation is visible and if it is turn it off and the combat state monitoring etc like you see below:
Code:
if IsHidden(hourglass) == (false) then
EVENT_MANAGER:UnregisterForEvent("RidinDirty", EVENT_PLAYER_COMBAT_STATE)
PlaySound("GuildRoster_Added")
hourglass:SetHidden(true)
hourglass.animation:Stop()
return
else
EVENT_MANAGER:RegisterForEvent("RidinDirty", EVENT_PLAYER_COMBAT_STATE, RidinDirty.TeleportQueue)
PlaySound("GuildRoster_Added")
hourglass:SetHidden(false)
hourglass.animation:PlayForward()
eturn
end