Hi Leute,
ich weis nicht an was es liegt. Ich möchte nur das wenn Sound2 zu ende ist, dass er es nochmal spielt also immer. Er spielt Sound2 nur einmal und habe doch loobspund drinne.
hier mein code:
BlitzBasic: [AUSKLAPPEN] [EINKLAPPEN] Sound1=LoadSound ("Musik\Holzchopf - Hot Gears.ogg") Sound2=LoadSound ("Musik\Holzchopf - Trance Syndrome.ogg") Channel=PlaySound(Sound2) LoopSound sound2
For Fragen.fragen=Each fragen Frage = Frage + 1 Timer = MilliSecs() Color 255,255,255 SetFont Bigfont For Speed# = 1 To 20 Step 0.1 Timer = MilliSecs() Moveback(speed#) Text 320, 190, "Auf zur nächsten Frage...", 1, 1 Text 320, 290, "Frage " + Frage, 1, 1
DrawImage Maus, MouseX(), MouseY() Repeat Until MilliSecs() => Timer + 10 Flip Next For Speed# = 20 To 1 Step -0.1 Timer = MilliSecs() Moveback(speed#) Text 320, 190, "Auf zur nächsten Frage...", 1, 1 Text 320, 290, "Frage " + Frage, 1, 1 DrawImage Maus, MouseX(), MouseY() Repeat Until MilliSecs() => Timer + 10 Flip Next
Repeat Moveback() Color 255,255,255 SetFont Bigfont Text 320, 50, Fragen\Frage1$, 1, 1 Text 320, 100, Fragen\Frage2$, 1, 1
If Drawbutton(Button, Buttonover, 150,240) Then antwort = 1 If Drawbutton(Button, Buttonover, 470,240) Then antwort = 2 If Drawbutton(Button, Buttonover, 150,340) Then antwort = 3 If Drawbutton(Button, Buttonover, 470,340) Then antwort = 4 If Drawbutton(Ende, Endeover, 320-88, 400) Then Antwort = 10 Color 128,0,0 SetFont Smallfont Text(150,240, Fragen\Antwort1$,1,1) Text(470,240, Fragen\Antwort2$,1,1) Text(150,340, Fragen\Antwort3$,1,1) Text(470,340, Fragen\Antwort4$,1,1)
DrawImage Maus, MouseX(), MouseY() Flip Until antwort SetFont smallfont If Antwort = 10 Then Exit If Antwort = Fragen\RiAntwort Then Color 0,255,0 Punkte = Punkte + 1 Ri = Ri + 1 Timer = MilliSecs() Repeat Moveback() Text 320,190, "Die Antwort war Richtig.", 1, 1 Text 320,290, "Du hast jetzt "+ punkte + " Punkte.", 1, 1 DrawImage Maus, MouseX(), MouseY() Flip Until MilliSecs() > timer + 2000 Else Color 255,0,0 Timer = MilliSecs() Punkte = Punkte - 1 Fa = Fa + 1 Repeat Moveback() Text 320,190, "Die Antwort war Leider Falsch.", 1, 1 Text 320,290, "Du hast jetzt "+ punkte + " Punkte.", 1, 1 DrawImage Maus, MouseX(), MouseY() Flip Until MilliSecs() > timer + 2000 End If antwort = 0 Next SetFont Smallfont Color 255,255,255 Repeat Timer = MilliSecs() Moveback() Text 320,50, "Das Spiel ist Vorbei.", 1, 1 Text 320,100, "Du hast insgesammt " + Punkte + " Punkte erreicht,", 1, 1 Text 320,150, "indem du " + ri + " Fragen Richtig beantwortet hast", 1, 1 Text 320,200, "und " + fa + " Fragen falsch.", 1, 1 Text 320,250, "Hoffentlich hat dir das Spiel gefallen.", 1, 1 Text 320,300, "Maustaste drücken, um weiterzukommen.", 1, 1 DrawImage Maus, MouseX(), MouseY() Repeat Until MilliSecs() > timer + 10 Flip Until MouseHit(1) FreeSound Sound2 StopChannel(kanal) Channel=PlaySound(Sound1)
|