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

#1 2012-07-10 06:59:00

alex0091845
Scratcher
Registered: 2011-08-03
Posts: 13

Help On Collision!!!

I made this game where the player goes on to his mission, and I just started off. I can't figure out why the player keeps on going up and down when you open the full screen mode also. Because when I did the scrollingdemo, it was fine. But now I can't!! Please help!!! Here's my game demo:http://scratch.mit.edu/projects/alex0091845/2665423

Offline

 

#2 2012-07-10 08:05:26

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Help On Collision!!!

This belongs in Help With Scripts.


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#3 2012-07-10 13:42:35

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Help On Collision!!!

I found it when I downloaded it. It's all about your ground collision idea.

So first you set ground collide to 0

then you have if ground collide = 0 change y by -2
then you have in a different sprite in not touching color black set ground collide to 1

you also have if ground collide = 1 change y by 2

this makes you bounce up and down over and over and over again because whenever that sprite doesn't touch black or green it sets ground collide to 1 and when that happens you change y by 2 than if it is touching green or black it changes back to 0 which makes you go down.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#4 2012-07-10 13:48:27

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Help On Collision!!!

Here's my favorite script in the game that should help you and let's you remove collision.
This video will show you have to make gravity. I hope it works.
http://www.scratch.mit.edu/ext/youtube/?v=ZdLbqnCrlfs&feature=my_liked_videos&list=LLhMm0vBB1NgQXuXZ8npZ7Fw


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#5 2012-07-11 09:09:08

alex0091845
Scratcher
Registered: 2011-08-03
Posts: 13

Re: Help On Collision!!!

Thanks, bullelk12! I'll take a look at it!

Offline

 

Board footer