neues problem:jetzt IMAGE DOES NOT EXIST*gelöst*
Übersicht

new yorkBetreff: neues problem:jetzt IMAGE DOES NOT EXIST*gelöst* |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ok, ich krieg noch nen krampf!
ein problem jagt das andere, und ich bin echt dabei zu verzweifeln. nachdem ihr mir glücklicherweise grade bei dem code geholfen habt*danke ![]() also immer noch der 2. type, wenn ich das pogramm starten will kommt jetzt : image does not exist und dieser teil wird markiert: Code: [AUSKLAPPEN] DrawImage steak, wurst\x, wurst\y am bild kann es nicht liegen, da ich es schon mit jpg, bmp und png versucht habe, es aber trotzdem nicht funktioniert. den code hatte ich eigentlich nur vom vorherigen übernommen... ![]() vielen dank. Code: [AUSKLAPPEN] score=0 ;name AppTitle "Veggi Life" Graphics 800,600 ;vorspann font = LoadFont("Comic Sans MS",30,1) SetFont font; Text 290,310,"Valerie presents:" Delay(1500); Cls; Text 290,310,"Veggi life" Delay(1500) Cls ;1.bilder laden hintergrund=LoadImage ("winter.überschrift.bmp") space=LoadImage("winter.überschrift.space.bmp") anleitung=LoadImage("anleitung.bmp") ende=LoadImage("ende.bmp") space2=LoadImage("anleitung.space.bmp") DrawBlock hintergrund,0,0 Delay(1000) DrawBlock space,0,0 WaitKey() Cls DrawBlock anleitung,0,0 Delay(2000) DrawBlock space2,0,0 WaitKey() Delay(50) ;2.bilder hochladen hintergrund=LoadImage ("winter.bmp") korb=LoadImage("korb.bmp") tomate=LoadImage("Tomaten.bmp") steak=LoadImage("TBoneSteak1[1].PNG") musik = LoadSound("forest.wav") ;bilder erstellen MaskImage korb,0,0,0 MaskImage tomate, 255,255,255 ScaleImage tomate, 0.1,0.1; ;type erstellen Type fruit Field x Field y Field punkte Field speed End Type Type fleisch Field x Field y Field punkte Field speed End Type While Not KeyHit(1) SetBuffer BackBuffer() Repeat ;Zählt ab wann die Tomaten fallen counter=counter+1 If counter>60 Then tom.fruit=New fruit tom\x=Rnd(1,700) tom\y=0 tom\speed=Rnd(0.5,2) tom\punkte=10 EndIf If counter>80 Then wurst.fleisch=New fleisch wurst\x=Rnd(1,700) wurst\y=0 wurst\speed=Rnd(1,2) wurst\punkte=-10 EndIf If counter=100 Then counter=0 EndIf ;steuerung If KeyDown (205); a=a+10; EndIf If KeyDown(203); a=a-10; EndIf; Cls LoopSound musik PlaySound(musik) ;hintergrund anzeigen DrawBlock hintergrund,0,0 DrawImage korb,a,510 If a>670 a=670 EndIf If a<0 a=10 EndIf ;type schleife For tom.fruit=Each fruit DrawImage tomate, tom\x,tom\y tom\y = tom\y + tom\speed If ImagesCollide (korb,a,510,0,tomate,tom\x,tom\y,0) score=score+10 tom\y=999 EndIf If tom\y>520 Then Delete tom EndIf Next For wurst.fleisch=Each fleisch DrawImage steak, wurst\x, wurst\y wurst\y= wurst\y+wurst\speed If ImagesCollide (korb,a,510,0,wurst,wurst\x,wurst\y,0) score=score-10 wurst\y=999 EndIf If wurst\y>520 Then Delete wurst EndIf Next ;anzeige Color 1, 1, 1 Text 350, 20,"Punkte: " Locate 450, 20 Print score If score=200 Then DrawImage ende, 0,0 If score=200 Then Delay(2000) If score=200 Then End EndIf Flip Forever Wend |
||
- Zuletzt bearbeitet von new york am Fr, Jan 08, 2010 17:51, insgesamt 4-mal bearbeitet
![]() |
Nicdel |
![]() Antworten mit Zitat ![]() |
---|---|---|
Dein Bild heißt auch Wurst, benenne die type-Variable anders ![]() |
||
Desktop: Intel Pentium 4 2650 Mhz, 2 GB RAM, ATI Radeon HD 3850 512 MB, Windows XP
Notebook: Intel Core i7 720 QM 1.6 Ghz, 4 GB DDR3 RAM, nVidia 230M GT, Windows 7 |
![]() |
NightPhoenix |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ja zum Beispiel Code: [AUSKLAPPEN] fle.Fleisch = new Fleisch und das Wurstbild kannst du dann z.b. so in das Typ laden: Code: [AUSKLAPPEN] fle\wurst=LoadImage("xxx.xxx")
|
||
new york |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
oh ![]() ok vielen dank ![]() |
||
![]() |
Chester |
![]() Antworten mit Zitat ![]() |
---|---|---|
NightPhoenix hat Folgendes geschrieben: Ja zum Beispiel Code: [AUSKLAPPEN]
fle.Fleisch = new Fleisch und das Wurstbild kannst du dann z.b. so in das Typ laden: Code: [AUSKLAPPEN] fle\wurst=LoadImage("xxx.xxx") Wäre es nicht besser, wenn man es als ein Bild belässt und nicht jedes mal neulädt? Wäre speicherschonender. |
||
![]() |
ozzi789 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] wurstbild=LoadImage("xxx.xxx") ; Das hier kommt zu den anderen Loadimages, nicht in die Schleife
fle.Fleisch = new Fleisch fle\wurst=wurstbild mfg |
||
0x2B || ! 0x2B
C# | C++13 | Java 7 | PHP 5 |
![]() |
NightPhoenix |
![]() Antworten mit Zitat ![]() |
---|---|---|
Dann kann er aber nur ein Bild darstellen, da ja das eine Bild nur eine ID hat.
Gibt es sowas wie CopyImage in 2D? Kenn mich da nicht aus. Das wäre dann das Optimum. Code: [AUSKLAPPEN] fle\wurst=CopyImage(wurstbild)
*edit* Achso stimmt! In 2D zeichnet man ja in verschiedenen Schritten das Gesamtbild und nicht wie in 3D mit einmal (Renderworld), richtig? Ja dann wäre fle\wurst=wurstbild sinnvoller ![]() |
||
- Zuletzt bearbeitet von NightPhoenix am Fr, Jan 08, 2010 18:44, insgesamt einmal bearbeitet
![]() |
HolzchopfMeisterpacker |
![]() Antworten mit Zitat ![]() |
---|---|---|
Du kannst problemlos das selbe Bild mehrmals auf dem Bildschirm einzeichnen, NightPhoenix. Das ist nicht wie in B3D, wo jedes Entity nur einmal existiert. | ||
Erledige alles Schritt um Schritt - erledige alles. - Holzchopf
CC BY ♫ BinaryBorn - Yogurt ♫ (31.10.2018) Im Kopf da knackt's und knistert's sturm - 's ist kein Gedanke, nur ein Wurm |
![]() |
Noobody |
![]() Antworten mit Zitat ![]() |
---|---|---|
NightPhoenix hat Folgendes geschrieben: Dann kann er aber nur ein Bild darstellen, da ja das eine Bild nur eine ID hat.
Wieso sollte er nur ein Bild darstellen können? Anders als in 3D kann er ja einfach zweimal DrawImage ![]() |
||
Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. -- Wernher von Braun |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group