How do I synchronize the typewriter with the sound?

0 favourites
  • 10 posts
From the Asset Store
Keyboard, Mouse & Typewriter SFX / 27 Unique Sound Clips
  • Hi there. So since the last time we met I bought an annual subscription of Construct 3, so I guess you're going to support me (and bear with me) along the way, haha.

    So I'm making a short dialogue function, and I got how activate the typewrite effect. However I wonder if it's possible to synchronize the each letter appearing with a sound effect. I know I can use the "wait for X seconds" in the System, but if the text may not be synchronized if it's too long or too short.

    Thank you so much for reading.

  • Im currently using one method in a project right now, i dont know if is the correct method to do that but here it is.

    SpriteFont is running typewritter text

    Every "duration / 1.6" / character ammount -> play sound

  • Im currently using one method in a project right now, i dont know if is the correct method to do that but here it is.

    SpriteFont is running typewritter text

    Every "duration / 1.6" / character ammount -> play sound

    Seems to be the answer, but... how di dyou get the character ammount?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you have store in a variable the text you want to typewrite you can use len(variable).

  • If you have store in a variable the text you want to typewrite you can use len(variable).

    Oh my judge you're a genius. I don't even know what I did, but I did it and it's working great!

    My only two concerns is that it works only if the variables duration and character amount are global. Other that that, it's great.

    Now I have to find out how to make multiple scripts without using only the events. What did you use for your project?

  • Hello , sorry for the late answer.

    What do you mean by multiple scripts with out using only the events?

    What are you trying to do and you can not with out the events?

  • Hello , sorry for the late answer.

    What do you mean by multiple scripts with out using only the events?

    What are you trying to do and you can not with out the events?

    Sorry I didn't say it correctly.

    I'm trying to figure out how to do the rest of the dialogue system - JSON (if necessary) and all, so I'm not sure if there is a "best way" or a "simple way" to do this on Construct.

  • Well, everytime I make a game I add a string variable and I add all the words I need there and I retrieve it using tokenat.

  • You can check Lauras tutorial.

    https://www.construct.net/en/tutorials/branching-dialogue-using-json-2395

    Alright, thank you so much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)