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

#1 2008-03-11 14:47:22

teguki
Scratcher
Registered: 2008-03-06
Posts: 72

moving platforms and rolling

how do i make a ball move up if the floor moves up, and how do i make a ball roll down a hill

P.S. the focus/pivot point is not actually on the slope itself, its at the centre of the maze

http://img218.imageshack.us/img218/8584/fsafon0.png

Offline

 

#2 2008-03-11 15:14:14

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: moving platforms and rolling

I would do this by having a hidden sprite at the bottom of the screen that the ball constantly tries to move towards, and a set of sensors around the ball so that when a wall is moved into it by rotation, or it moves into a wall as it falls, the ball moves away from the wall.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#3 2008-03-11 17:16:38

teguki
Scratcher
Registered: 2008-03-06
Posts: 72

Re: moving platforms and rolling

i already got the gravity thing rigged, so can you show me in more detail (how the script is laid out etc.) how to do the second bit

Offline

 

#4 2008-03-11 17:20:38

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: moving platforms and rolling

Have a look at the hidden sprite in my complex jumping demo.  its a question of detecting when a wall is touched, and moving away from it.

http://scratch.mit.edu/projects/Mayhem/26609


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#5 2008-03-16 14:59:16

RossiGeo
Scratcher
Registered: 2008-02-26
Posts: 1

Re: moving platforms and rolling

I My sprite won't move even tho i have got all movement blocks in rite orda [blocks]<move(  )steps> [/blocks]


I guess...

Offline

 

Board footer