Can I control the Align in Dialogue Text with a script?

Discuss authoring naninovel scenario scripts.
Post Reply
booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Can I control the Align in Dialogue Text with a script?

Post by booksuny »

I want to change the dialouge alignment as I want during the conversation.
For example, if a character appears from the right, it aligns to the right, and if it appears from the bottom, it aligns to the bottom.

I looked up the manual, but I don't think this function is available, so I'm asking.

I tried to write a script in the form of approaching the existing Unity text, but it doesn't seem to work, so I want to know how.

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: Can I control the Align in Dialogue Text with a script?

Post by idaot »

You can use text tags or the text component's settings to change alignment (https://naninovel.com/guide/text-printe ... ext-styles) but to automate the process you'll like need to override/create your own printer. My suggestion is to listen to the On Author Changed changed event found in the printer and retrieving the actor's current position via ICharacterManager.

booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Re: Can I control the Align in Dialogue Text with a script?

Post by booksuny »

idaot wrote: 11 Oct 2022 16:00

You can use text tags or the text component's settings to change alignment (https://naninovel.com/guide/text-printe ... ext-styles) but to automate the process you'll like need to override/create your own printer. My suggestion is to listen to the On Author Changed changed event found in the printer and retrieving the actor's current position via ICharacterManager.

Thank you for your reply.

I'm using Google Translator because I can't read English, so I'm asking you to check because there's a little bit of confusion in the answer.

Is it correct to search for the function "On Author Changed" and learn it?

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: Can I control the Align in Dialogue Text with a script?

Post by idaot »

Yes.

joung
Posts: 1
Joined: 07 Nov 2022 11:20

Re: Can I control the Align in Dialogue Text with a script?

Post by joung »

Thanks idaot for the helpful link, I was looking for it too.

Post Reply