I am trying to get the string that is the item description, but I get a blank string when doing GetDescription on an item placed in the inventory of a placeable. I get the tag correctly, but not description.
Any ideas what I'm doing wrong?
Here's On Used on a placeable, and the sDesc is the "Localized Description" text of the placeable.
void main()
{
string sDesc = GetDescription(OBJECT_SELF);
SpeakString(sDesc);
}
Here's OnInventoryDistrubed of a container object
The first message prints "Desc ** is destroyed"
The second prints "Tag *in004_gerts_questitem* is destroyed"
void main()
{
object oItem = GetInventoryDisturbItem();
string sDroppedDesc = GetDescription(oItem);
string sDroppedTag = GetTag(oItem);
string sOwnerItem = GetLocalString(OBJECT_SELF, "sPersonalItemTag");
if (sDroppedTag == sOwnerItem)
{
DestroyObject(oItem);
SendMessageToPC(GetFirstPC(), "Desc *" + sDroppedDesc + "* is destroyed");
SendMessageToPC(GetFirstPC(), "Tag *" + sDroppedTag + "* is destroyed");
}
}





Retour en haut






