rem Activate manual sync
sync on : hide mouse
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,10000,10000,10000
yrotate object 2,360
fix object pivot 2
load object "ctower.3ds",22
position object 22,2400,1,2300
scale object 22,30,30,30
load object "attack.x",1
loop object 1
yrotate object 1,180
fix object pivot 1
scale object 1,10,10,10
rem How fast player move
speed#=11.0
rem position player
posx#=2600.0
posz#=2500.0
rem Begin main loop
do
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#)
if inkey$()="p"
do
center text 320,240,"paused - press space to continue"
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 Camera follow player
camdist#=15.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
Hi this is my code. I am using Dark Basic classic.
The tank im using is the one with dark basic myproj/tank.
I want to no how to shoot the bullet out of the turret.
Like in the demo.
Thanks sk8rboy.
200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
<img src="http://www.freewebs.com/warhammered/image2.jpg">