simples game mit würfel
Übersicht

artackBetreff: simples game mit würfel |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hi@all
bin nochn totaler anfänger und hab hier mal mien erstes prog bloß würd mich interessieren,was ich falsch gemacht habe da es bei mir immer entweder "expecting EndIf"(obwohl keins fehlt oder?) oder "not enough parameters" anzeigt.... hier der code: Code: [AUSKLAPPEN] Graphics 3D 800, 600, 16, 2
AppTitle "Cube" SetBuffer BackBuffer() SeedRnd MilliSecs() Global Cam = CreateCamera() PositionEntity cam, 0, 3, -5 Global Light =CreateLight() PositionEntity light= 200, 200, 200 Global Char =CreateCube() EntityColor Char, 255, 0, 0 While Not KeyHit (1) CheckInput() RenderWorld() UpdateWorld() Flip Wend End Function CheckInput() If KeyDown(200) MoveEntity Char, 0, 0, 0.2 Else If KeyDown(208) MoveEntity Char, 0, 0, -0.2 End If If KeyDown(203) TurnEntity Char, 0,-2, 0 Else If KeyDown(205) TurnEntity, Char, 0, 2, 0 End If End Function thx im vorraus mfg artack |
||
![]() |
CaesiumBetreff: Re: simples game mit würfel |
![]() Antworten mit Zitat ![]() |
---|---|---|
es gibt mehrere kleine fehler, die eher nach tippfehlern aussehen:
a) Graphics3D muss zusammen geschrieben werden. b) wenn du das licht positionierst, schreibst du ein gleichheitszeichen (=) anstatt eines kommas c) bei der letzten if-bedingung hast du nach TurnEntity ein komma gesetzt, dass da nicht hingehört ich würde die allerdings dazu raten, erst im 2d bereich anzufangen. so stimmts: Code: [AUSKLAPPEN] Graphics3D 800, 600, 16, 2
AppTitle "Cube" SetBuffer BackBuffer() SeedRnd MilliSecs() Global Cam = CreateCamera() PositionEntity cam, 0, 3, -5 Global Light =CreateLight() PositionEntity light, 200, 200, 200 Global Char =CreateCube() EntityColor Char, 255, 0, 0 While Not KeyHit (1) CheckInput() RenderWorld() UpdateWorld() Flip Wend End Function CheckInput() If KeyDown(200) MoveEntity Char, 0, 0, 0.2 Else If KeyDown(208) MoveEntity Char, 0, 0, -0.2 End If If KeyDown(203) TurnEntity Char, 0,-2, 0 Else If KeyDown(205) TurnEntity Char, 0, 2, 0 End If End Function gruß, caesium |
||
Der Vorteil der Klugheit liegt darin, dass man sich dumm stellen kann. Das Gegenteil ist da schon schwieriger. ![]() |
artack |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ok thx.... | ||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group