How do I make a typewriter effect?

0 favourites
  • 2 posts
From the Asset Store
Keyboard, Mouse & Typewriter SFX / 27 Unique Sound Clips
  • Hello friends. I'm coding a system for a platform game that includes a typewriter effect and I'm having problems doing it.

    Basically, I've done a function which asks for the text and then sends this text with the effect to a new string.

    On Function "typewriter"it sets a variable called Char_count = 0 to reset any previous text.

    Then, as a sub-event, a while loop jumps in and keeps repeating while char_count < len(function.Param(0))+1

    In the actions:

    • it sets the text of the string object to "left(Function.Param(0), String.Char_count)"
    • I also put an wait 1.0 second there just for test purposes but it seens the loop ignores it.

    Finally it adds +1 to String.Char_count

    This makes the loop start and finish nicelly, with just one problem: It is so fast that the string just pops.

    How can I correct this behavior?

    Link to the capx (r216)

    https://dl.dropboxusercontent.com/u/11321796/scirra%20forum/typewriter.capx

    BTW, this will be my first game, what store/site do you recommend? I looked around and Newgrounds and itchi.io are the best I've seen so far. Newgrounds for the community, and Ichi.io for the tightly integrated analytics system AND the community.

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)