Hi,
My game demo will not run properly and will have a blank screen with a runtime error please help me find out and/or fix this problem. Any help would be greatly appreciated. Many thanks ahead of time!
rem *************
rem **-Ed GOOF-**
rem *************
rem setup gfx
Backdrop On
make light 1
color light 1,512,100,100
position light 1,0,50,400
set light range 1,500
set camera range 5,500000000000000
rem Play a tune
load music "slayer_dance.mid",1
loop music 1
rem setup hud
Make object Plain 200,1.5,0.5
position object 200,-2.0,-1.9,4
Lock object on 200
load image "L1.bmp",200
texture object 200,200
Make object Plain 201,1,1
position object 201,0.0,-1.9,4
Lock object on 201
Load image "shot.bmp",201
Texture object 201,201
rem Setup scene
load image "sand1.bmp",1
load object "ml.3ds",2
scale object 2,5555,5555,5555
make matrix 1,10000.0,10000.0,25,25
position matrix 1,-5000,0,-5000
prepare matrix texture 1,1,2,2
set matrix texture 1,0,1
update matrix 1
make matrix 2,10000.0,10000.0,25,25
position matrix 2,-5000,0,5000
prepare matrix texture 2,1,2,2
set matrix texture 2,0,1
update matrix 2
rem Load DB Pyramid
load image "pyramid.tga",2
load object "pyramid.3ds",3
scale object 3,5555,5555,5555
texture object 3,2
position object 3,0,0,9000
rem Load 3D object and append walking data to it
LOAD OBJECT "idle.x",1 : APPEND OBJECT "walk.x",1,100
SCALE OBJECT 1,250,250,250
YROTATE OBJECT 1,180 : FIX OBJECT PIVOT 1
position object 1,0,0,500
rem Loop 3D object animation from 0 to 20 (idle)
LOOP OBJECT 1,0,20 : SET OBJECT SPEED 1,10
do
rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+180),300)
cz#=newzvalue(z#,wrapvalue(a#+180),300)
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#,cz#
rem Point camera at object
point camera x#,y#,z#
rem move player
stage=0
IF LEFTKEY()=1 THEN a#=a#-8.0
IF RIGHTKEY()=1 THEN a#=a#+8.0
a#=wrapvalue(a#)
rem turn player
IF UPKEY()=1 THEN x#=NEWXVALUE(x#,a#,6) : z#=NEWZVALUE(z#,a#,6) : stage=1
IF DOWNKEY()=1 THEN x#=NEWXVALUE(x#,a#,-6) : z#=NEWZVALUE(z#,a#,-6) : stage=1
rem If character action changes
IF stage<>oldstage
IF stage=0
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,105.0
LOOP OBJECT 1,105,125
SET OBJECT SPEED 1,40
ENDIF
oldstage=stage
ENDIF
rem Update character position and angle
POSITION OBJECT 1,x#,0.0,z#
YROTATE OBJECT 1,a#
sync
loop
Austin H Wicker
http://captainwicker.webs.com/