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

#1 2011-06-17 09:41:50

goo142
Scratcher
Registered: 2010-08-16
Posts: 23

xvel, yvel, scrolling and stuff

Can someone post scripts that are good xvelocity and yvelocity scripts? Also looking for a good scrolling script, similar to the one in Dataworld, a project by someone who I forgot their name.

lol

Offline

 

#2 2011-06-17 09:43:06

goo142
Scratcher
Registered: 2010-08-16
Posts: 23

Re: xvel, yvel, scrolling and stuff

P.S. I need to learn about abs,sin,etc.


hmm

Offline

 

#3 2011-06-17 10:34:21

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: xvel, yvel, scrolling and stuff

Abs is short for absolute value, meaning the distance from zero, or simply, it makes a value always positive, so abs(-5) is 5 and abs(5) is 5.

Sin is a trigonometric function, in a right triangle it means opposite/hypotenuse.  The number given is an angle and the sin function will give you the ratio of those two sides.  It's wave-like graph function also makes it useful for things like making an object float up and down smoothly.  Sin, cos, tan, and such are pretty complex, and might need a bit more explaining, here's the absolute basics to it, so you get what it is and does.

Give me a second and I'll also give an overview of velocity.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#4 2011-06-17 10:36:50

goo142
Scratcher
Registered: 2010-08-16
Posts: 23

Re: xvel, yvel, scrolling and stuff

Thanks for the math lesson,, but what about velocity?

Offline

 

#5 2011-06-17 10:36:58

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: xvel, yvel, scrolling and stuff

If you want a good tutorial on velocity for platformers (side view movement), here's one you can look at, just click the velocity and sensing tabs.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#6 2011-06-19 04:03:01

goo142
Scratcher
Registered: 2010-08-16
Posts: 23

Re: xvel, yvel, scrolling and stuff

Yeah, I saw that. Nice work!

lol

Offline

 

Board footer