i was wondering how i can make my character seem to run by simply moving faster. here is the code i have for it right now.
position object 1,camera position x(),camera position y(),camera position z()
rem Control camera with arrow keys
if upkey()=1 then x#=newxvalue(x#,a#,5) : z#=newzvalue(z#,a#,5)
if downkey()=1 then x#=newxvalue(x#,a#,-5) : z#=newzvalue(z#,a#,-5)
if leftkey()=1 then a#=wrapvalue(a#-5.0)
if rightkey()=1 then a#=wrapvalue(a#+5.0)
rem Modify character angle based on left/right keys
stage=0
IF LEFTKEY()=1 THEN a#=a#-0.005
IF RIGHTKEY()=1 THEN a#=a#+0.005
a#=wrapvalue(a#)
rem Modify character position based on up/down keys
IF UPKEY()=1 THEN x#=NEWXVALUE(x#,a#,3) : z#=NEWZVALUE(z#,a#,3) : stage=1
IF DOWNKEY()=1 THEN x#=NEWXVALUE(x#,a#,-3) : z#=NEWZVALUE(z#,a#,-3) : stage=1
rem If character action changes
IF stage<>oldstage
IF stage=0
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,105.0
LOOP OBJECT 1,105,125
SET OBJECT SPEED 1,20
ENDIF
oldstage=stage
ENDIF
rem Update character position and angle
POSITION OBJECT 1,x#,0.0,z#
YROTATE OBJECT 1,a#
rem Update character position and angle
POSITION OBJECT 1,x#,0.0,z#
YROTATE OBJECT 1,a#
rem Handle a touch of gravity
playergrav#=playergrav#-0.1
posy#=posy#+playergrav#
rem Update character
y#=get ground height(1,x#,z#)+20.0
position object 1,x#,y#,z#
yrotate object 1,a#
rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+180),150)
cz#=newzvalue(z#,wrapvalue(a#+180),150)
cy#=get ground height(1,cx#,cz#)+90.0
position camera cx#,cy#,cz#
i want to be able to push the left shift key and make it speed everything up to seem as if it were running. any ideas?