It's probably obvious, but i don't know what i'm doing wrong. i can't get strafe to work in my prog. i only had it set up for the left key to try it, but it's not working for me. could someone please give me a hand?
`include the MatEdit LoadMatrix files
#include "LoadMatrix.dba"
`#include "voy_intro.dba"
`load intro
`voy_intro()
Rem *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Rem !!!!!! VERY VERY IMPORTANT !!!!!!
Rem Please copy the following DIM statements into your program for the
Rem LoadMatrix call, EVEN IF YOU DON'T USE THEM!
Dim BigMatrix(600,600,1)
Dim StartLoc_X(1): Dim StartLoc_Z(1):Dim Info(2)
Dim TArrayX(1): Dim TArrayZ(1): Dim FKey(10,1)
Dim ColData(100): Dim ZoneData(100): Dim Tiles(500,500)
Dim OverTexture$(100): Dim OverName$(20): Dim ReplaceTex(100)
Dim MOffsetX(25): Dim MOffsetY(25)
Dim MWire(20): Dim MGhost(20): Dim Lock(20)
Dim MatX#(20): Dim MatY#(20): Dim MatZ#(20)
Dim MatWidth#(20): Dim MatHeight#(20)
Dim TilesX(20): Dim TilesZ(20)
Dim MatHi#(20): Dim MatLo#(20)
Rem *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
`set up the program
sync on
sync rate 80
hide mouse
`load the matrix
LoadMatrix("KELT",1)
`load sounds
load sound "Mud slow.mp3",1
load sound "crickets.mp3",2
load sound "Mud fast.mp3",3
set sound volume 1,57
set sound volume 2,16
set sound volume 3,59
loop sound 2
backdrop on
color backdrop RGB(35,55,125)
fog on
fog distance 9500
fog color RGB(25,55,120)
set camera range 1,14600
position camera 54215.1,0,58773.4
`---------
`MAIN LOOP
`---------
main:
do
set mipmap mode 4
fps# = screen fps()
set cursor 0,0
print x#
print y#
print z#
print fps#
rem store object angle
CameraAngleY#=Camera Angle Y()
rem control input for camera
if upkey()=1
Xtest# = newxvalue(X#,CameraAngleY#,20)
Ztest# = newzvalue(Z#,CameraAngleY#,20)
move camera 12
if sound playing(1)=0 then play sound 1
endif
if downkey()=1
Xtest# = newxvalue(X#,wrapvalue(CameraAngleY#),20)
Ztest# = newzvalue(Z#,wrapvalue(CameraAngleY#),20)
move camera -6
if sound playing(1)=0 then play sound 1
endif
rem running control
if shiftkey()=1
Xtest# = newxvalue(X#,CameraAngleY#,20)
Ztest# = newzvalue(Z#,CameraAngleY#,20)
move camera 30
if sound playing(3)=0 then play sound 3
endif
rem strafing
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(CameraAngleY#-90),20)
ZTest# = Newzvalue(Z#,Wrapvalue(CameraAngleY#-90),20)
x#=XTest#
z#=ZTest#
endif
rem mouse control for camera
position mouse 320,240
cx#=wrapvalue(cx#+mousemovey() )
cy#=wrapvalue(cy#+mousemovex() )
cz#=wrapvalue(cz#+mousemovez() )
Rem Rotate camera
if cx#>270
if cx#-270 > 90 then cx#=270
else
if cx# > 90 and cx#-270 2100 then Y# = 22100
position camera X#,Y#+120,Z#
`update the screen
sync
loop
thanx