Author Topic: Portrait troubles  (Read 506 times)

Legacy_The Great Thief

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Portrait troubles
« on: May 21, 2012, 10:57:10 am »


               Is it possible to display a portrait in a conversation from someone who isn't actually present?

Situation: A person displayed in a magic mirror.  
               
               

               


                     Modifié par The Great Thief, 21 mai 2012 - 09:57 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Portrait troubles
« Reply #1 on: May 21, 2012, 11:35:40 am »


                 Assuming there isn't an easy easy I'm no aware of, what I'd try is getting the default portrait of the object being conversed with, then storing that as a local int on it.  Then change the portrait to what you want it to be for the duration of the conversation, changing it back at the end or if the convo is escaped.
  Get/SetPortraitResRef()  are used in the case of custom portraits.




// - oTarget: the object for which you are getting the portrait Id.
// Returns: The Portrait Id number being used for the object oTarget.
//          The Portrait Id refers to the row number of the Portraits.2da
//          that this portrait is from.
//          If a custom portrait is being used, oTarget is a player object,
//          or on an error returns PORTRAIT_INVALID. In these instances
//          try using GetPortraitResRef() instead.
int GetPortraitId(object oTarget=OBJECT_SELF) 



// Change the portrait of oTarget to use the Portrait Id specified.
// - oTarget: the object for which you are changing the portrait.
// - nPortraitId: The Id of the new portrait to use.
//                nPortraitId refers to a row in the Portraits.2da
// Note: Not all portrait Ids are suitable for use with all object types.
//       Setting the portrait Id will also cause the portrait ResRef
//       to be set to the appropriate portrait ResRef for the Id specified.
void SetPortraitId(object oTarget, int nPortraitId)// Get the PortraitId of oTarget.
               
               

               
            

Legacy_The Great Thief

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Portrait troubles
« Reply #2 on: May 21, 2012, 10:22:32 pm »


               Thanks. Got it working.