jump n run problem ** Gelößt **
Übersicht

oki02Betreff: jump n run problem ** Gelößt ** |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Mein Mensch soll auf dem Strich unten Stehen bleiben aber ich weiß nicht wie ich es programmieren soll?
Habe schon herumprobiert aber trotztem noch nichts erreicht. Code: [AUSKLAPPEN] Graphics 640,480,32,2 SetBuffer BackBuffer() ; Global's Global xp# = 100 Global yp# = 200 Global yg# = 0 Global rechts = 205 Global links = 203 Global leer = 57 Global jump_hohe = 0 ; Hauptschleife While Not KeyHit(1) Mensch = LoadImage("Bilder\Mensch1.png") DrawImage Mensch ,xp,yp ; Tastenabfragen If KeyDown(rechts) Then xp = xp + 10 ; Rechts If KeyDown(links) Then xp = xp - 10 ; Links If KeyHit (57) Then yg=-6 If xp < 0 Then xp = 640 If xp > 640 Then xp = 0 If yp < 0 Then yp = 480 If yp > 480 Then yp = 0 yg=yg+0.1 yp=yp+yg Line 5,475,635,475 Flip Cls Wend End mfg Oki02 ![]() |
||
- Zuletzt bearbeitet von oki02 am Di, Aug 26, 2008 14:19, insgesamt 2-mal bearbeitet
![]() |
SpionAtom |
![]() Antworten mit Zitat ![]() |
---|---|---|
Dein Code sagt mir, dass du dich noch mehr mit Grundlagen befassen solltest.
Code: [AUSKLAPPEN] If xp < 0 Then xp = 1280
If xp > 1280 Then xp = 0 If yp < 0 Then yp = 1024 If yp > 1024 Then yp = 0 Hast du ne Ahnung, was dieser Code hier macht? |
||
os: Windows 10 Home cpu: Intel Core i7 6700K 4.00Ghz gpu: NVIDIA GeForce GTX 1080 |
oki02 |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
SpionAtom hat Folgendes geschrieben: Dein Code sagt mir, dass du dich noch mehr mit Grundlagen befassen solltest.
Code: [AUSKLAPPEN] If xp < 0 Then xp = 1280
If xp > 1280 Then xp = 0 If yp < 0 Then yp = 1024 If yp > 1024 Then yp = 0 Hast du ne Ahnung, was dieser Code hier macht? ja ich hatte zuerst mit einer Auflösung von 1280,1024 gearbeitet, und habe es noch nicht umprogrammiert. |
||
D²O |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
An meine Grafik angepasst.
Code: [AUSKLAPPEN] Graphics 640,480,32,2
SetBuffer BackBuffer() ; Global's Global xp# = 100 Global yp# = 200 Global yg# = 0 Global rechts = 205 Global links = 203 Global leer = 57 Global jump_hohe = 0 Global Gravity# = 0.1 ; Hauptschleife While Not KeyHit(1) Mensch = LoadImage("Mensch.png") DrawImage Mensch ,xp,yp ; Tastenabfragen If KeyDown(rechts) Then xp = xp + 10 ; Rechts If KeyDown(links) Then xp = xp - 10 ; Links If KeyHit (57) Then yg=-6 If xp < 0 Then xp = 640 If xp > 640 Then xp = 0 ;If yp < 0 Then yp = 480 If yp > 475-38 yp = 475-38 Gravity = 0.0 Else Gravity = 0.1 EndIf yg=yg+Gravity yp=yp+yg Line 5,475,635,475 Flip Cls Wend End |
||
Blitz+; Blitz3d; BlitzMax; GLBasic; Purebasic;
GameMaker Studio 1.4xx; AGK; |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group