Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Thu Mar 28, 2024 10:24 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Blitz3D Help
PostPosted: Sun Oct 29, 2006 10:42 pm 
Code:
; Jumping Cone
; ______________

camdistance=10
Graphics3D 640,480
SetBuffer BackBuffer()

; Creating the types
type_player=1
type_ground=2

; Create camera
camera=CreatCamera()
RotateEntity camera, 45,0,0

; Creating a light
light=CreateLight()

; Creating a plane and texture
grid_tex=CreateTexture( 32,32,8 )
ScaleTexture grid_tex,10,10
SetBuffer TextureBuffer( grid_tex )
Color 0,0,64:Rect 0,0,32,32
Color 0,0,255:Rect 0,0,32,32,False
SetBuffer BackBuffer()
grid_plane=CreatePlane()
EntityTexture grid_plane,grid_tex
EntityBlend grid_plane,1
EntityAlpha grid_plane,.6
EntityFX grid_plane,1
EntityType grid_plane, type_ground

; Creating a mirror
CreateMirror()

; Createing a Cone
cone=CreateCone(64)
EntityType cone,type_player
PositionEntity cone, 0,1,5
ScaleEntity cone ,0.4,0.4,0.4
EntityRadius cone, 0.5
Texture=CreateTexture(16,16): SetBuffer TextureBuffer(texture)
ClsColor 256,6,256
Cls
Color 12,126,256
Rect 0,0,8,8,1
Rect 8,8,8,8,1
ScaleTexture Texture,.2,.2
EntityTexture cone,texture

; The following code makes the program run

While Not KeyDown( 1 )
y#=0

If KeyDown( 208 )=True Then velocity#=velocity -0.001
If KeyDown( 200 )=True Then velocity#-velocity +0.001
If KeyDown ( 31 ) Then velocity#=0
If KeyDown ( 31 ) Then xvelocity#=0
If KeyDown( 203 )=Then True xvelocity#=xvelocity#-0.001
If KeyDown( 205 )=Then True xvelocity#=xvelocity#+0.001
If KeyDown( 57 )=True Then y#=y#+0.5

MoveEntity cone,xvelocity#,y#,velocity#
TranslateEntity cone, 0,-0.1,0
PositionEntity camera,EntityX(cone),0,EntityZ(cone)
MoveEntity camera,0,0,-5
Collision type_player,type_ground,2,2
Collision type_ground,type_player,2,2

UpdateWorld

RenderWorld
Flip

Wend

End


It says its "Expecting expression". I dont know whats wrong with the code. Any help would be nice.


Top
  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 29, 2006 10:43 pm 
Offline
Kommunist
Kommunist

Joined: Fri Oct 06, 2006 7:26 pm
Posts: 173
Location: NY
It expects an expression.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 29, 2006 10:49 pm 
yeah, what is that expression?


Top
  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 30, 2006 8:21 am 
Offline
Kommunist
Kommunist
User avatar

Joined: Sun Oct 01, 2006 9:36 pm
Posts: 283
It would help if you posted the error message in it's entirety.

_________________
"The man who trades freedom for security does not deserve nor will he ever receive either." -Benjamin Franklin


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 30, 2006 8:55 am 
I did. "Expected expression" Exactly like that. But I fixed it. Just had to retype everything. I think I missed a letter/number/comma somewhere. With that now done, I have successfully finishes my first program! Its a cone, running around a map, that can jump. Not THAT great, but still cool.


Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 149 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group