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

#1 2011-11-30 06:15:36

LewisZapata-Lee
New Scratcher
Registered: 2011-11-30
Posts: 45

wall sensors

I'm making a scrolling platform game.  I have sorted out all the movement, jumping and variables, but I don't know how to make wall sensors.  I've tried looking on scratch wiki, but it didn't help much.  I have to finish this game quite soon, so please help me as soon as you can.

Offline

 

#2 2011-11-30 06:46:19

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: wall sensors

just use <touching color[ Set this to the wall colour]  button


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#3 2011-11-30 07:05:40

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: wall sensors

This is not an Advanced Topic. You will receive more help in the correct section.

I reported this to be moved to All About Scratch. That is where you want to put questions like this.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#4 2011-11-30 16:42:10

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: wall sensors

There, you go!


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#5 2011-12-01 11:45:44

LewisZapata-Lee
New Scratcher
Registered: 2011-11-30
Posts: 45

Re: wall sensors

Thank you.  I think I've figured it out.  I have not tested this yet, but in theory this should work:

               top sensor:
when green flag clicked
|forever
|go to x:(x position of player) y:<(y position of player)+[5]|

|forever if<touching colour [wall colour]|
|broadcast [up bump]|

               player:
when I receive [up bump]
|change [y velocity] by [-15]

Offline

 

Board footer