0 Favourites

Dialogue attempt and WAIT issue

  • Hello, everybody. Take a look at this pic:

    <img src="http://i.imgur.com/0yhGm.png" border="0">

    (Click HERE if you can't see it)

    That's a very small test file I'm using to, well, TEST stuff. I'm currently researching options to create a dialogue-like text box.

    The idea is that a pre-set text is shown letter by letter in a Text object. When "Q" is pressed, a test text is stored in a text variable ("12345") and the program is told there is new text to show (Set boolVarDialoto to 1).

    Right next is an event that activates when there is new text to show; i.e. when "Q" is pressed. The first thing it does, it toggles the "bool" value so the same main event won't repeat itself, then immediately clears the dialogue box and sets a basic "i" variable to 0. This "i" variable will be our pointer.

    Now comes the problem part. Next, there's a "Repeat" event. It will repeat as many times as characters are in the stored text, and it appends said text, one character at a time, on the displayed Text Object. This WORKS PERFECTLY. The problem is the effect.

    See, when in-game, all text is shown at once. In order to see a "one character at a time" effect, a waiting must be present betweet each letter. As you can see, I've added a WAIT action to cause such effect. IT DOESN'T WORK.

    Depending on where I place that WAIT event, things change. If I place it at the beginning of the REPEAT set of actions, it effectively waits the indicated time, but then shows the text at once; no waiting between characters.

    If I place the WAIT action between the text append action and the add value to variable action, it shows a row of "11111" instead of "12345". And of course, no waiting between characters.

    Lastly, if I place the WAIT action last, there is no waiting at all, but the text shows "12345" as it should.

    Is there a bug with the WAIT action? Is it my Chrome Browser? I'd appreciate suggestions on the nature of this annoying issue as well as suggestions on how to improve my string-tied design.

    Thanks in advance!

    (Max)

  • this will not work as you want, because you're doing a mistake.

    if you want show the text "12345", letter by letter, just make it:

    add to objectText "1"

    wait 1 sec

    add to objectText "2"

    wait 1 sec

    add to objectText "3"

    BUT, in this way you'll finish it in one year or more, lol

    Also, visit these topics, it may help you:

    scirra.com/search

    scirra.com/forum/letter-by-letter-effect_topic53257.html

    scirra.com/forum/letter-by-letter-text_topic38579.html

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Thank you! :-)

    (Max)

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