iiYO Community

Full Version: Variable to change text speed on load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Is there a way, I can use a variable to control the speed of the text before the story starts?  Example, right now I have:
        <textbox name="tb_main" x="0px" y="8%" width="99%" height="14%" namebox="yes" speed="20">

Can the value of the variable speed be changeable?  I've tried several attempts but no success so far. Ideally, before the story starts the user will be presented with two button options for text speed. Normal or Fast, the button pressed will change the variable used to control the text speed.

Thank you for your time,

Hi brg,

this isn't possible right now, you can only do that with JavaScript. When you have a reference to a Game instance (usually created in index.html) you can do the following once the game has been loaded:

game.interpreter.assets[myTextboxName].speed = 50;

Does this do what you want?
Ah thank you, will investigate this Big Grin.