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

#1 2012-12-03 17:56:01

ethwok
Scratcher
Registered: 2012-09-10
Posts: 100+

Gravity Game

I'm trying to make a gravity game where you can change the gravity and stuff. Here's the link to the Help request project. Please, please, please help me with this one. I'm trying to make a game out of this, like a scrolling platformer. here's the link http://scratch.mit.edu/projects/ethwok/2954932


http://displaypicks.com/wp-content/uploads/2013/01/Animals-12.jpg
I AM ETHWOK

Offline

 

#2 2012-12-03 18:22:17

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Gravity Game

when gf clicked
forever
  if <<key [up arrow] pressed> and <touching (ground)>
    set [Y velocity] to [10]
  end
end
when gf clicked
set [Y velocity] to [0]
forever
  change y by (Y velocity)
  if <touching (ground)>
    set [Y velocity] to [0.5]
  else
    change [Y velocity] by [-0.5]
  end
end

Offline

 

#3 2012-12-03 18:24:16

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Gravity Game

In the first script it's supposed to say if touching ground

Offline

 

#4 2012-12-03 19:37:53

ethwok
Scratcher
Registered: 2012-09-10
Posts: 100+

Re: Gravity Game

dankill51 wrote:

In the first script it's supposed to say if touching ground

No, you should go look at the project I have reffering to this, then you'll get what I'm actually looking for. I already have that part.


http://displaypicks.com/wp-content/uploads/2013/01/Animals-12.jpg
I AM ETHWOK

Offline

 

#5 2012-12-03 19:48:07

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Gravity Game

Oh I think I get it. You could use the same scripts you have but make it so that when you change the gravity just negate the numbers

Offline

 

#6 2012-12-03 21:04:29

scratchyrocks
Scratcher
Registered: 2012-09-29
Posts: 19

Re: Gravity Game

the program for the guy

when gf clicked
forever
 if <touching [ground v]?>
set [y velocity v] to (0)
 else
change [y velocity v] by (gravity)
change y by (y velocity)
the program for the change gravity button
when clicked
set [gravity v] to <pick random (-1) to (-0.1)>
is this what you wanted?

Last edited by scratchyrocks (2012-12-03 21:15:00)

Offline

 

#7 2012-12-04 17:02:24

ethwok
Scratcher
Registered: 2012-09-10
Posts: 100+

Re: Gravity Game

scratchyrocks wrote:

the program for the guy

when gf clicked
forever
 if <touching [ground v]?>
set [y velocity v] to (0)
 else
change [y velocity v] by (gravity)
change y by (y velocity)
the program for the change gravity button
when clicked
set [gravity v] to <pick random (-1) to (-0.1)>
is this what you wanted?

well, i was trying to still use the script that i have, just kinda revert the numbers, and i just dont know how to do that... here's the link to the project that you can download to graciously help me. Thank you in advance http://scratch.mit.edu/projects/ethwok/2954932


http://displaypicks.com/wp-content/uploads/2013/01/Animals-12.jpg
I AM ETHWOK

Offline

 

Board footer