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

#1 2012-05-26 05:41:21

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

Help with terminal velocity script

Hello, I am posing another topic here because well, i need help xD. I am after a script that will allow a sprite to gain speed and force while falling in the air to launch another sprite of off a kind of 'see-saw', i am planning to do this using vertical scrolling, i understand scrolling, but it is the terminal velocity and actually how to transfer he weight of the falling sprite onto the second sprite to launch it in the air. Quite complicated yes, but i am quite desperate for this XD. I have searched through 'scratch wiki' but have found nothing!
Thanks a heap!
Dan Jones


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

Offline

 

#2 2012-05-26 22:10:34

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Help with terminal velocity script

For something like this, you will need variables, and know how to use the variables to get this done. It is a bit complicated, so I don't have the time to write it out here, but you will basically need to have the variable controlling your speed, and then translate that into motion on the other end of the lever.


Why are the secret organizations getting all the attention?  mad

Offline

 

#3 2012-06-09 22:24:37

lalala3
Scratcher
Registered: 2008-10-03
Posts: 100+

Re: Help with terminal velocity script

put the inverse of the first object's y velocity for the second object's y velocity when the first object makes impact.


http://img515.imageshack.us/img515/9374/signature2nt.png

Offline

 

#4 2012-06-09 22:46:40

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Help with terminal velocity script

http://scratch.mit.edu/projects/A__B__3 … _T/2406600

This is a project that teaches how to create a max velocity...hopefully this helps.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#5 2012-06-09 23:14:57

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Help with terminal velocity script

Could you just use conservation of momentum and set the velocities equal the correct numbers whenever both sprites touch the see-saw?

velocity of launching sprite = ((mass of landing sprite) x (velocity of landing sprite)) / (mass of launching sprite)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer