How do I make typewriter function?

Get help using Construct 2

Post » Fri Oct 17, 2014 6:17 pm

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!
B
13
S
2
Posts: 20
Reputation: 756

Post » Fri Oct 17, 2014 7:48 pm

Last edited by Wisdoms on Fri Oct 17, 2014 8:59 pm, edited 1 time in total.
B
21
S
6
Posts: 244
Reputation: 2,655

Post » Fri Oct 17, 2014 8:05 pm

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.
You do not have the required permissions to view the files attached to this post.
B
13
S
2
Posts: 20
Reputation: 756

Post » Fri Oct 17, 2014 9:43 pm

Figured it out. I found an entry about Wait and Loops and changed it to work off the loopindex. Yay!
B
13
S
2
Posts: 20
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983 and 13 guests