+ Reply to Thread
Results 1 to 5 of 5

  Click here to go to the first Rift Team post in this thread.   Thread: Command.Tooltip

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

    Default Command.Tooltip

    I'm trying to use Command.Tooltip to show item information, but using item type IDs only generates default item information. How can I get it to show specific item information (for example, the exact stats on my Focus item).

    Also, how do I get the tooltip to anchor to the mouse instead of the upper left corner?

    And another thing, I have code that generates an error in Command.Tooltip the first time I mouseover, but the next time (no changes), it shows the tooltip properly. Any guesses what might be going on?
    Last edited by Aieny; 12-10-2011 at 04:31 PM.
    a community-oriented site for all things Rift

  2. #2
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    I seem to recall that Command.Tooltip can error if it hasn't had a chance to load stuff yet. Use pcall.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  3.   Click here to go to the next Rift Team post in this thread.   #3
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Aieny View Post
    I'm trying to use Command.Tooltip to show item information, but using item type IDs only generates default item information. How can I get it to show specific item information (for example, the exact stats on my Focus item).
    The Focus item is a bit of an oddity - its data isn't encoded within the "type", it can only be read via the actual item ID. (This is also why linking your Focus item in chat doesn't include all its stats.) I'm pretty sure Command.Tooltip will accept an item ID, and that's what you'll have to use for the Focus item to work properly.

    Quote Originally Posted by Aieny View Post
    Also, how do I get the tooltip to anchor to the mouse instead of the upper left corner?
    At the moment, you can't - that API showed up as kind of a last-minute thing. We'll be improving it in the future.

    Quote Originally Posted by Aieny View Post
    And another thing, I have code that generates an error in Command.Tooltip the first time I mouseover, but the next time (no changes), it shows the tooltip properly. Any guesses what might be going on?
    If the client isn't aware of an item type yet, it'll generate an error, then work the second time (it requests the info from the server.) A better interface for this will likely show up at some point.

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

    Default

    Quote Originally Posted by ZorbaTHut View Post
    The Focus item is a bit of an oddity - its data isn't encoded within the "type", it can only be read via the actual item ID. (This is also why linking your Focus item in chat doesn't include all its stats.) I'm pretty sure Command.Tooltip will accept an item ID, and that's what you'll have to use for the Focus item to work properly.
    Are item IDs consistent across logins, or do they change each time.....and can you use the item ID from a character that isn't logged in?
    a community-oriented site for all things Rift

  5.   This is the last Rift Team post in this thread.   #5
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Aieny View Post
    Are item IDs consistent across logins, or do they change each time
    There's no guarantee here, but in general they should be consistent. Character transfers will probably scramble the IDs.

    Quote Originally Posted by Aieny View Post
    .....and can you use the item ID from a character that isn't logged in?
    No, you can't. If you want to, I recommend saving the item data in a SavedVariable.

+ 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