This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-03-09 06:14:26

MiloszMalak
New Scratcher
Registered: 2013-03-09
Posts: 1

How to make a sprite move from stage to stage?

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?  hmm

Offline

 

#2 2013-03-09 10:54:14

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: How to make a sprite move from stage to stage?

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
And if touching color blue
broadcast back one background
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
next background
when I receive back one background
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.


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

#3 2013-03-26 12:03:57

PresidentialNyan
Scratcher
Registered: 2013-02-23
Posts: 59

Re: How to make a sprite move from stage to stage?

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 blue
broadcast [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 background
when 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.


http://i43.tinypic.com/4ruira.jpg

Offline

 

Board footer