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

#1 2012-08-08 07:51:02

bi0
New Scratcher
Registered: 2012-08-08
Posts: 10

How can I make my sprite collide with objects?

I'm making a kind of platform game, and you have to jump over these blocks, but my sprite can just walk right through them. I posted what I have so far to help you guys in understanding what I mean. It's on the second level.

http://scratch.mit.edu/projects/bi0/2719616

I haven't made the 'blocks' seperate sprites, they are part of the background, so I'm wondering how I could make it so he collides with them and cant walk through them?

Offline

 

#2 2012-08-08 07:53:03

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: How can I make my sprite collide with objects?

There is a quite simple fix for this, hang on a sec  smile


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#3 2012-08-08 08:03:24

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: How can I make my sprite collide with objects?

Ok, the problem is the walls are the same color as your floor, causing you to fall, for this fix, just et your walls to blue, or change the color to hatever you want.
Make all unwalk throughable surfaces blue/your color.
here is the fix.
http://scratch.mit.edu/projects/daniel_j/2719626p

Last edited by daniel_j (2012-08-08 08:03:38)


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#4 2012-08-08 08:06:50

bi0
New Scratcher
Registered: 2012-08-08
Posts: 10

Re: How can I make my sprite collide with objects?

thanks for the quick reply. there seems to be a strange problem with this though, my sprite keeps flying across the screen and glitching out :p but thanks! (:

Offline

 

#5 2012-08-08 08:53:45

viethung20
New Scratcher
Registered: 2012-08-08
Posts: 1

Re: How can I make my sprite collide with objects?

Thanks!
http://thuenhavesinhluudong.blogspot.com/

Offline

 

Board footer