Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help making my game switch screens when the player sprite touches the end of it
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
please I don't know how
- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
you can do something like this:
forever
if <(x position) > [240]> then // 240 is the x position of the right edge
broadcast [next level v]
end
end
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
oh thank you!I will use this and give full credit and leave the credit part there forever.
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
tried and didn't work…because there is no block in scratch for when the sprite hits a wall specifically.do you know how to make one though.

- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
if the wall is a sprite, you can use the <touching (sprite)> block tried and didn't work…because there is no block in scratch for when the sprite hits a wall specifically.do you know how to make one though.
Last edited by ametrine_ (Nov. 30, 2024 01:49:13)
- Elfilin026
-
87 posts
I need help making my game switch screens when the player sprite touches the end of it
But Remember, Some sprites cannot surpass X240, so you have to look at the sprite's X Limit, then change it. you can do something like this:forever
if <(x position) > [240]> then // 240 is the x position of the right edge
broadcast [next level v]
end
end
- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
true, it should probably be >239 instead But Remember, Some sprites cannot surpass X240, so you have to look at the sprite's X Limit, then change it.
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
thanks,but….what event block do I use for it?
- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
do you know how broadcasts work? thanks,but….what event block do I use for it?
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
ye
- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
then i'm sure you can figure out which event block to use for the broadcast ye
but, if you're talking about the event block the forever loop is attached to, just do whichever one starts your game
- 2dthignamabobber232
-
21 posts
I need help making my game switch screens when the player sprite touches the end of it
ok thank you!
- hiimbob419
-
1 post
I need help making my game switch screens when the player sprite touches the end of it
it doesn't word
- ametrine_
-
1000+ posts
I need help making my game switch screens when the player sprite touches the end of it
please make a new topic for your own issue, instead of it doesn't wordnecroposting on old ones
- Discussion Forums
- » Help with Scripts
-
» I need help making my game switch screens when the player sprite touches the end of it