Welcome.
I have a problem in programming, and so I can not find the option to ghost from the background first went to the other when it touches the edge of the background. How to do it?
Offline
To do this, there are a few ways. The easiest method is to have two thin line sprites, each a different color. Place them at opposite edges of the screen. Let's say that the one on the left is blue, while the one on the right is red. I would show the scripts, but I don't know how to do the 'touching' blocks' So the scripts would be 'if touching color 'red'
broadcast forward one backgroundAnd if touching color blue
broadcast back one backgroundand the sprite would go to another position to avoid glitching on both
when I receive forward one background next background
when I receive back one background switch to background <(background #) - [1]>Hope this helps!
Offline
7734f wrote:
To do this, there are a few ways. The easiest method is to have two thin line sprites, each a different color. Place them at opposite edges of the screen. Let's say that the one on the left is blue, while the one on the right is red. I would show the scripts, but I don't know how to do the 'touching' blocks' So the scripts would be 'if touching color 'red'
broadcast [forward one background v]And if touching color bluebroadcast [back one background v]and the sprite would go to another position to avoid glitching on both
Then the stage would receive these messages:when I receive [forward one background v] next backgroundwhen I receive [back one background v] switch to background <(background #) - [1]>Hope this helps!
And sorry that some are red, the blocks confuse me on the forums sometimes. The when I receive and broadcast blocks are in the control section of the scratch blocks tabs.
Fixed.
Offline