Hi Tony,
Is there a way to change the player portrait sprite dynamically? For example, when the player is a human I want a human portrait to display in the dialogue boxes, but when they are an Orc I want an orc portrait to be displayed, Any help is appreciated.
Thanks,
Grayson
Change Player portrait picture
Re: Change Player portrait picture
Hi,
One way is to assign the different images to the Actor's Portrait Sprites list in the Dialogue Editor. Note the number of each image (e.g., [1] for human, [2] for orc, [3] for elf, etc.). Then use the C# method DialogueManager.SetPortrait(). For example, to set the Player actor's portrait to [2]:
Alternatively, you can put the portrait images in a folder named "Resources" and then specify an image name. Example:
One way is to assign the different images to the Actor's Portrait Sprites list in the Dialogue Editor. Note the number of each image (e.g., [1] for human, [2] for orc, [3] for elf, etc.). Then use the C# method DialogueManager.SetPortrait(). For example, to set the Player actor's portrait to [2]:
Code: Select all
DialogueManager.SetPortrait("Player", "pic=2");
Code: Select all
DialogueManager.SetPortrait("Player", "orc"); // Assumes image named "orc" is in a Resources folder.