I've got a couple of students working on side scrollers right now and they would like to make it so their characters can walk up and down hills instead of just staying on a level platform but their characters are either walking through the hills or just slowly gliding up as they walk through them. Is there a way to do this smoothly?
I uploaded one of their files here... http://scratch.mit.edu/projects/cfunke/1228695
It's a mess but you'll get the general idea.
Offline
Yikes... I think I can help you, I just need to remove some of the enemies by downloading...
Offline
I'd go with using sensors. As in the script "If touching ground 4 and not touching... yada yada yada what with all the other grounds change Y by 10." I'm pretty sure that should work.
Offline
I'd suggest looking at Archmage's scrolling demo for something like that.
If you used hit tests, then Mario should be able to jump up the hill instead of walking through it.
Last edited by 06dknibbs (2010-08-04 11:26:48)
Offline
my project here...
http://scratch.mit.edu/projects/Locomule/1204343
does that on the first map
I also made it so that if you jump onto the hill you land higher or lower depending on which direction you jump. It is not perfect but is pretty effective. The hill has a slight bug of when you stop, then start moving again on it which I figured out how to fix but haven't worked on the project since.
Last edited by Locomule (2010-08-04 17:43:15)
Offline