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

#1 2009-05-20 21:19:32

Pokeball
Scratcher
Registered: 2009-05-20
Posts: 8

Making Games in Scratch

I am trying to make an interactive game in Scratch and need some help...

What is the best way to "leave a room" and "enter another room"...for instance, I want my character to exit through the top, right or left of the screen. When they get to the edge, I will just change the background...but what command is there for "if at top edge, go to X background."?

Offline

 

#2 2009-05-20 21:36:47

Mike_W
Scratcher
Registered: 2009-02-05
Posts: 100+

Re: Making Games in Scratch

If touching edge, then look at the location of the sprite

So that is the start of the code

Last edited by Mike_W (2009-05-20 21:37:01)

Offline

 

#3 2009-05-21 07:42:50

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Making Games in Scratch

Or, you can place a sprite there (you can make it invisible by setting the ghost effect to 100) and have the invisible sprite send a Broadcast message when your character sprite touches it.  That works very well too.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2009-05-25 00:12:10

Pokeball
Scratcher
Registered: 2009-05-20
Posts: 8

Re: Making Games in Scratch

Thanks. Do you know of a project that has this code that I can review?

Offline

 

#5 2009-05-25 00:50:49

Dibbo222
Scratcher
Registered: 2007-11-03
Posts: 100+

Re: Making Games in Scratch

Paddle2See wrote:

Or, you can place a sprite there (you can make it invisible by setting the ghost effect to 100) and have the invisible sprite send a Broadcast message when your character sprite touches it.  That works very well too.

i've never thought of that. good idea i think im gonna use that in my next game.


The biggest tower defense game on Scratch?
http://scratch.mit.edu/projects/Dibbo222/929092

Offline

 

Board footer