It seems alot of people use x and y velocity in their scripts. I know the script for it and what it does but can anyone give me ideas of what it can be used for? This is the script for it below.
when gf clicked forever if < key [right arrow v] pressed > change (x velocity) by (0.1) end if < key [left arrow v] pressed > change (x velocity) by (-0.1) end change x by (x velocity) endIts the same with y velocity
Offline
Offline
It makes motion that feels more natural than just instantly stopping and starting. The moving sprite feels like it has inertia.
Offline
mrn0body wrote:
It seems alot of people use x and y velocity in their scripts. I know the script for it and what it does but can anyone give me ideas of what it can be used for? This is the script for it below.
when gf clicked forever if < key [right arrow v] pressed? > change [x velocity v] by (0.1) end if < key [left arrow v] pressed? > change [x velocity v] by (-0.1) end change x by (x velocity) set [x velocity v] to ((x velocity) * (0.98)) endIts the same with y velocity
Fixed
Last edited by Firedrake969 (2012-12-20 20:15:43)
Offline