Kodewerx
https://www.kodewerx.org/forum/

Blitz3D Help
https://www.kodewerx.org/forum/viewtopic.php?f=5&t=247
Page 1 of 1

Author:  Paradox [ Sun Oct 29, 2006 10:42 pm ]
Post subject:  Blitz3D Help

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.

Author:  Cadohacan [ Sun Oct 29, 2006 10:43 pm ]
Post subject: 

It expects an expression.

Author:  Paradox [ Sun Oct 29, 2006 10:49 pm ]
Post subject: 

yeah, what is that expression?

Author:  ?man [ Mon Oct 30, 2006 8:21 am ]
Post subject: 

It would help if you posted the error message in it's entirety.

Author:  Paradox [ Mon Oct 30, 2006 8:55 am ]
Post subject: 

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.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/