Play one sound per letter

From the Asset Store
A complete set of Graphic, User Interface element to build 2D mobile game or PC game.
  • Can you post a screenshot of the English version of Construct? I don't understand the language on your screenshot so it would be easier for me to help, sorry

  • Can you post a screenshot of the English version of Construct? I don't understand the language on your screenshot so it would be easier for me to help, sorry

  • Try this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay I found why my system don't work, len expression detects how much characters the typewriting text will have from the beginning, where it detects current lenght with the addon I use, I think Sizcoz method will work better on C3 then

  • Okay I found why my system don't work, len expression detects how much characters the typewriting text will have from the beginning, where it detects current lenght with the addon I use, I think Sizcoz method will work better on C3 then

    Unfortunately, the sizcoz method is not suitable

    The fact is that here, with different text lengths and the same seconds, it works either faster or slower. that is, if the text is different and the seconds are the same, it should reproduce with the same speed of sound but for much longer i.e.

    12 characters - 12 times the sound

    5 characters - 5 times the sound

    and all this at the same speed no matter how many seconds it costs

    but in this example from sizcoz he types different tex always with the same duration but either the sound is faster or slower

  • I either have to use the method that the developer himself gave me, although it also sometimes works poorly in some cases or ask the developer to add the action "print text at the speed of one letter" and add the condition "if the letter is writing" or something similar to this condition

  • Ok I found a method :

    It uses 2 texts objects, "TextSample" which contains the full text, and "Dialog" which display the text character by character;

    "Dialog" uses two variables : TypeSpeed, which is the typewritting speed, and TypeLen, which is used to check the progression of the typewritter;

    In this example on Enter pressed, it repeats "the number of characters in TextSample" times this action:

    Wait Dialog.TimeSpeed x Loopindex seconds, set Dialog text to "Self.TypeLen" numbers of characters from TextSample starting from the left, then add 1 to TypeLen, so during the first loop it will return the first character, second loop, two characters, etc;

    The sub event check if the last character from the right in Dialog is a space or not, if not, it will play a sound;

    Btw you can replace TextSample by a global variable to access it from anywhere in your project, and also give to Dialog a boolean to confirm it is currently typing to avoid any trigger problem

  • Ok I found a method :

    It uses 2 texts objects, "TextSample" which contains the full text, and "Dialog" which display the text character by character;

    "Dialog" uses two variables : TypeSpeed, which is the typewritting speed, and TypeLen, which is used to check the progression of the typewritter;

    In this example on Enter pressed, it repeats "the number of characters in TextSample" times this action:

    Wait Dialog.TimeSpeed x Loopindex seconds, set Dialog text to "Self.TypeLen" numbers of characters from TextSample starting from the left, then add 1 to TypeLen, so during the first loop it will return the first character, second loop, two characters, etc;

    The sub event check if the last character from the right in Dialog is a space or not, if not, it will play a sound;

    Btw you can replace TextSample by a global variable to access it from anywhere in your project, and also give to Dialog a boolean to confirm it is currently typing to avoid any trigger problem

    could you post the file of this example here?

  • I figured a better way to do it that give you more control on the typewriter effect, don't have my pc at the moment tho, I'll edit this post with the file link later today

  • drive.google.com/file/d/1DazY6HhNMJOGOgUGk5IGkUXWDaHinLI4/view

    I detailed each conditions and actions, I also made two groups, one with the previous method which I don't recommand, and a second with the better method which allows you to fully control your text, have fun ~

    (be sure to not have both groups enabled when testing otherwise it will break)

  • The fact is that here, with different text lengths and the same seconds, it works either faster or slower. that is, if the text is different and the seconds are the same, it should reproduce with the same speed of sound but for much longer i.e.

    12 characters - 12 times the sound

    5 characters - 5 times the sound

    and all this at the same speed no matter how many seconds it costs

    but in this example from sizcoz he types different tex always with the same duration but either the sound is faster or slower

    If you're typewriting texts of different lengths with the same duration they ARE being written faster or slower. If you want to have a regular speed you should set the duration based on the length of the text...

    Cheers!

  • drive.google.com/file/d/1DazY6HhNMJOGOgUGk5IGkUXWDaHinLI4/view

    I detailed each conditions and actions, I also made two groups, one with the previous method which I don't recommand, and a second with the better method which allows you to fully control your text, have fun ~

    (be sure to not have both groups enabled when testing otherwise it will break)

    https://drive.google.com/open?id=1IPXihBzt4hwjFdRc-fUflZ0uHZOxh9V9

    there is a little problem

    1) after the first time he does not want to work a second or third or fourth time

    2) how would it fit in at least two or one action in order to only write the text and not to copy three actions each time?

  • Depends of what you call "a first time", you have to be more specific

  • Depends of what you call "a first time", you have to be more specific

    Well, for the first time it worked, but the next text he doesn’t want to print after finishing printing the first text and pressing the "F" key

  • eg

    "Oh, hi."

    Then he should continue the dialogue after pressing "F" that is, new text

    "Why are you so excited? What happened?"

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