+ Reply to Thread
Results 1 to 2 of 2

Thread: LibUnitChange

  1. #1
    RIFT Fan Site Operator Aieny's Avatar
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    472

    Default LibUnitChange

    Ok, this has been bugging me for a while now. I keep trying to understand how to use LibUnitChange to monitor things like when the player is available, but I just cannot seem to get it. Can someone provide or point me to a working example of HOW to use LibUnitChange? I'm growing weary of seeing "just use LibUnitChange" when I've yet to figure out how to use it
    a community-oriented site for all things Rift

  2. #2
    Plane Walker Kreiri's Avatar
    Join Date
    Feb 2011
    Posts
    402

    Default

    Code:
    for k, v in pairs(KBB.units) do
    	table.insert(Library.LibUnitChange.Register(k), {function(value) OnUnitChange(k, value) end, addonInfo.toc.Identifier, "OnUnitChange"})
    end
    here k is the unit spec which I'm watching ("player", "player.target" etc). value is false when unit is removed, and (IIRC) has unit id string when unit is added.
    Last edited by Kreiri; 12-09-2011 at 07:55 AM.
    Feminism is the radical notion that women are people.

+ Reply to Thread

Bookmarks

Posting Permissions

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