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

#1 2012-01-12 12:21:57

crystalhammer
New Scratcher
Registered: 2012-01-12
Posts: 2

Solid Platforms????

I'm making a game and i can do the platforms so the character doesn't go down through them but i don't know how to make the platforms solid so my character can't go up through them??? Please Help!?<turn cw(  )degrees><turn cw(  )degrees>

Offline

 

#2 2012-01-12 12:26:26

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Solid Platforms????

Try looking at this project  wink


Why

Offline

 

#3 2012-01-12 12:27:31

crystalhammer
New Scratcher
Registered: 2012-01-12
Posts: 2

Re: Solid Platforms????

sorry i didn't mean to put those things :L I meant how can i make my charcter so it can't go up through the platforms?

Offline

 

#4 2012-01-12 12:46:09

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Solid Platforms????

crystalhammer wrote:

sorry i didn't mean to put those things :L I meant how can i make my charcter so it can't go up through the platforms?

To do that, you'll need to make the bottom of the platform different colour from the top of the platform. I'm presuming that you're using y velocity, so you'll need to put:

When green flag clicked
Forever
  If Touching colour [colour of bottom of platform]
  Set "y velocity" to ("y velocity" * -1)
  End if
End forever

If you'd like, I can make it using actual blocks and link you to it  smile

Oh, and if you're using a method other than the y velocity one, then I'd recommend looking at the project in my earlier post, to see how to use that method  wink


Why

Offline

 

#5 2012-01-12 12:47:56

Liru
Scratcher
Registered: 2012-01-11
Posts: 1000+

Re: Solid Platforms????

You could make a list, say if there was a box which you didn't want the player to go into, the box has 4 points so that's 4 objects on the list, add the 4 points (X and Y so it can be read and used quickly) into the list and then make a code which gets the numbers and asks itself whether or not it's inside them.

I'll try make a project to show you.

Offline

 

Board footer