Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make the road in my scratch highway "game" infinite? (repost)
- Jester9640
-
53 posts
How do i make the road in my scratch highway "game" infinite? (repost)
so i don't really know how to make the road infinite. i could just keep copy and pasting the road costume, but that would take a long time and it wouldnt actually be infinite.
road code:
road code:
when green flag clicked
hide
create clone of [myself
when I start as a clone
show
go to x: (0) y: (273)
forever
change y by ((Speed) - ((Speed) * (2)))
end
Last edited by Jester9640 (Dec. 3, 2022 03:37:14)
- TricolorGlobe62
-
34 posts
How do i make the road in my scratch highway "game" infinite? (repost)
Try making it so that every time the road reaches a certain point, it teleports back to it's starting position, giving the illusion of an infinite road. Hope this helps!
- TheWeeklyReader
-
100+ posts
How do i make the road in my scratch highway "game" infinite? (repost)
I have tried this before, try to cut it in half, and make each half line up exactly, so it is very hard to tell when it teleports.
- Jester9640
-
53 posts
How do i make the road in my scratch highway "game" infinite? (repost)
I have tried this before, try to cut it in half, and make each half line up exactly, so it is very hard to tell when it teleports.
i tried but it work maybe i mis understood what u said
when I start as a clone
show
go to x: (0) y: (273)
change y by (182)
change y by ((Speed) - ((speed) * (2)))
end
Last edited by Jester9640 (Dec. 3, 2022 04:55:25)
- TheWeeklyReader
-
100+ posts
How do i make the road in my scratch highway "game" infinite? (repost)
So basically, make the sprite about 2x the height of the scratch screen, and when it is almost at the top, make it teleport so the bottom of the sprite is just below the bottom of the screen. I will try to make an example.
- Jester9640
-
53 posts
How do i make the road in my scratch highway "game" infinite? (repost)
I have tried this before, try to cut it in half, and make each half line up exactly, so it is very hard to tell when it teleports.
i tried but it no work maybe i mis understood what u saidwhen I start as a clone
show
go to x: (0) y: (273)
change y by (182)
change y by ((Speed) - ((speed) * (2)))
end[/quote]
- TheWeeklyReader
-
100+ posts
How do i make the road in my scratch highway "game" infinite? (repost)
Infinite Road
Basically, everything that is important is the costume to make it infinite, not the code, the code just has to detect the y and set it to something when it reaches the end.
Basically, everything that is important is the costume to make it infinite, not the code, the code just has to detect the y and set it to something when it reaches the end.
- Discussion Forums
- » Help with Scripts
-
» How do i make the road in my scratch highway "game" infinite? (repost)