Can I use a different font for text with and without sound file?

  • #1, by marco-roncoMonday, 07. August 2017, 15:29 7 years ago
    Hello, I'd like to use a different font for my main character.

    If there is an audio attached to the character line, I would like to use a specific font (eg. "Font_White").

    If there is no audio attached to "display text", I would like the character to display another font (eg. "Font_Grey").

    That's because I have the voice over for every line of dialogue, 
    but I don't have the voice over when the character "look at" something, or is "thinking" something.

    Sorry for my bad english, I hope I have explained what I'm trying to achieve. smile

    Newbie

    22 Posts


  • #2, by afrlmeMonday, 07. August 2017, 16:13 7 years ago
    You can try forcing it to a different font with...
    game.CurrentCharacter.CharacterFont = Fonts["name of font"]

    inside of an execute a script action part, but according to the data structure page it's not a scriptable field, but it doesn't hurt to try. Might just be that it doesn't save the active font into the save file data.

    Alternatively you could use a display narration text action part instead for the observation parts, that's what it's there for afterall, but I only really recommend using that if you are already forcing the regular display texts into a bounding box rather than the default system where the texts get automatically positioned above the speaking character.

    Imperator

    7278 Posts

  • #3, by marco-roncoMonday, 07. August 2017, 16:15 7 years ago
    Thanks AFRLme, I would love to try, but I don't know how to script something like this.

    Newbie

    22 Posts

  • #4, by afrlmeMonday, 07. August 2017, 16:18 7 years ago
    Thanks AFRLme, I would love to try, but I don't know how to script something like this.

    Don't know how? I just told you. Before displaying one of those non-audio texts create an execute a script action part & add what I said, but change name of font to the actual name of the font you want to display from the fonts you have created in the font section of the editor (names are case sensitive). After displaying the text(s) create another execute a script action part & add the same thing again, but set the text back to the default one you were using.

    Imperator

    7278 Posts

  • #5, by marco-roncoMonday, 07. August 2017, 16:24 7 years ago
    Sorry, my bad smile

    What I meant was that I know how to change the font, but I have to "attach" the script to 9.200 dialogue lines, manually ^_^''

    Is there a way to call the action everytime the Main Character displays a text?

    Newbie

    22 Posts

  • #6, by marco-roncoMonday, 07. August 2017, 16:27 7 years ago
    Oh, I have found a solution while writing °_°

    I can simply call an action when a dialogue with another NPC starts (Action "Talk" on NPC). The defaul text is the "Font_Thinking", and I can change the text at the beginning and end of dialogue. Sounds good? grin

    Newbie

    22 Posts

  • #7, by afrlmeMonday, 07. August 2017, 16:31 7 years ago
    Not really sure what you are saying but sure, if it's works it works.

    There was a global way for what I was saying, but not sure if it would have updated the font of the currently displayed text. VS has some event listener functions that can listen out for when text starts or ends, but I'm not sure if you can swap out the font of a text that is already being displayed or whether it would take effect for the next font that is displayed instead.

    Imperator

    7278 Posts