Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you make it where if you touch the edge/sprite it will send you you to another background?
- edentreloar
-
1 post
How do you make it where if you touch the edge/sprite it will send you you to another background?
- mats08rises
-
9 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Thanks!!when green flag clicked
forever
(image(progam(share)))
end
- eston123
-
3 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Thank you I was having the same problem too!
- Jordyn222
-
1 post
How do you make it where if you touch the edge/sprite it will send you you to another background?
So what you do is put a bit of color behind the butterfly in the backdrop so you can't see it behind the butterfly. Then make it so that if the sprite that is being manipulated touches the COLOR, it will hide and change the backdrop to the one you put the game over on. Don't forget the forever loop!
- deck26
-
1000+ posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
This topic is old and presumably no longer relevant to the original poster. So what you do is put a bit of color behind the butterfly in the backdrop so you can't see it behind the butterfly. Then make it so that if the sprite that is being manipulated touches the COLOR, it will hide and change the backdrop to the one you put the game over on. Don't forget the forever loop!
- KirbysHungry
-
4 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
These are my scripts for my game called the great adventure with kirby and the star!
when green flag clicked
say [Woah! a star, that's definetly what a kirby always needed!] for (2.9) secs
switch backdrop to [grassy-lot v]
when backdrop switches to [clothing-store v]
say [Woah, this star is HEAVY!] for (2) secs
forever
play sound [Kirby Triple Deluxe Music - Masked Dedede [Extended].mp3 v]
end
IF ANYTHING IS WRONG, tell me and i'll respond!
Last edited by KirbysHungry (Nov. 12, 2015 22:44:56)
- BKFighter
-
1000+ posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Yes there is definitively something wrong. These are my scripts for my game called the great adventure with kirby and the star!when green flag clicked
say [Woah! a star, that's definetly what a kirby always needed!] for (2.9) secs
switch backdrop to [grassy-lot v]
when backdrop switches to [clothing-store v]
say [Woah, this star is HEAVY!] for (2) secs
forever
play sound [Kirby Triple Deluxe Music - Masked Dedede [Extended].mp3 v]
end
IF ANYTHING IS WRONG, tell me and i'll respond!
1) Posting irrelevant content onto some one elses topic.
2) Hijacking some one elses topic. Just create your own!
3) You can test scratchblocks on the designated topic at the very top of the list, if that's what you want.
Last edited by BKFighter (Nov. 12, 2015 23:35:26)
- MaddieGH
-
5 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
make a sprite
And then the one u use the arrow keys to move:
when green flag clicked
set [ghost v] effect to (100)
And then the one u use the arrow keys to move:
when green flag clicked
forever
if <touching sprite 1?> then
broadcast [Next level v]
end
end
- deck26
-
1000+ posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Please check the date before posting. This topic is old. make a spritewhen green flag clicked
set [ghost v] effect to (100)
And then the one u use the arrow keys to move:when green flag clicked
forever
if <touching sprite 1?> then
broadcast [Next level v]
end
end
- caitlynav123
-
1 post
How do you make it where if you touch the edge/sprite it will send you you to another background?
But I only want my sprite to switch backdrop on only one side
Last edited by caitlynav123 (April 26, 2016 22:02:42)
- GameingCo
-
13 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
But how could I make a sprite change a background wit left and right.. so like if I touch left of edge do?
If I touch right of edge do/



If I touch right of edge do/




- asivi
-
1000+ posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
This is an example switching between 2 backdrops based in its' positions: But how could I make a sprite change a background wit left and right.. so like if I touch left of edge do?
If I touch right of edge do/
when green flag clickedBetter if you see it in action, Click here
forever
if <(x position) < [-220]> then
if <(backdrop name) = [backdrop2]> then
set x to (215)
end
switch backdrop to [backdrop1 v]
end
if <(x position) > [220]> then
if <(backdrop name) = [backdrop1]> then
set x to (-215)
end
switch backdrop to [backdrop2 v]
end
end
- GameingCo
-
13 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Its works but when it gos to 1 backdrop it won't wnitch back
- Friendlybone
-
9 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
So confusing….could someone tell me an easy one which 100% works? 

- AwesomeCreator9875
-
100+ posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
guys, some scripts are wrong, this is the right one
foreverthis is old, please don't bump old threads
if <touching [edge v] ?> then
get away from edge
next backdrop
end
end
Last edited by AwesomeCreator9875 (May 20, 2016 16:39:30)
- MaddieGH
-
5 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
when green flag clicked
forever
if <(x position) = [a number]> then
next backdrop
go to x: (something) y: (something)
end
end
Simple.
- superbomber365
-
2 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
move () steps
- GameingCo
-
13 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Autally if you want a REALLY SIMPLE way just make a sprite that's hides with the backrond and you can make it do different things like when backdrop swithes to ? then wait until sprite ? touches me and then you now
- supermariofan153
-
27 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Thank You!!! Because you haven't connected the edge script to a hat block. So do this:when green flag clicked
forever
if <touching [edge v]?> then
broadcast [Change Backdrop to #2 v]
end
end
I am new to scratch too!
- XGamerAph
-
6 posts
How do you make it where if you touch the edge/sprite it will send you you to another background?
Idk where to put the code


- Discussion Forums
- » Help with Scripts
-
» How do you make it where if you touch the edge/sprite it will send you you to another background?