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

#1 2010-11-27 17:36:52

Robot_Maniac
Scratcher
Registered: 2010-11-22
Posts: 56

How to make blocks for your sprite to land on

How do you make blocks for your character to land on? I tried it but my sprite won't land on it. It just falls back down to the ground (because I make realistic gravity).












_____________________________________________________________________________

Don't worry about the world coming to an end, It's already tommorow in China.


Math Trick of the Week: Choose any three digit number that's one digit is at least 2 less that the tens digit and the tens digit at least 2 less than the hundreds. Then, reverse the digits and subtract. Then, reverse the digits in the answer and add. You should get 1089.

Offline

 

#2 2010-11-27 18:02:27

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How to make blocks for your sprite to land on

The easiest way is just to make the platforms a certain color and enclose your gravity script in a touching_color script, like this:

Code:

When green flag clicked
Forever if <not <touching color __ > >
    (Gravity script)
End Forever-if

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-11-28 09:10:50

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: How to make blocks for your sprite to land on

http://i1118.photobucket.com/albums/k607/Max_Levine/Howtomakeaplatformer.gif

Just ignore the script at the end, that was an accident. The colors are also the different sides of the sprite, you have to paint them.

I hope I helped!

Last edited by -GizzardGulp- (2010-11-28 09:12:00)


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#4 2010-11-28 09:32:12

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: How to make blocks for your sprite to land on

Robot_Maniac wrote:

Don't worry about the world coming to an end, It's already tommorow in China.

Hey! (I live in China.)

Offline

 

#5 2010-11-28 09:39:57

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: How to make blocks for your sprite to land on

mathematics wrote:

Robot_Maniac wrote:

Don't worry about the world coming to an end, It's already tommorow in China.

Hey! (I live in China.)

I guess that means that half of the world will end before the other half?


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#6 2010-11-28 10:21:47

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: How to make blocks for your sprite to land on

-GizzardGulp- wrote:

mathematics wrote:

Robot_Maniac wrote:

Don't worry about the world coming to an end, It's already tommorow in China.

Hey! (I live in China.)

I guess that means that half of the world will end before the other half?

The total area of China is 1.882% of the total area of the world.

And it's time to get back on-topic.

Offline

 

#7 2010-12-21 20:11:49

Robot_Maniac
Scratcher
Registered: 2010-11-22
Posts: 56

Re: How to make blocks for your sprite to land on

Thanks guys! It helped!


Math Trick of the Week: Choose any three digit number that's one digit is at least 2 less that the tens digit and the tens digit at least 2 less than the hundreds. Then, reverse the digits and subtract. Then, reverse the digits in the answer and add. You should get 1089.

Offline

 

#8 2010-12-23 06:42:08

Thenuclearduck
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: How to make blocks for your sprite to land on

Well with blocks, and falling, you just need to do something as simple as this:
[blocks]<when green flag clicked>
<forever>
<if><<  <not> <touching[ ground >>
<change{ gravity }by( -0.5
<else>
<set{ gravity }to( 0
<end>
<change y by( <{ gravity }>[/blocks]
hope I helped!


http://blocks.scratchr.org/API.php?user=Thenuclearduck&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 is my newest project! It has http://blocks.scratchr.org/API.php?user=Thenuclearduck&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views!

Offline

 

#9 2010-12-23 10:04:33

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: How to make blocks for your sprite to land on

Thenuclearduck wrote:

Well with blocks, and falling, you just need to do something as simple as this:
[blocks]<when green flag clicked>
<forever>
<if><<  <not> <touching[ ground >>
<change{ gravity }by( -0.5
<else>
<set{ gravity }to( 0
<end>
<change y by( <{ gravity }>[/blocks]
hope I helped!

i think he already figured it out


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

Board footer