We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 3 of 3

Thread: Name of item?

  1. #1
    Join Date
    Jun 2011
    Posts
    162

    Name of item?

    If I have an item, its an instrument. And I want its full name. How do I do that, this dont work, its just gives the start 1 or 2 words from the full name (for crafted instruments):

    item:GetItemInfo():GetName()

    same problem with:

    item:GetName()

  2. #2
    Join Date
    Mar 2007
    Posts
    1,590
    Quote Originally Posted by Splik View Post
    If I have an item, its an instrument. And I want its full name. How do I do that, this dont work, its just gives the start 1 or 2 words from the full name (for crafted instruments):

    item:GetItemInfo():GetName()

    same problem with:

    item:GetName()
    There are two types of crafted instruments that I can craft, the regular Minstrel Instrument recipes and Minstrel Legendary Items. Which type are you referring to? Do you have any special (non-Ascii) characters in the item name?

    When I get the name of a "named" crafted musical instrument - that is, a crafted minstrel instrument that was critted and enscribed, I still get just the base item's name, for instance:"Exquisite Walnut Flute" but it is not truncated, it is the full item name, just not the enscribed name. LIs however work a little differently - before being imbued, I get the same results as a regular item (the base item's name) but after being imbued, if I try item:GetName() I get the full enscribed name (still not truncated) but the ItemInfo:GetName() returns the base item's generic name. I don't know why imbuing seems to change the result of item:GetName() but it was still not truncated. Perhaps if it is an imbued LI your item name is just much longer than any of mine - specifically how many characters does it display?

    EDIT:Since in your OP you mention "the start 1 or 2 words" instead of truncation after a specific number of characters, that sounds more like word wrapping - are you sure you aren't just accidentally displaying the name in a field that is too short to display the whole thing and it is automatically word wrapping? To turn off word wrapping you have to call SetMultiline(false) on text and label fields. Did you try outputting the name to the standard chat using Turbine.Shell.WriteLine() to be sure it's not just a display issue?
    Last edited by Garan; Jul 03 2020 at 04:35 PM.

  3. #3
    Join Date
    Jun 2011
    Posts
    162
    Very helpful, I didn't think of that. Thank you.

 

 

Posting Permissions

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

This form's session has expired. You need to reload the page.

Reload