simple movement code with the help of the code base and pincho it is now movement code that can be used for 2d racing games (speed control) for the control just press up to get the sprite moving then press down to make it go slower and up to speed up again. can also be modifyed for a type of warp speed or jump speed whatever you want to call it by adding in one line of code. Which is in the code at the bottom below the "loop"
velocity# = 0.0
maxvelocity# = 2.5
ang=0
do
if upkey()=1
if velocity# < maxvelocity# then inc Velocity#,2.5
Endif
if downkey()=1 and velocity# > 0.0 then dec Velocity#,0.1
if leftkey()=1 then dec Ang,3
if rightkey()=1 then inc Ang,3
Move sprite 1,Velocity#
Rotate sprite 1,curveangle(Ang,sprite angle(1),0.1)
loop
"jump speed code"
if controlkey()=1 and velocity# <> maxvelocity# then inc velocity#
pretty simple also change "inc velocity#" to "inc maxvelocity#" for another neat thing.
The search continues.
Current project - A space game