Ok take a look at that :
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
ok lets go trough it!!
**********************************************************
first line of code is:
If Upkey()=1
Im sure ya now that ! It looks if the player is pressing the up arrow.
*********************************************************
second and third lines of code:
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
Ok what it does is that it stores in XTest# or ZTest# the Newxvalue or the Newzvalue, wich are THE NEW VALUES!!!
for the new player camera angle.X# is the x coordinate, Z# is the z coordinate, CameraAngle is the angle of the camera and 10 is the value of the translation we want to make.
***********************************************************
last lines of code
almost finished!!!)Hurray!!
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
What it does: The first line of code checks if the player is still on the matrix. If he is, 2 lines of code occur. Their function is to store the new position that we got with NewValue(remmenber???) in X# and Z#!!
Hurray ! Youre finished.
I hope that helped you being less mixed up and now you should be able to do the same thing with downkey and the others. And oh i forgot!
*************Turning the camera*****************
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-90),10)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-90),10)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
X#=XTest#
Z#=ZTest#
Ya should understand this after all tha things ive shown you
anyways if you dont just reply to me!!
Dark Programmer