Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » When my sprite touches an edge change background?
- Student_Of_The_Year
-
Scratcher
2 posts
When my sprite touches an edge change background?
I'm trying to find out how to change the background when a sprite touches the edge of the background
- TechPandaPro
-
Scratcher
99 posts
When my sprite touches an edge change background?
There is a “touching edge” Sensing block that you could use for this.
Hope this helps!
TechPandaPro
when green flag clicked
wait until <touching [edge v] ?>
switch backdrop to [whichever backdrop v]
Hope this helps!
TechPandaPro
- latin_gamerX
-
Scratcher
500+ posts
When my sprite touches an edge change background?
if <(240) < (x position)> then
next backdrop
set x to (-200)
end
this post has been ninjaed and the first was a better script so
Last edited by latin_gamerX (Oct. 10, 2020 20:55:25)
- help_with_scripts
-
Scratcher
100+ posts
When my sprite touches an edge change background?
There is a “touching edge” Sensing block that you could use for this.You need a forever loopwhen green flag clicked
wait until <touching [edge v] ?>
switch backdrop to [whichever backdrop v]
Hope this helps!
TechPandaPro
- help_with_scripts
-
Scratcher
100+ posts
When my sprite touches an edge change background?
I'm trying to find out how to change the background when a sprite touches the edge of the backgroundYou can use:
when green flag clicked
forever
if <> then
<touching [ edge ] ?>
next backdrop
end
end
- help_with_scripts
-
Scratcher
100+ posts
When my sprite touches an edge change background?
Oops, they got a little messed up, I have never used blocks before! Put the touching edge block in the if block input, and put the next backdrop block inside of the if block.I'm trying to find out how to change the background when a sprite touches the edge of the backgroundYou can use:when green flag clicked
forever
if <> then
<touching [ edge ] ?>
next backdrop
end
end
- lisagu
-
Scratcher
79 posts
When my sprite touches an edge change background?
I'm trying to find out how to change the background when a sprite touches the edge of the background
when green flag clicked
forever
if <touching [ edge] ?> then
next backdrop
end
end
Hope it helps!


- deck26
-
Scratcher
1000+ posts
When my sprite touches an edge change background?
But add a wait until not touchng edge or it will quickly loop through multiple backdrops.I'm trying to find out how to change the background when a sprite touches the edge of the backgroundwhen green flag clicked
forever
if <touching [ edge] ?> then
next backdrop
end
end
Hope it helps!
- Discussion Forums
- » Help with Scripts
-
» When my sprite touches an edge change background?





