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

#1 2009-01-27 21:57:02

Boy115
Scratcher
Registered: 2009-01-27
Posts: 69

Moving platforms

How can you keep a player on a moving platform or make sure he doesn't get stuck on the moving platform or bounce on it? Someone, help me!  yikes


http://scratch.mit.edu/forums/viewtopic … 35#p368335
The link ^above leads to my project and gallery rules. Please click it.

Offline

 

#2 2009-01-28 04:18:28

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: Moving platforms

It's tricky, but it's possible. Here's how:
First you need to make your player's shoes a certain colour, but you must make sure that nothing else in the game is the same colour as their shoes.
Next, make the moving platform. The player will be able to stay on the moving platform as long as you press the arrow keys as it's moving along.
Finally, once you've set the colour of your player's shoes and made the moving platform, you can add this script to your player:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if>[/blocks][blocks]<< [blocks]<color[ shoe colour ]is over[ sky[/blocks] <and> [blocks]<( [blocks]<x position>[/blocks] <=> -100 )>[/blocks] >>[/blocks]
[blocks]<broadcast[ fall down ]and wait c>[/blocks]

This script means that if the player's shoes are touching the sky and it's x position is low down, it will fall down and the level will start again. Remember to add a "when I receive" block somewhere, with a script of what you want the game/player to do when it receives the "fall" message.
I hope this helps! If you need me to explain broadcasting to you, or you don't understand, just let me know and I will help you!
Happy Scratch-ing!  smile


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#3 2009-01-28 13:16:11

Boy115
Scratcher
Registered: 2009-01-27
Posts: 69

Re: Moving platforms

I don't see all of the actions on your list! Help me, pokemonmaster!  yikes


http://scratch.mit.edu/forums/viewtopic … 35#p368335
The link ^above leads to my project and gallery rules. Please click it.

Offline

 

#4 2009-01-28 13:51:29

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Moving platforms

Is this what you want?

http://scratch.mit.edu/projects/Dan_Test/396312


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#5 2009-01-29 18:48:12

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: Moving platforms

http://i39.tinypic.com/2nw026d.jpg

Assuming that the color of the shoe is orange and the sky is blue.

Last edited by floppy_gunk (2009-01-29 18:56:37)


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

Board footer