1. #1
    The Lightbringer Lovestar's Avatar
    10+ Year Old Account
    Join Date
    Nov 2010
    Location
    United States
    Posts
    3,075

    Is there an EVENT that indicates unit movement?

    I've created a custom trigger in WeakAuras to change an icon based on whether I'm moving or not. I use a LUA function to check whether GetUnitSpeed returns a value greater than zero; so far it works a treat.

    However, I've been unable to find an EVENT to initiate the function with — forcing me to fall back to letting WeakAuras check the variable "On Every Frame".

    I am a complete neophyte at programming/scripting, but I know from working in Flash that "Every Frame" events tend to be really inefficient. So is there any kind of EVENT I can refer to in order to do this more cleanly? I combed the list at WoW Programming pretty thoroughly, but I'm hoping I missed something.

    Any advice is appreciated. :>

  2. #2
    There is no event that triggers when you start/stop moving. But, look at the movement API:
    http://wowprogramming.com/docs/api_categories#movement

    You can always hooksecurefunc on those events that start/stop movement, simulating a event thus only changing the auras when you specifically move. Now, the one problem I could see is if you move involuntarily... Death Grip for example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •