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

#1 2012-11-09 02:41:59

tash_5
New Scratcher
Registered: 2012-11-05
Posts: 5

Sprites hiding and showing

Hi,
Is there any way that I can make my sprite "obstacles" hide or show on particular backgrounds? As I want to vary which ones I use as the game progresses.

Offline

 

#2 2012-11-10 11:51:20

tweedledum101
Scratcher
Registered: 2012-05-20
Posts: 27

Re: Sprites hiding and showing

Yes. You will first have to create a background variable. Next, go to the background's scripts and put

when gf clicked
forever
set <background variable> to <background>
Next, go to the obstacle's scripts, and put
when gf clicked
forever
if <<background variable>=<x>>
show
else
hide

Last edited by tweedledum101 (2012-11-10 11:52:09)


http://img835.imageshack.us/img835/9295/5646133d1a8c695m3.gif

Offline

 

Board footer