position mouse 400,300
hide mouse
Stanje = 0
Trcanje = 0
Brzina = 0
if Shiftkey() = 1 then Trcanje = 1
if Trcanje = 1 then Brzina = 10
if Upkey() = 1 then x#=newxvalue(x#,a#,10+Brzina) : z#=newzvalue(z#,a#,10+Brzina):Stanje=1
if Downkey() = 1 then x#=newxvalue(x#,a#,-10) : z#=newzvalue(z#,a#,-10):Stanje=1
Rem Mouse Look
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)
Yrotate camera CurveAngle(CameraAngleY#,OldCamAngleY#,24)
Rem Control input for camera
cx#=newxvalue(x#,wrapvalue(CameraAngleY#+180),220):rem This is for rotating the camera around the character:rem Change the 220 number to get the distance from the character
cz#=newzvalue(z#,wrapvalue(CameraAngleY#+180),220):rem This is also for rotating the camera around the character: rem Change the 220 number to get the distance from the character
cy#=get ground height(1,cx#,cz#)+180.0:rem This is for setting the y value, to position the camera above the character
position camera cx#,cy#,cz#:rem This is for positioning the camera in third person
If Rightkey()=1 then a#=wrapvalue(a#+8.0):rem This is for rotating the character, not the camera
If Leftkey()=1 then a#=wrapvalue(a#-8.0):rem Same here
rem Point the camera at the character
point camera cx#,cy#,cz#
rem Sinkroniziraj
sync
Try this. It's not quite there yet because i'm also a newbie but try it. It's made with Darkbasic, not DBPro but i think it will work in DBPro if you change a few little things.
The best way would be if you could give me your e-mail so that i can send you an example(617k) that also has save/load game code and texture compression code.