Changing character portrait
Changing character portrait
Having trouble changing character portrait during conversation. I am using the SetPortrait(actorName, textureName) sequence function. I first tried directly putting the portrait sprite name, and the console returned a not found message. I did realize that the parameter requires a path to a texture inside the resources folder, but I don't know the correct syntax for stating a path for Lua, I tried using "/" and still getting the not found message. Also stating the path every time seems error prone, can anyone explain how to define multiple portrait images in the database?
Re: Changing character portrait
Hi,
The easiest way is to assign the portraits to the actor in the Dialogue Editor's Actors section. Each portrait will a have a number (1, 2, 3, etc.). Then use [pic=#] in a dialogue entry node's Dialogue Text to use the specified portrait for only that node. To change it ongoing, use the SetPortrait() sequencer command (it's not a Lua function) with pic=# as the second parameter. For example, if you want to change the actor named Fred to portrait #2:
The easiest way is to assign the portraits to the actor in the Dialogue Editor's Actors section. Each portrait will a have a number (1, 2, 3, etc.). Then use [pic=#] in a dialogue entry node's Dialogue Text to use the specified portrait for only that node. To change it ongoing, use the SetPortrait() sequencer command (it's not a Lua function) with pic=# as the second parameter. For example, if you want to change the actor named Fred to portrait #2:
Code: Select all
{{default}}; // Also play Dialogue Manager's Default Sequence.
SetPortrait(Fred, pic=2)
Re: Changing character portrait
Where exactly is the Dialogue Editor's Actor section? Is it the actors section in the database, or the actors tab when editing a conversation, in either cases I don't see an option to upload/drop sprites.
Re: Changing character portrait
Neverminded, I've found it