Oh. I think this might have been added in 1.69 patch? But anyway here are the functions for Get/SetDescription. You can just scroll through your script editor to find them as well.
// Set the description of oObject.
// - oObject: the object for which you are changing the description
// Can be a creature, placeable, item, door, or trigger.
// - sNewDescription: the new description that the object will use.
// - bIdentified: If oObject is an item, setting this to TRUE will set the identified description,
// setting this to FALSE will set the unidentified description. This flag has no
// effect on objects other than items.
// Note: Setting an object's description to "" will make the object
// revert to using the description it originally had before any
// SetDescription() calls were made on the object.
void SetDescription(object oObject, string sNewDescription="", int bIdentifiedDescription=TRUE)
// Get the description of oObject.
// - oObject: the object from which you are obtaining the description.
// Can be a creature, item, placeable, door, trigger or module object.
// - bOriginalDescription: if set to true any new description specified via a SetDescription scripting command
// is ignored and the original object's description is returned instead.
// - bIdentified: If oObject is an item, setting this to TRUE will return the identified description,
// setting this to FALSE will return the unidentified description. This flag has no
// effect on objects other than items.
string GetDescription(object oObject, int bOriginalDescription=FALSE, int bIdentifiedDescription=TRUE)
So a script using the SetDescription function might look something like so:
void main()
{
object oPC = blah blah blah;
string sNewDescription = "This weapon is now covered in blood.";
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetDescription(oWeapon, sNewDescription, TRUE);
}
Hope it helps. Good luck.
Modifié par GhostOfGod, 01 mars 2011 - 11:42 .