Autor Beitrag
Killi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Do 22.05.03 11:29 
Hi!

Wollte mein altes 2D-Game wieder nachprogrammieren, da mir das leider verloren ging - ist auch alles wunderbar, jetzt wollte ich die Sounds einfügen (beim schießen), aber mein Timer hackt dabei!
Der Timer steuert meine Bewegungen, in KeyDown setzte ich z.Bsp. rechts:= True und der Timer führt die Bewegung aus - so wurde es mir empfohlen, war ja früher auch perfekt! Will ich jetzt aber in KeyDown zusätzlich einen Sound abspielen mit
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
        //Schießen auf Strg
        if Key = 17 then
        begin
                   // Stoppen, damit Sound nicht zuende gespielt wird wenn
                   // man nochmal feuern drückt!
                   gunshot.Stop;
                   gunshot.Rewind;
                   gunshot.Play;
        end;

dann hackt mein Timer und die Bewegungen sehen sch... aus! Früher gings, ich weiß nicht wieso jetzt nicht mehr!
Kann mir jemand helfen?
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 22.05.03 15:18 
Das liegt daran, dass Mediaplayer verzögert bis Die Funktion fertig ist. Versuch es mal mit anderen Kompos bzw. mit manueller Ausgabe.
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 22.05.03 17:24 
ich würde es mit fmod machen......

_________________
MFG
Michael Springwald, "kann kein englisch...."
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Sa 24.05.03 11:17 
Fmod bracht ne extra dll. Ist warscheinlich nicht so geschickt, zusätzlich 300KB einzubinden wenn es auch mit 2KB gemacht wäre...
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Sa 24.05.03 15:03 
so groß sind die dlls auch wiedr nicht, auserdem ist es ja nur eine dll.
aber dafür lohnt es sich ja auch, du kannst z.b. viele formate apspielen,...

_________________
MFG
Michael Springwald, "kann kein englisch...."
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Sa 24.05.03 15:31 
Warum sollte er mehrere Formate abspielen???Er hat eine Datei und will die Abspielen.
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Sa 24.05.03 15:39 
ok war nur ein vorschlag:
mach mal gunshot.Rewind rauß und dann sollte es auch gehen....

_________________
MFG
Michael Springwald, "kann kein englisch...."