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

#1 2013-04-11 23:58:27

canadiandufus
New Scratcher
Registered: 2013-04-11
Posts: 10

PLEASE READ. I need help

hey, I was wondering how you make it to change background when you walk onto a certain are (ex. walking into a door on pokemon)  if anyone could help that woulld be nice.

Offline

 

#2 2013-04-12 00:47:19

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: PLEASE READ. I need help

Hi,

Basically, you just have either a variable that controls the "level" or "stage" or whatever, or you can use broadcasting, like this:

To put in your character:

When gf clicked
If < touching? [door v]>
Broadcast [next BG v]
End
To put in the stage:

When I receive [next BG v]
next background
Hope that helps,

CAA14

Last edited by CAA14 (2013-04-12 00:51:53)

Offline

 

#3 2013-04-12 01:09:13

canadiandufus
New Scratcher
Registered: 2013-04-11
Posts: 10

Re: PLEASE READ. I need help

I'm kinda new to this scratch program so if you could give me a little tutorial on how to do this because I am making a game when in that game I want the character to walk through a door to the next room. So if you could give me a noob-tutorial on that it would be nice.

Offline

 

#4 2013-04-12 05:40:29

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: PLEASE READ. I need help

Make a sprite called door. Make your background look like the inside of a house or wherever you want it to be, but have a hole in the wall that is the same size and shape as the door. Drag the door so that it is perfectly inline with the hole and leave it there. Go into motion and click on the checkboxs by x position and y position. Make a note of both. Make a new background that is outside the house, with ahother hole in the wall of the house, the same size. Move the door to that hole and make a note of the x pos and y pos. Make a character and use the if key [ (up arrow / left arrow e.t.c. v] pressed change x or y by 2 or -2 so that the chracter moves with the arrow keys. Put these all in a forever, connected to a when gf clicked. On the door put when gf clicked,forever: go to x(the first x pos you noted) y(the first y pos), wait until touching character, broadcast [next v], go to x(second x) y(second y), wait until not touching charcter, wait until touching character, broadcast [back v].
On the background put when gf clicked switch to background background 1. When I recieve next, next background. When I recieve back, switch to background ((background #) -(1)). Finally in the character put when I recieve next, go to x(second x) y(secon y). When I recieve back, goto x(first x) y( first y). If you don't understand any of that, I'll make a sample project for you.  smile

Offline

 

#5 2013-04-17 20:55:26

canadiandufus
New Scratcher
Registered: 2013-04-11
Posts: 10

Re: PLEASE READ. I need help

When I go to looks there is no new background though

Offline

 

#6 2013-04-18 11:52:44

EH7meow
Scratcher
Registered: 2013-03-23
Posts: 24

Re: PLEASE READ. I need help

To make a new background you go to stage (near where all the sprites are) and go to backgrounds (near the top) in the bar that has scripts and sounds. You should now see a white background. Click on edit to change this. Alternatively, you can paint, import or take a picture to make a totally new background.


Love lovehearts? Love mending lovehearts? Then you'll love Love Doctor

Offline

 

Board footer