Discuss Scratch

Yaavit
Scratcher
37 posts

How do I make a text generator?

I am trying to make a text generator that types out the players username with a list, but I cannot figure out how to do it. The clones stack on top of each other so it doesn't let me see the actual letters, and I can't figure out code to make it switch to the next costume. Here is a screenshot of the code I have:
Alphysse
Scratcher
1000+ posts

How do I make a text generator?

You're asking the clones to move 50 right from the starting position, rather than the last clone position. Thus, all the clones will get stacked into a single position. One solution would be to use a variable that changes with each iteration of the list, which might look something like the following:

set [i v] to (0)
repeat (length of [username v])
change [i v] by (1)
create clone of [myself v]
end

when I start as a clone
switch costume to (item (i) of [username v])
change x by ((i) * (50))

(Make sure to make [i] a local variable.)

Last edited by Alphysse (Oct. 3, 2021 22:31:55)

Powered by DjangoBB