Показать сообщение отдельно
Старый 29.08.2007, 20:41   #21
Cheetos
Оператор ЭВМ
 
Регистрация: 23.08.2007
Сообщений: 27
Написано 0 полезных сообщений
(для 0 пользователей)
Подмигивание Re: Новичёк не понимает... Помогите.

Вот мой код помогите исправить или добавить что нить для правильной работы:

SeedRnd MilliSecs()
Global speed#
Graphics3D 1024,768,32,1

SetBuffer BackBuffer()
Const Typecub=1,Typecab=2

Collisions Typecub,Typecab,2,1


lit=CreateLight()
pln=CreatePlane()
tex=LoadTexture("file/GRASS2.jpg")
EntityTexture pln,tex
ScaleTexture tex,50,50
cub=LoadMesh("file/BA-64.3DS")
ScaleEntity cub,0.05,0.05,0.05
cam=CreateCamera(cub)
PositionEntity cam,0,5,-10
ScaleEntity cub,1.3,1.3,1.3
CameraViewport cam,0,0,1024,384
PositionEntity cub,-4,0,0
EntityType cub,Typecub
PositionEntity cub,0,0,0
tix=LoadTexture("file/BA-64_diff.tga")
EntityTexture cub,tix
cab=LoadMesh("file/Bugatti.3DS")
com=CreateCamera(cab)
CameraViewport com,0,384,1024,384
PositionEntity com,230,140,0
RotateEntity com,25,90,0
EntityType cab,Typecab
ScaleEntity cab,0.05,0.05,0.05
RotateEntity cab,0,270,0
PositionEntity cab,4,0.68,0
PointEntity cam,cub
a=LoadMesh("file/telega.3DS")
b=LoadTexture("file/wood.jpg")
EntityTexture a,b
ScaleEntity a,0.025,0.025,0.025
RotateEntity a,0,90,0
PositionEntity a,-6,0.6,2
c=LoadMesh("file/House.3DS")
ScaleEntity c,0.025,0.025,0.025
PositionEntity c,-13,6.2,0
RotateEntity c,0,90,0
sound=LoadSound("file/Safri_Duo_03_-_A_Gusta.mp3")
LoopSound(sound)
PlaySound(sound)
q=LoadMesh("file/BMW3ds.3DS")
ScaleEntity q,0.2,0.2,0.2
PositionEntity q,8,0.6,0
RotateEntity q,0,90,0
Repeat
MoveEntity cub,0,0,moveZ#
If KeyDown(200) Then
moveZ = moveZ + .01
Else
moveZ = moveZ - .01
EndIf
If moveZ < 0 Then MoveZ = 0
If KeyDown(203) Then TurnEntity cub,0,2,0
If KeyDown(205) Then TurnEntity cub,0,-2,0
MoveEntity cub,0,0,moveZ#

If KeyDown(200) Then
If Speed< 40 Then Speed = Speed + .02
Else
If
Speed> 0 Then Speed= Speed- .01
EndIf
If KeyDown
(208)Then
If
Speed> -5 Then Speed= Speed- .02
EndIf


MoveEntity q,4,0,0
If KeyDown(54) MoveEntity q,2,0,0
If KeyDown(16) MoveEntity cab,-4,0,0
If KeyDown(17) MoveEntity cab,-.4,0,0
If KeyDown(31) MoveEntity cab,.1,0,0
If KeyDown(30) TurnEntity cab,0,1,0
If KeyDown(32) TurnEntity cab,0,-1,0
If KeyDown(53) MoveEntity cub,0,0,4
If KeyDown(52) MoveEntity cub,0,0,2
If KeyDown(203) TurnEntity cub,0,2,0
If KeyDown(205)TurnEntity cub,0,-2,0
UpdateWorld
RenderWorld()
Text 20,20,"speed:"+speed#
Flip

Until KeyHit(1)



End
Зы: не судите строго я тока учюсь...
(Offline)
 
Ответить с цитированием