hello
I want to get the NPC portrait sprite of each quest in the dialog system quest into the script.
What should I do?
Quest Npc Portrait in script
Quest Npc Portrait in script
- Attachments
-
- question0.jpg (13.75 KiB) Viewed 119 times
Re: Quest Npc Portrait in script
Hello,
Since you have changed the Pictures field's type to Actor, it will contain the actor's ID. To get the portrait:
Since you have changed the Pictures field's type to Actor, it will contain the actor's ID. To get the portrait:
Code: Select all
int actorID = DialogueLua.GetActorField("Slay the Slime", "Pictures").asInt;
Actor actor = DialogueManager.masterDatabase.GetActor(actorID);
Sprite portrait = actor.GetPortraitSprite();