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

#1 2009-12-20 16:58:25

Jesscookie
Scratcher
Registered: 2008-02-08
Posts: 100+

Making a sprite stay on top of a moving platform

Yeah, so I'm making a Christmas game based on this:
http://www.egames.jp/game/Sokoabu.html
So you're trying to get a cat to the goal, but he can't jump, so you have to help him with some big balls.

Yes, you click on the screen and ball comes floating up and the cat is supposed to walk on it. Well, this is the part I'm stuck at.

How do you make a sprite stay on top of a moving platform without him falling off?


http://i172.photobucket.com/albums/w23/Fresh-Mikey/1995_gif_280x210.gif

Offline

 

#2 2009-12-21 11:38:50

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

Re: Making a sprite stay on top of a moving platform

Well, make that platform a different colour, and say:

If touching colour {colour of platform}
Repeat until not touching colour {colour of platform}
Move 10 steps.

Then make the platform move 10 steps, that's a simple version, and won't work for everything. It depends on how you want the platform to move. Whether it goes up, down, left, right or even diagonal.

If that doesn't work then tell me how you want the platform to work and I see what I can do.


http://i.cr3ation.co.uk/dl/s1/gif/847032b8a331def77529b6a0384db1fe_handfingers.gif

Offline

 

#3 2009-12-22 19:07:02

Jesscookie
Scratcher
Registered: 2008-02-08
Posts: 100+

Re: Making a sprite stay on top of a moving platform

Thanks for the tip, I finally got it  smile

Now I just have to finish making the levels and such.


http://i172.photobucket.com/albums/w23/Fresh-Mikey/1995_gif_280x210.gif

Offline

 

Board footer