Discuss Scratch

Chickennuggets778
New Scratcher
16 posts

Need help with a text engine

I wanted to make a text engine for my game so I searched it up on youtube and found one. The problem is that when I try to make it type something the letters scatter all around the place even though I put in all the code the person told me to and theirs worked fine. Here is the link to the project https://scratch.mit.edu/projects/548814998/. Any help would be greatly appreciated
The_Imaginarium
Scratcher
1000+ posts

Need help with a text engine

The reason it isn't working is that you didn't center any of the costumes. To center the costumes, go to the costume editor and drag the asset to the grey cross in the center.
Chickennuggets778
New Scratcher
16 posts

Need help with a text engine

I'm confused about what you mean by drag it to the grey cross
Kupicx_7
Scratcher
100+ posts

Need help with a text engine

Chickennuggets778 wrote:

I'm confused about what you mean by drag it to the grey cross
Go into every costume, and drag each letter into the middle of the canvas (pressing the “=” button in the bottom right will center the canvas, making it easier to find the middle). You should see it “snap” into place if you did it right, directly above the grey cross.




Edit: Here is what it looks like when you center all of the letters:



Also, there is a clone limit in Scratch, so you can only have 300 letters before it stops working. I suggest adding the following code to your text engine:
define Clone setup
...
...// All of the code that was already there
...
stamp // This block is from the Pen extension. You can get it by clicking the blue button in the editor on the bottom left
delete this clone

when flag clicked
erase all :: pen

This will stamp the letters and delete the clones, meaning you can have as many letters as you want

Last edited by Kupicx_7 (July 8, 2021 00:47:00)

The_Imaginarium
Scratcher
1000+ posts

Need help with a text engine


EDIT: ninja'd

Last edited by The_Imaginarium (July 8, 2021 00:29:02)

Chickennuggets778
New Scratcher
16 posts

Need help with a text engine

I have put all of them in the grey cross but they still scramble
PortableScarecrow
Scratcher
1 post

Need help with a text engine

how do they scramble lol
Kupicx_7
Scratcher
100+ posts

Need help with a text engine

Chickennuggets778 wrote:

I have put all of them in the grey cross but they still scramble
Try changing the value in the “If” statement:
define Clone setup
repeat (#)
change x by (15)
if <(x position) \> [some bigger number]> then// This is the "If" statement
set x to (x)
change y by (-18)
end
end

Powered by DjangoBB