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

#1 2009-02-27 04:22:31

Chris250
Scratcher
Registered: 2008-08-01
Posts: 2

Platform help

How the heck do I get my character to stand on floating and/or non floating platforms? I'm in need of info!!

Offline

 

#2 2009-02-27 10:07:58

daydreamgirl
Scratcher
Registered: 2009-02-20
Posts: 42

Re: Platform help

Draw a background, and make the platforms all the same color. Make your character's feet a different color. Then, give your character this script.
(Sorry I'm not using the blocks in the Scratch Blocks thing)

When Green Flag Clicked
Forever if Not Color (Color you used for feet) Is Touching (Color you used for platforms)
     Change Y by (steps)

This will make your character fall until it lands on a platform. Make steps bigger for it to fall faster.

Hope this helps.


Test Signature

Offline

 

#3 2009-02-27 13:48:30

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Platform help

daydreamgirl wrote:

Draw a background, and make the platforms all the same color. Make your character's feet a different color. Then, give your character this script.
(Sorry I'm not using the blocks in the Scratch Blocks thing)

When Green Flag Clicked
Forever if Not Color (Color you used for feet) Is Touching (Color you used for platforms)
     Change Y by (steps)

This will make your character fall until it lands on a platform. Make steps bigger for it to fall faster.

Hope this helps.

improvement on script:
When Green Flag Clicked
Forever
change y by var grav
if (Not Color (Color you used for feet) Is Touching (Color you used for platforms))
     Change var grav by -1
else
     Set var gav to 0


using this its possible to easily aply jumping
if <(var grav=0) and (Key up is pressed)>
grav = 5

Last edited by yambanshee (2009-02-27 13:50:02)

Offline

 

#4 2009-02-27 14:46:48

Chris250
Scratcher
Registered: 2008-08-01
Posts: 2

Re: Platform help

Thanks a lot! This is going to be a great help when I'm making games!

Last edited by Chris250 (2009-02-27 15:25:42)

Offline

 

#5 2009-04-20 13:39:19

smiley_sloth
Scratcher
Registered: 2009-04-20
Posts: 2

Re: Platform help

how do you get the 'if not' block?? I don't seem to have it... :S

Offline

 

#6 2009-04-20 13:42:40

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Platform help

<if> <<  <not>  >>
<end>


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

Board footer