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

#1 2010-04-14 10:21:37

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Help with sensing ground?

I have made a mario level editor, (Check newest project) and I want to make the levels you make actually playable like all Mario levels.
However there is one small problem.
All the ground blocks are different colors, and they are all stamps, I have no idea how to make mario sense when he is touching the ground. Any help?
I was thinking maybe when the bottom of his foot was not touching the background, then I realised his foot is a slightly different shade of brown on each one.
This is one of the reasons why we need an if <touching stamp of [____]> block!

Offline

 

#2 2010-04-14 11:14:06

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Help with sensing ground?

If they are all stamps and different colors (and it's mario, so tile based), you could use lists (arrays) to record positions where there is a collision?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#3 2010-04-14 12:06:55

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Re: Help with sensing ground?

Sounds complicated, explain please?

Offline

 

#4 2010-04-15 06:40:59

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Re: Help with sensing ground?

I have tried everything..
I made a list collisionX and collisionY and made the stamper add its position to both, but I am not sure how to make mario sence when he is in a coliding distance from one of thoes points.
There is no (As far as I am aware) distance to X Y block.
I even tried fitting a <Not <_>> block into where the color should go of <If touching color []>

If anyone can make it for me, please try, just make the character a black block and upload it! I will put the mario in.

http://scratch.mit.edu/projects/colorfusion/985509

Offline

 

Board footer