"Write Text" and speed...

New releases and general discussions.

Post » Sun Mar 01, 2009 7:30 pm

You can determine what speed you want text to write itself before it is written, but would it be possible to add a "set write speed" so that it could be sped up while it is writing?

I was hoping that I could make it so that players could hold down a key to speed it up, and on 'key release' make it return to the normal pace. Right now it seems that if you want to change the speed the only option you have is to make the player choose at the beginning of the game whether they want text to go fast or slow.

-thanks!
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Sun Mar 01, 2009 8:10 pm

You may as well make your own text-writing, using the left() expression.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Mar 01, 2009 8:43 pm

[quote="Ashley":2lolx7ge]You may as well make your own text-writing, using the left() expression.[/quote:2lolx7ge]

Yeah, I made a pretty simple .cap a while ago using your advice. I was kind of hoping that I wouldn't have to have an event for every single letter, though.

Oh well. Better than nothing, I suppose. :?
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Sun Mar 01, 2009 9:08 pm

Why would you need an event for every single letter? Just increase the number parameter to left()...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Mar 01, 2009 9:14 pm

You don't have to make an event for each letter. Make a variable to control how many characters are shown, and make two events like this:

if key is not down
- add to variable ('charactersshown') 10*timedelta
- set text to left("write text to show here", variable('charactersshown'))

If key is down
- add to variable ('charactersshown') 20*timedelta
- set text to left("write text to show here", variable('charactersshown'))

That should increase the number of characters shown automatically, all in two events.

Edit: Ashley beat me to it, but I might as well post anyway.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sun Mar 01, 2009 9:18 pm

If we had a rating system, I'd rate you up for using timedelta ;)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Mar 01, 2009 9:31 pm

Thank you Arima, Ashley!

I was trying to do things the hard way because I thought that you had to do;

Left("This is a test.",1)

and then

Left("This is a test.",2)

and so forth.

I'm really terrible at coding but every little bit that I can learn from you guys is a BIG help. :wink:
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Wed Mar 04, 2009 3:17 am

Yea if you search enough through "Uploads" forum there are a few examples of this.
B
21
S
14
G
5
Posts: 106
Reputation: 3,416

Post » Wed Mar 04, 2009 11:27 am

I've added 'Set Write Speed' and 'Get Write Speed' for the next build to make this easier. Also a 'Write Finished' condition.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Mar 04, 2009 11:51 am

[quote="Rich":21pl0nmp]I've added 'Set Write Speed' and 'Get Write Speed' for the next build to make this easier. Also a 'Write Finished' condition.[/quote:21pl0nmp]

You are teh awesome.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests