Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scrolling Text Engine
- They-See-Me-Rollin
- Scratcher
6 posts
Scrolling Text Engine
I'm making a scrolling text engine to use with my projects, and it will not work. I'm new to forums, so I won't do the fancy blocks thing, but I will text it out in the most efficient way possible
() : value
<> : boolean
|| : variable (I would have used brackets but scratch does not allow them)
{} loop
*Start of script 1*
define say (Text) Scrolling with (Number) Seconds between characters
set |speaking progress| to 1
repeat (length of (text)) {
say (letter |speaking progress| of (text))
wait (numbers) seconds
change |speaking progress| by 1
}
wait 3 seconds
*end of script 1*
*start of script 2*
when green flag clicked
say (hello world!) scrolling with (0.1) Seconds between characters
*end of script 2*
Do you see the glaring issue? That's right, it only says the individual letters, not adding new letters to preexisting ones. I have tested quite a few ways to fix it, and they all did not work. I realize it will make use of the join () () block, but I can't figure out how to use it.
I don't use other people's work when possible, so please do not suggest that.
() : value
<> : boolean
|| : variable (I would have used brackets but scratch does not allow them)
{} loop
*Start of script 1*
define say (Text) Scrolling with (Number) Seconds between characters
set |speaking progress| to 1
repeat (length of (text)) {
say (letter |speaking progress| of (text))
wait (numbers) seconds
change |speaking progress| by 1
}
wait 3 seconds
*end of script 1*
*start of script 2*
when green flag clicked
say (hello world!) scrolling with (0.1) Seconds between characters
*end of script 2*
Do you see the glaring issue? That's right, it only says the individual letters, not adding new letters to preexisting ones. I have tested quite a few ways to fix it, and they all did not work. I realize it will make use of the join () () block, but I can't figure out how to use it.
I don't use other people's work when possible, so please do not suggest that.
Last edited by They-See-Me-Rollin (Dec. 16, 2021 22:24:59)
- Jareddddddd
- Scratcher
1000+ posts
Scrolling Text Engine
save the current thing said with a new variable.
variables - speaking progress, current words
set (current words) to (join (current words)
say (current words)
variables - speaking progress, current words
set (current words) to (join (current words)
say (current words)
Last edited by Jareddddddd (Dec. 16, 2021 22:57:08)
- gor-dee
- Scratcher
1000+ posts
Scrolling Text Engine
set [i v] to (1)
set [say v] to []
repeat (length of (text))
set [say v] to (join (say) (letter (i) of (text)))
change [i v] by (1)
say (say)
end
- They-See-Me-Rollin
- Scratcher
6 posts
Scrolling Text Engine
but… there is no current word variable save the current thing said with a new variable.
variables - speaking progress, current words
set (current words) to (join (current words)
say (current words)
- They-See-Me-Rollin
- Scratcher
6 posts
Scrolling Text Engine
in the looks section, at least. save the current thing said with a new variable.
variables - speaking progress, current words
set (current words) to (join (current words)
say (current words)
- They-See-Me-Rollin
- Scratcher
6 posts
Scrolling Text Engine
thanks, I hope I can learn how to do the block thing sometime.set [i v] to (1)
set [say v] to []
repeat (length of (text))
set [say v] to (join (say) (letter (i) of (text)))
change [i v] by (1)
say (say)
end
- Burnt-Butter-Toast
- Scratcher
78 posts
Scrolling Text Engine
Make a big block of text, make the top line up, then forever move 1 step, if it's facing 90 degrees the it should slowly go up.
when green flag clicked
Forget Toast
move (10) steps
Put Butter
- Discussion Forums
- » Help with Scripts
- » Scrolling Text Engine