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

#1 2012-01-08 16:32:08

OCE4point5
New Scratcher
Registered: 2012-01-08
Posts: 3

Platform Issues

I'm tring to write a game with platforms, and I have "functioning" platforms but they're really glitchy. Basically instead of being able to walk ontop of them and land on them when jumping you land and walk within them.
These are the scripts I used
when green flag clicked(forever(if<key space pressed?>(if<touching color[ black]>(repeat[10](change y by[10]) ) ) ) )
when green flag clicked(forever(repeat until<touching color[black]>(change y by -4) ) )
Is there anything I can change with these scripts to make it work or should I completely change the scripts?

Offline

 

#2 2012-01-08 17:04:21

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Platform Issues

Don't use repeat 10. That's all I can think of.

Offline

 

#3 2012-01-08 18:25:46

Bsteward
Scratcher
Registered: 2010-04-13
Posts: 100+

Re: Platform Issues

Here's a wiki article on simulating gravity. I hope it helps.


Interested in the future of Scratch?http://ffs.us.to/1.png
http://i40.tinypic.com/2i9jejd.jpgIt has http://bit.ly/Ol3MfD views. Click to add one more!

Offline

 

Board footer