+ Reply to Thread
Results 1 to 3 of 3

Thread: Accessing player variables

  1. #1
    Soulwalker
    Join Date
    Jul 2014
    Posts
    6

    Default Accessing player variables

    I have been having a problem accessing player variables in an addon I am working on. I was hoping someone could point me in the right direction. I was trying to access a player coordinate and have the following code:

    playerdetails = Inspect.Unit.Detail("player")
    player.pX = playerdetails.coordX

    When I print out playerdetails, i get a table but when I print out player.pX, I get "nil"

    Any help is greatly appreciated. Thanx!

  2. #2
    Sword of Telara DoomSprout's Avatar
    Join Date
    Apr 2011
    Posts
    876

    Default

    When are you making the call to get the player's details? If you're doing it as the addon loads, most of the information about the player won't actually be available yet.

    You could write out playerdetails.availability to see if you've got "full" or "partial" (or maybe "none") availability.

    There's an event - Event.Unit.Availability.Full - that you can use to wait for the player to become fully available.

    Gadgets: Unit Frames and Other Stuff for RIFT

  3. #3
    Soulwalker
    Join Date
    Jul 2014
    Posts
    6

    Default

    Thanks, that's probably my problem.

+ 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