how do you use a loop to display text one letter at a time on the screen
emoji
Member, BASIC Posts: 66
hello, so far
I have a lengthOfLength = textLength(game.textValue). and it good but now I want to use a loop
So I can print the text one letter at a time out to the screen. the problem is the while loop is not working just from the basic example, the game.lengthOfText is greater then 0 . can someone explain what is wrong with the code?
Comments
I wouldn't use a loop for that. They're fast, too fast for a good "adding letter" effect even if you set it to 1 loop/frame.
I made a version of this a long time ago. I just had a quick look and it seems fine, but there's probably a better way to do this.
The art and sounds are not free to use, I have no idea where I got them or what the usage rights are.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
i look over your but it's
too much info for a novice like me to digest. the problem seem to be the textSubStr(text, startIndex, endIndex) i ran this and it say invalid expression
Here is a little version I worked up while @Armelline was beating me to the punch of uploading. This doesn't have any of the fancy line returns and scrolling text, it will just type out each letter one by one. Adjust the Timer to make it print faster or slower.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
oh sweet thank you!
No worries, it was a more indepth example made for someone years ago, rather than exactly for your (rather vague) use case. Jamie's example is much better and to the point.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support