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

#1 2013-03-31 19:11:56

Suparing01
New Scratcher
Registered: 2013-03-31
Posts: 49

Making a sprite free roam?

Hey everyone, I'm making a game where two mice hunt for cheese and defeat bosses, but I'm puzzled on how to do the following:

To make it so when one of the sprites(the game is two player) walks into the very right of the stage, the stage will switch to the next level background and the sprite will appear at the very left of the new background.

Any ideas?

Offline

 

#2 2013-03-31 19:15:53

shivadas
Scratcher
Registered: 2010-02-06
Posts: 100+

Re: Making a sprite free roam?

Hi there! Welcome to Scratch! To do what you are saying, I would put the following scripts on the sprite:

when gf clicked 
forever if <(x position) > [200]>
broadcast [Next Level v]
stop script
end
And I would put these scripts on the stage:

when gf clicked
switch to background [First Level v]

when I receive [Next Level v]
switch to background [Second Level v]
Hope that helps!  smile


Please check out my latest project, Hunger Avenger!

Offline

 

#3 2013-03-31 19:18:11

Suparing01
New Scratcher
Registered: 2013-03-31
Posts: 49

Re: Making a sprite free roam?

shivadas wrote:

Hi there! Welcome to Scratch! To do what you are saying, I would put the following scripts on the sprite:

when gf clicked 
forever if <(x position) > [200]>
broadcast [Next Level v]
stop script
end
And I would put these scripts on the stage:

when gf clicked
switch to background [First Level v]

when I receive [Next Level v]
switch to background [Second Level v]
Hope that helps!  smile

Exactly what I needed, thanks a bunch!  big_smile

Offline

 

Board footer