Aller au contenu

Photo

GetDescription Help


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
comeandsee

comeandsee
  • Members
  • 33 messages

Hello, I am working on creating a wand for renaming descriptions on items, but I can't get the GetDescription function to work properly. It will not grab descriptions from anything but other players even if its set to get it from the activated target. Is there any workarounds to get this function to work on items?

 

    object oPC      = GetItemActivator();
    object oItem    = GetItemActivated();
    object oTarget  = GetItemActivatedTarget();
    location lTarget = GetItemActivatedTargetLocation();

    SendMessageToPC(oPC, GetDescription(oTarget));

 



#2
Jezla

Jezla
  • Members
  • 173 messages

That's one of the broken functions.  See this thread: http://forum.bioware...functions-list/



#3
kevL

kevL
  • Members
  • 4 070 messages

not really ...

 

see the Broken Functions list stickied at the top of the scripting forum, it says:

 

 

 

GetDescription
Does not retrieve the default description (original toolset defined description) Only retrieves correct value after SetDescription has been called
Workaround: Assign value as variable, then set in OnSpawn

 

:bandit:



#4
comeandsee

comeandsee
  • Members
  • 33 messages

Forgot to mention I saw it was listed as a broken function, but was wondering if there was any workaround?

 

SetDescription function does work though.



#5
Tchos

Tchos
  • Members
  • 5 072 messages

The listed workaround is to set the description first, so that you can get the description later.  The listed workaround says to set it by using a variable, though you could do it through any other scripting method as well.  I haven't tried it, so I can't speak from experience.



#6
Morbane

Morbane
  • Members
  • 1 883 messages

taking a peek at the MoTB weapon crafting script may help - cant say what its called/named though



#7
Dann-J

Dann-J
  • Members
  • 3 161 messages

taking a peek at the MoTB weapon crafting script may help - cant say what its called/named though

 

They might only allow you to change item names, rather than their descriptions.