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

#1 2011-07-09 09:14:28

FINGIN
Scratcher
Registered: 2010-10-19
Posts: 100+

How do I make black wall invisible?

I am working on a mini 'top down view' game and have made wall sensors which surround the character. It's different colours for different sides (E.G=Top is Purple) and if the purple touches black it goes back -5 Y. and same for the other ones, accept different colours, ect. anyway I want the black to be invisible so a house's side couldn't be walked on so I add black there and you can't walk on it anymore. So its fine but when I hide the black the sensors don't register the black being there so you walk over the house's side. I tried setting ghost effect to 25,50,75 and 100 but the sensors still don't activate. How do I make the black invisible with the sensors still activating?


Problem officer?       http://trollosphere.legtux.org/wp-content/uploads/2012/01/Troll-Face-4efef98405000.png

Offline

 

#2 2011-07-09 09:36:07

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: How do I make black wall invisible?

This happens because the ghost effect changes the color a little bit.

Try making a new sprite for the black, putting it right above the house and using the hide block on it. Then, use the <touching [house edge]?> block. It's the first block in Sensing; you will have to change the sprite name using the pull-down menu.

That should do the trick!


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#3 2011-07-09 09:53:06

FINGIN
Scratcher
Registered: 2010-10-19
Posts: 100+

Re: How do I make black wall invisible?

ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't if this affects anything but its a scrolling map game. so when the right/up/down/left arrow key is pressed the background moves instead of the character


Problem officer?       http://trollosphere.legtux.org/wp-content/uploads/2012/01/Troll-Face-4efef98405000.png

Offline

 

#4 2011-07-09 13:50:48

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: How do I make black wall invisible?

FINGIN wrote:

ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't know if this affects anything, but its a scrolling map game, so when the right/up/down/left arrow key is pressed the background moves instead of the character.

Did you change the player code so it responds to the house sensor?

Something like:
when flag clicked
forever
   ...other arrow keys here...
   if <touching [House Sensor]>
      change y by -2
   --end if block--
--end forever block--

(I think -2 would create smooth movement for the player, if it moves 1 step or pixel. If your character moves two steps, pick -3, and so on.)

Looking forward to seeing your really cool game!


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#5 2011-07-10 04:55:50

FINGIN
Scratcher
Registered: 2010-10-19
Posts: 100+

Re: How do I make black wall invisible?

scratchisthebest wrote:

FINGIN wrote:

ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't know if this affects anything, but its a scrolling map game, so when the right/up/down/left arrow key is pressed the background moves instead of the character.

Did you change the player code so it responds to the house sensor?

Something like:
when flag clicked
forever
   ...other arrow keys here...
   if <touching [House Sensor]>
      change y by -2
   --end if block--
--end forever block--

(I think -2 would create smooth movement for the player, if it moves 1 step or pixel. If your character moves two steps, pick -3, and so on.)

Looking forward to seeing your really cool game!

well the house sensor is different colours for different sides,  so when the top/purple part touches black is broadcasts up bump which causes the player sprite to go back -y. the main problem is the sensors don't register when the black is hidden.

thanks, any suggestions for the game?


Problem officer?       http://trollosphere.legtux.org/wp-content/uploads/2012/01/Troll-Face-4efef98405000.png

Offline

 

#6 2011-07-11 22:04:38

cheetah12
Scratcher
Registered: 2011-06-03
Posts: 100+

Re: How do I make black wall invisible?

<when green flag clicked><show><go to x sad   )y sad  <set[ ghost ]effect to( 100


http://i1100.photobucket.com/albums/g416/Agentpieface/cheetah.png

Offline

 

#7 2011-07-11 22:32:16

brettman98
Scratcher
Registered: 2010-10-17
Posts: 1000+

Re: How do I make black wall invisible?

cheetah12 wrote:

<when green flag clicked><show><go to x sad   )y sad  <set[ ghost ]effect to( 100

I don't think you even read his post


http://i40.tinypic.com/n1wbr7.jpg

Offline

 

#8 2011-07-12 03:52:57

FINGIN
Scratcher
Registered: 2010-10-19
Posts: 100+

Re: How do I make black wall invisible?

cheetah12 wrote:

<when green flag clicked><show><go to x sad   )y sad  <set[ ghost ]effect to( 100

Not working but thanks for trying.


Problem officer?       http://trollosphere.legtux.org/wp-content/uploads/2012/01/Troll-Face-4efef98405000.png

Offline

 

Board footer