Autor Beitrag
knittel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 71
Erhaltene Danke: 2

Win XP, Win7, openSUSE
Delphi 7
BeitragVerfasst: Sa 06.11.10 19:57 
Hallo allerseits
Ich habe mit dem PartEd eine .axp Datei von einer Explosion erstellt. Ich lade diese mit LoadFromFile in delphi. Die Explosion besteht aus BillboardParticles, allerdings drehen sich die Particle nicht, wenn die Explosion abgespielt wird.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
procedure Form1.Create ();
begin
[...]
  ParticleSystem := TAdParticleSystem.Create(AdDraw); // A Particle Manager
  // ParticleSystem Initalize
  ParticleSystem.Texture :=
  ImageList.Items[UnitManager.FindImageIndexOf('ExplosionParticle')].Texture;
  ParticleSystem.DefaultParticle.LoadFromFile('Engine\explosion.axp');
[...]
end;

procedure Form1.Idle ();
begin
[...]
  ParticleSystem.Move(Performance.TimeGap / 1000);
  ParticleSystem.Draw(AdDraw, 00, bmAdd);
[...]
end;

procedure TUnit.Destruction (); // Wird aufgerufen wenn eine Einheit stirbt.
begin
ParticleSystem.Emit(40,round(FXpos-2*(Map.ScrolledToX-200)),round(FYpos-2*(Map.ScrolledToY-150)));  
end;


Die Partikel erscheinen zwar, aber sie drehen sich nicht noch verändern sie ihre Größe. Also fehlen genau die Eigenschaften die, das BillboardPartikel hat. Wie schaffe ich es das Die Partikelengine erkennt, dass ich ein BillboardPartikel verwende?

Danke im vorraus.

EDIT: Mir ist gerade aufgefallen, dass er die Datei garnicht richtig lädt. Auch andere Eigenschaften wie Lifetime stimmen nicht überein.

_________________
"Wir können nicht fliehen!" "Wieso nicht?" "Sie haben mir die Schnürsenkel zusammengebunden!" "Die Schweine."
oneP
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 71

Win XP Professional
Turbo Delphi 2006
BeitragVerfasst: Fr 03.12.10 20:33 
Hallo,

ich habe im Moment genau das gleiche Problem...

vielleicht weiß mittlerweile jemand was daran falsch ist?


gruß
oneP
knittel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 71
Erhaltene Danke: 2

Win XP, Win7, openSUSE
Delphi 7
BeitragVerfasst: Mi 15.12.10 12:59 
Ich hab das problem mittlerweile manuell gelöst
etwa so (einfach die werte aus dem partikel editor abschreiben):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
var  
MyDefaultParticle: TAdBillboardParticle; // The Particle (globale Deklaration)
ParticleSystem: TAdParticleSystem; // Particle Manager
ImageList: TAdImageList;

procedure Main
begin
  // ParticleSystem Initalize
  ParticleSystem.Texture :=
  ImageList.Items[UnitManager.FindImageIndexOf('ExplosionParticle')].Texture;
  MyDefaultParticle := TAdBillboardParticle.Create(ParticleSystem);
  ParticleSystem.DefaultParticle := MyDefaultParticle;

  with MyDefaultParticle do
    begin
    Lifetime       := 0.4;
    XVelocity.Start:= 100;
    XVelocity.Stop := 50;
    YVelocity.Start:= 100;
    YVelocity.Stop := 50;
    XVelocity.Variation := 50;
    YVelocity.Variation := 50;
    Size.Start     := 0.75;
    Size.Stop      := 1.5;
    Size.Variation := 100;
    Angle.Start    := 3;
    Angle.Stop     := 9;
    Angle.Variation:= 100;
    end;
end;


Funktioniert so gut.

_________________
"Wir können nicht fliehen!" "Wieso nicht?" "Sie haben mir die Schnürsenkel zusammengebunden!" "Die Schweine."