How do I make typewriter function?

0 favourites
  • 4 posts
  • Hello! I've successfully implemented a typewriter text effect into my project, after finding out how on these forums. What I wanted to do now though was see if I could make a function out of it, so that I could use it to feed any text into.

    So far this is working for me

    +Function on "typeWriter"

    (sub) +For "typeWriter" from 0 to (len(Function.Param(0))

    -left(Function.Param(0), counter)

    -Add 1 to counter

    So I pass the text string to it, and it does write it out. The problem I'm having is that I can't delay the characters to make the actual 'typewriter' effect. I've tried putting a Wait in the function, but either it gets ignored or returns 0 to the textbox. I'm not sure on how to get it working from there. Am I just doing it wrong? Thanks!

  • Those are the threads I referred to...that's how I initially figured it out through a single event.

    What I'm talking about is doing it through a Function. It works until a Wait or Every x Seconds statement is included, and then it breaks. So basically, I can get the message through it, but I can't get it to wait between each character at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Figured it out. I found an entry about Wait and Loops and changed it to work off the loopindex. Yay!

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