changing font for action text

  • #1, by JoemcrTuesday, 21. April 2015, 10:03 5 years ago
    Quick question: is there an easy way to change the font of the action text during gameplay?

    thanks

    Newbie

    96 Posts


  • #2, by afrlmeTuesday, 21. April 2015, 14:52 5 years ago
    What do you mean by change the font? Are you referring to the font itself, or the text?

    Imperator

    6809 Posts

  • #3, by JoemcrTuesday, 21. April 2015, 15:01 5 years ago
    the font. In one scene my on-screen interface changes, i want to change the font of the action text at the same time so it matches the style of the new interface...

    Newbie

    96 Posts

  • #4, by afrlmeTuesday, 21. April 2015, 15:46 5 years ago
    According to the data structure it's not scriptable, but you can try it anyway.
    game:setValue(VGameActionTextFont, getObject("Fonts[font_name]"))
    1
    2

    ...to be honest, I have no clue if the code is correct or not as I've not tested it.

    * edit: ah it might work for updating text for current session. It doesn't save the data to the save files is all.

    Imperator

    6809 Posts

  • #5, by JoemcrTuesday, 21. April 2015, 16:09 5 years ago
    Thanks! seems to work... If i have it executing 'on beginning of scene' it should work when loading from a save as well, no?

    Newbie

    96 Posts

  • #6, by afrlmeTuesday, 21. April 2015, 16:29 5 years ago
    I think the best thing to do would be to create a small function that let's you change to whatever text you like. Then you can call the function on mouse over / out of objects, characters etc. That way, you could have full control as needed. Would be a bit of work on your part though.

    definition script...
    function setATF(n)
    game:setValue(VGameActionTextFont, getObject("Fonts[" .. n .. "]"))
    end
    1
    2
    3
    4

    to use: create execute a script action, containing...
    setATF("font_name")
    1
    2

    ... simple enough, no?

    Or you could do it at beginning of the scene as you said - which will probably be more ideal if everything in that scene is to use the same action text font. Just make sure you set it back to the default text in an at end of scene action, if required.

    Imperator

    6809 Posts

  • #7, by JoemcrTuesday, 21. April 2015, 16:46 5 years ago
    Nothing is simple enough for me! I have no clue what I'm doing 90% of the time... the font will be the same for the whole scene though, so hopefully calling it at the start/end of the scene should do the job.

    Thanks

    Newbie

    96 Posts

  • #8, by afrlmeTuesday, 21. April 2015, 17:36 5 years ago
    Yep. No problem. wink

    Imperator

    6809 Posts

Write post