Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help Me!
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
I followed a YouTube tutorial made by @griffpatch. But, something's not right. Will you please help me find the bug and fix it? https://scratch.mit.edu/projects/617609711
Last edited by EDawg2011 (Dec. 28, 2021 20:15:28)
- Gilstylin
-
Scratcher
100+ posts
Help Me!
You have the script designed to delete when it touches the level maybe change to edge of screen? It will help to know what your objective is.
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
You have the script designed to delete when it touches the level maybe change to edge of screen? It will help to know what your objective is.Read the full description of the project.
- Gilstylin
-
Scratcher
100+ posts
Help Me!
You have the script designed to delete when it touches the level maybe change to edge of screen? It will help to know what your objective is.Read the full description of the project.
The project says
1. When a ball touches the level, it disappears for some reason. - That is not an error the code deletes the clone when it touches.
2. if the ball doesn't disappear when it touches the wall, the project will lag horribly. - change all
<touching [ Level] ?>
to
<touching [ edge] ?>
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
I and @griffpatch, I'm pretty sure, put those touching Level blocks to check for collisions.You have the script designed to delete when it touches the level maybe change to edge of screen? It will help to know what your objective is.Read the full description of the project.
The project says
1. When a ball touches the level, it disappears for some reason. - That is not an error the code deletes the clone when it touches.
2. if the ball doesn't disappear when it touches the wall, the project will lag horribly. - change all<touching [ Level] ?>
to<touching [ edge] ?>
- cIoudyness
-
Scratcher
500+ posts
Help Me!
i might suggest just rebuilding everything following the tutorial - i'm very sorry but i'm uncertain if many people have the time to sift through a project with a tutorial
by the way the script that seems to be actually deleting the clones is the dir > 720 script that's there to prevent infinite loops that lag out the run without screen refresh scripts
by the way the script that seems to be actually deleting the clones is the dir > 720 script that's there to prevent infinite loops that lag out the run without screen refresh scripts
Last edited by cIoudyness (Dec. 29, 2021 00:03:57)
- maxpasenyants
-
Scratcher
100+ posts
Help Me!
The script says that if the “Ball” Touches Level,It disapears, thats not correct.
Read the comment twice up higher how to fix it!
Read the comment twice up higher how to fix it!
Last edited by maxpasenyants (Dec. 29, 2021 00:48:50)
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
I and @griffpatch, I'm pretty sure, put those touching Level blocks to check for collisions.You have the script designed to delete when it touches the level maybe change to edge of screen? It will help to know what your objective is.Read the full description of the project.
The project says
1. When a ball touches the level, it disappears for some reason. - That is not an error the code deletes the clone when it touches.
2. if the ball doesn't disappear when it touches the wall, the project will lag horribly. - change all<touching [ Level] ?>
to<touching [ edge] ?>
i might suggest just rebuilding everything following the tutorial - i'm very sorry but i'm uncertain if many people have the time to sift through a project with a tutorialGood idea. But, the fact that I have to sit through the tutorial again…
by the way the script that seems to be actually deleting the clones is the dir > 720 script that's there to prevent infinite loops that lag out the run without screen refresh scripts
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
i might suggest just rebuilding everything following the tutorial - i'm very sorry but i'm uncertain if many people have the time to sift through a project with a tutorial(Read The Post Above First) Also, without that script that deletes the clones, the project will lag horribly when the ball collides with a wall.
by the way the script that seems to be actually deleting the clones is the dir > 720 script that's there to prevent infinite loops that lag out the run without screen refresh scripts
- ventoaurum
-
Scratcher
100+ posts
Help Me!
the normal costume is not in the right enough, move it to the right until it work
yeah that's it, you're expecting some crazy math thing, but it's just basic costume stuff, no need to edit anything except the normal costume
yeah that's it, you're expecting some crazy math thing, but it's just basic costume stuff, no need to edit anything except the normal costume
Last edited by ventoaurum (Dec. 29, 2021 04:01:27)
- ventoaurum
-
Scratcher
100+ posts
Help Me!
also just to be safe remove the
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
if <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
also just to be safe remove theIt's there so that the project does not lag when a ball touches a wall.if <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
See the tutorial I followed to make that project. https://www.youtube.com/watch?v=Ge1DbXkyMKo Please watch the full video.also just to be safe remove theIt's there so that the project does not lag when a ball touches a wall.if <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
Or, watch the video from the part where his project lags.See the tutorial I followed to make that project. https://www.youtube.com/watch?v=Ge1DbXkyMKo Please watch the full video.also just to be safe remove theIt's there so that the project does not lag when a ball touches a wall.if <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
- ventoaurum
-
Scratcher
100+ posts
Help Me!
so, did my method work? the “move the normal costume a bit right” method i mean
- EDawg2011
-
Scratcher
1000+ posts
Help Me!
so, did my method work? the “move the normal costume a bit right” method i meanI don't think moving it just 1-pixel works, but, I think I tried a lot larger amount to the right and it worked. https://scratch.mit.edu/projects/617609711/
- ventoaurum
-
Scratcher
100+ posts
Help Me!
you're welcomeso, did my method work? the “move the normal costume a bit right” method i meanI don't think moving it just 1-pixel works, but, I think I tried a lot larger amount to the right and it worked. https://scratch.mit.edu/projects/617609711/
- cIoudyness
-
Scratcher
500+ posts
Help Me!
also just to be safe remove theby the way you definitely shouldn't delete this blockif <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
it's there to prevent an infinite loop within a run without screen refresh block which would be terrible
- ventoaurum
-
Scratcher
100+ posts
Help Me!
coolalso just to be safe remove theby the way you definitely shouldn't delete this blockif <(dir) > [720]> thenfrom the rotate custom block definition
delete this clone
end
if you dont, there is this specific angle of plane(ground/wall) and aim that can delete the ball
it's there to prevent an infinite loop within a run without screen refresh block which would be terrible
- Discussion Forums
- » Help with Scripts
-
» Help Me!