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

#1 2012-08-24 01:15:52

Grizzmix
New Scratcher
Registered: 2012-08-24
Posts: 3

Background

I need help changing a background when you click a certain button but also no showing any sprites until you do so

Offline

 

#2 2012-08-24 05:29:10

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Background

when gf clicked
switch to background [background1 v]
forever if <key [space v] pressed?> // Or whatever key you're using.
switch to background [background2 v]
end
Hope this helps.

Last edited by JH1010 (2012-08-24 05:30:23)

Offline

 

#3 2012-08-25 00:48:22

tree-hugger
Scratcher
Registered: 2011-11-19
Posts: 38

Re: Background

I'm not sure what you mean by button, if you mean keyboard key JH1010 has a great script for you, if you mean a sprite that is clicked here is my script. Ok heres the script that the sprite (button) will have:

when button clicked
broadcast [next background]
Here's the script that the stage will have:

when gf clicked
switch to [background1]
when I recieve [next background]
next background
There you go! Hope I helped  smile


http://oi48.tinypic.com/1y7tjr.jpghttp://oi50.tinypic.com/28tb34j.jpg                     http://oi50.tinypic.com/21c6v74.jpg                    ...ya, I'm weird... REAL weird...
BITBOT ALL THE WAY!!!     Only the WEIRDEST games!     (that's just  a Tree-Hugger thing)

Offline

 

#4 2012-08-25 00:53:05

tree-hugger
Scratcher
Registered: 2011-11-19
Posts: 38

Re: Background

The red blocks should be a control block that says "when button (name of sprite) clicked", a looks block that says "switch to background1" and another control block that says "when I receive next background (what's broadcasted)". Sorry for the issue  tongue


http://oi48.tinypic.com/1y7tjr.jpghttp://oi50.tinypic.com/28tb34j.jpg                     http://oi50.tinypic.com/21c6v74.jpg                    ...ya, I'm weird... REAL weird...
BITBOT ALL THE WAY!!!     Only the WEIRDEST games!     (that's just  a Tree-Hugger thing)

Offline

 

#5 2012-08-25 00:54:03

LightFlash
Scratcher
Registered: 2012-07-17
Posts: 75

Re: Background

tree-hugger wrote:

I'm not sure what you mean by button, if you mean keyboard key JH1010 has a great script for you, if you mean a sprite that is clicked here is my script. Ok heres the script that the sprite (button) will have:

when [I am v] clicked //There's no drop down, but it's just a technical limitation.
broadcast [next background v]
Here's the script that the stage will have:

when gf clicked
switch to background [background1 v]
when I receive [next background v]
next background
There you go! Hope I helped  smile

Fixed.q

Offline

 

Board footer