Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » List and clone based text engine creating more clones than it should when used more than once
- dyingneko
-
Scratcher
48 posts
List and clone based text engine creating more clones than it should when used more than once
My text engine (based on lists and clones) is glitching and creating more clones than it needs (2x more) when I use it more than once. I have no idea why this is happening. Please help me
Project
(This has been solved by @Thingied)
Project
(This has been solved by @Thingied)
Last edited by dyingneko (Oct. 10, 2021 10:46:09)
- Thingied
-
Scratcher
1000+ posts
List and clone based text engine creating more clones than it should when used more than once
Keep in mind that the clones receive the broadcast too. Easiest fix is to restrict the broadcast to only being ran by the main sprite.
Steps:
1. Make a new variable for this sprite only.

2. Set it to 0 for the main sprite and 1 for the clones.

3. Add an if statement around everything under the receive TextRender hat block. If that sprite has the clone? variable set to 0 run the code if not don't.

Steps:
1. Make a new variable for this sprite only.

2. Set it to 0 for the main sprite and 1 for the clones.

3. Add an if statement around everything under the receive TextRender hat block. If that sprite has the clone? variable set to 0 run the code if not don't.

- dyingneko
-
Scratcher
48 posts
List and clone based text engine creating more clones than it should when used more than once
Keep in mind that the clones receive the broadcast too. Easiest fix is to restrict the broadcast to only being ran by the main sprite.
Steps:
1. Make a new variable for this sprite only.
2. Set it to 0 for the main sprite and 1 for the clones.
3. Add an if statement around everything under the receive TextRender hat block. If that sprite has the clone? variable set to 0 run the code if not don't.
Thank you for the solution! I didn’t know clones could get broadcasts lol

- Discussion Forums
- » Help with Scripts
-
» List and clone based text engine creating more clones than it should when used more than once

