RodeoParade = LibStub("AceAddon-3.0"):NewAddon("RodeoParade", "AceEvent-3.0", "AceTimer-3.0")
local emote = "wave"
local interval = 3
function RodeoParade:OnInitialize()
end
function RodeoParade:OnEnable()
self:RegisterEvent("PLAYER_AURAS_CHANGED", "CrowdWave")
end
function RodeoParade:CrowdWave()
if IsMounted==1
then
self.paradeTimer = self:ScheduleRepeatingTimer(DoEmote, interval, emote)
else
self:CancelTimer(paradeTimer)
end
end
In this current form, it loads without errors, but doesn't seem to do much. I can do the emote on the mount and I figured I could try to code an addon that did this. I'm sure I'm missing a basic here. Any help would be appreciated.
It loads without error because it's looking for a global variable named "IsMounted" - which happens (probably) to be nil. It should be looking for the global function "IsMounted()". You also don't need to check for equality to 1, since the only two return values are nil or 1.
IsMounted is not always accurate on aura change. If you're trying to do something when the player becomes mounted, you should watch the critter/mount stuff instead.
Also it's kinda pointless to load up all those libs for such a simple addon:
<script src="http://gist.github.com/169553.js"></script>
In this current form, it loads without errors, but doesn't seem to do much. I can do the emote on the mount and I figured I could try to code an addon that did this. I'm sure I'm missing a basic here. Any help would be appreciated.
So:
Been reading a bit but still clueless. I appreciate the prompt help!
Apparently PAC was removed in 3.02. But half the battle... Now to logic! (Houston, we have a problem...)
Also it's kinda pointless to load up all those libs for such a simple addon:
<script src="http://gist.github.com/169553.js"></script>
Now to understand what yours does and learn it!
Off to ponder...