License from €75 Log in
DE EN FR ES IT CZ

changing font for action text

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Quick question: is there an easy way to change the font of the action text during gameplay?

    thanks
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    What do you mean by change the font? Are you referring to the font itself, or the text?
  4. · 12 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...
  5. · 12 years ago
    According to the data structure it's not scriptable, but you can try it anyway.
    game:setValue(VGameActionTextFont, getObject("Fonts[font_name]"))
    

    ...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.
  6. · 12 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?
  7. · 12 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
    

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

    ... 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.
  8. · 12 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
  9. · 12 years ago
    Yep. No problem. wink

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?