Hi i have my code here im using dbc.
rem Make a scene
make matrix 1,50000.0,50000.0,25,30
load bitmap "floor_U1_01.bmp",1
get image 1,0,0,256,256
delete bitmap 1
prepare matrix texture 1,1,2,2
randomize matrix 1,10.0
set matrix height 1,12,12,10.0
update matrix 1
Load object "sky01.3ds",2
POSITION OBJECT 2,2600,0,2500
scale object 2,11000,11000,11000
yrotate object 2,360
fix object pivot 2
load object "attack.x",1
loop object 1,1,1
yrotate object 1,180
fix object pivot 1
scale object 1,10,10,10
hide limb 1,1 : hide limb 1,11 : hide limb 1,14
lim=6
lastlim=lim
if upkey()=1
lim=lim+1 : repeat : until upkey()=0
endif
if downkey()=1
lim=lim-1 : repeat : until downkey()=0
endif
if lim<0 or lim>numberoflimbs then lim=lastlim
if lim<>lastli
roy#=limb angle y(1,lim)
rox#=limb angle x(1,lim)
roz#=limb angle z(1,lim)
endif
rem How fast player move
speed#=11.0
rem position player
posx#=2600.0
posz#=2500.0
rem make HUD
Make object Plain 200,1,1
position object 200,-2.7,1.9,4
Lock object on 200
ghost object on 200
rem Load and create hud bitmaps.
Load Bitmap "Score.bmp",2
Create Bitmap 1,50,50
Rem make radar
Copy Bitmap 2,1
set current bitmap 1
ink rgb(0,0,255),rgb(0,0,0)
PRX#=X#/200
PRZ#=50-(Z#/200)
Circle PRX#,PRZ#,1
ink rgb(255,0,0),rgb(0,0,0)
MRX#=mX#/200
MRZ#=50-(mZ#/200)
Circle MRX#,MRZ#,1
Get image 200,0,0,50,50
set current bitmap 0
texture object 200,200
ink rgb(255,128,128),rgb(0,0,0)
PRX#=X#/200
PRZ#=50-(Z#/200)
Circle PRX#,PRZ#,1
Circle PRX#,PRZ#,1
rem Begin main loop
do
rem print stuff
rem left side
text 10,10, "FPS = "+str$(screen fps())
text 10,30,"Text"
text 10,50,"Text"
if downkey()=1
posx#=newxvalue(posx#, angle#, 0-speed#)
posz#=newzvalue(posz#, angle#, 0-speed#)
endif
if upkey()=1
posx#=newxvalue(posx#, angle#, 0+speed#)
posz#=newzvalue(posz#, angle#, 0+speed#)
endif
if leftkey()=1 then angle#=wrapvalue(angle#-speed#)
if rightkey()=1 then angle#=wrapvalue(angle#+speed#)
lastlim=lim
if returnkey()=1
lim=lim+1 : repeat : until upkey()=0
endif
if shiftkey()=1
lim=lim-1 : repeat : until downkey()=0
endif
if lim<0 or lim>numberoflimbs then lim=lastlim
if lim<>lastli
roy#=limb angle y(1,lim)
rox#=limb angle x(1,lim)
roz#=limb angle z(1,lim)
endif
if inkey$()="p"
do
center text 35,10,"Paused-"
center text 50,30,"Press space"
if spacekey()=1 then exit
sync
loop
endif
rem get then matrix ground height for player to walk on
ground#=get ground height(1,posx#,posz#)+10
rem Update the object with these new values
position object 1,posx#,ground#,posz#
rem rotate player
yrotate object 1,angle#
rem Switch off collision for the object
rem Camera follow player
camdist#=35.0 : camhigh#=ground#+10.0 : camfade#=1.5
set camera to follow posx#,posy#,posz#,angle#,camdist#,camhigh#,camfade#,1
rem End main loop
sync
loop
I need to make the turret move (lim 6) it does not work in my code can you please help me.
200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
