by DST » Sun Jan 18, 2009 6:27 pm
Note that xvelocity is simply a way to 'store' frame velocity, it is an alternate for normal speed (x+=5;)
Velocity isn't needed when the action is occuring each frame (i. e. draw actor, repeated kepress, etc.)
Velocity is for building up speed, its best used on single triggers or gravity, where we want to build up velocity or let it sustain after the event is over.
So if you use velocity in a keypress, you'll need an action (like keyup) to stop the velocity; if you use x+=5; in a keypress, you don't need a keyup. It stops when the event stops. For most situations, x+= is much better suited than velocity, because most game movements are immediate, rather than gradual.
Also note that velocity, x+=, and angle+directional velocity are interchangeable.
You can say x+=5;, then say if(xvelocity==5) or (if angle==0) because all three forms of speed are interchangeable in GE.
So its
x+= normal movement
xvelocity= sustained or builtup movement
angle & directional velocity= for objects than move in any direction instead of only 4.
Hope this helped.