View Single Post
02/20/23, 01:14 PM   #13
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
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

Last edited by sinnereso : 02/20/23 at 01:16 PM.
  Reply With Quote