Hi Tony,
I'm attempting to switch the default portrait of a character during a conversation via script, then using the 'SetPortrait(CHARACTERNAME, default)' sequence to refresh to the newly updated portrait. It works for a single line of dialogue, but then the portrait is missing in the following line. The documentation reads that the 'SetPortrait' sequence would keep the change until changed again, so I'm confused as to why this wouldn't remain for the whole conversation.
Switching Character portraits in script
Re: Switching Character portraits in script
Hi,
Treat the dialogue database as read-only at runtime.
When a conversation starts, it caches the actors' info, including their display names and portraits. Try changing the cached value. Example:
Treat the dialogue database as read-only at runtime.
When a conversation starts, it caches the actors' info, including their display names and portraits. Try changing the cached value. Example:
Code: Select all
DialogueManager.conversationModel.SetActorPortraitSprite("Fruit Snek", snakeSegments[9].segment.sprite);
Re: Switching Character portraits in script
Thanks Tony,
The portrait being removed on the following line of dialogue had something to do with using the sequence command. When I switched to using the code you suggested it switched correctly. By using both the cache change in conversation + the database change, the portrait is correct for subsequent conversations too.
Cheers!
Rob
The portrait being removed on the following line of dialogue had something to do with using the sequence command. When I switched to using the code you suggested it switched correctly. By using both the cache change in conversation + the database change, the portrait is correct for subsequent conversations too.
Cheers!
Rob
Re: Switching Character portraits in script
Hi Rob,
Great! Glad it's working now.
Great! Glad it's working now.