Partikel

Partikel sind abgespeckte Objekte, die im Netzwerk nicht synchronisationsrelevant sind. Das heißt einerseits, dass man Partikel relativ problemlos in größeren Mengen erstellen kann, um interessante Effekte zu erzielen. Andererseits existieren nur sehr wenige Möglichkeiten, un das Verhalten von Partikeln zu steuern. Wenn die Möglichkeiten von Partikeln also für einen Effekt nicht ausreichen, sollten stattdessen reguläre Objekte verwenden, mit denen sich alle durch Partikel darstellbaren Effekte auch erzielen lassen.
If a particle is defined in a ocd group, any object definition located in the same group is ignored.
Partikel werden nicht in Spielständen gespeichert, da sie nur für kurzzeitige Effekte gedacht sind.

Partikel-Komponenten (OCD)

Particle.txt
Partikeleigenschaften.
Graphics.png
Partikelgrafik.
Zusätzlich dazu sind natürlich auch alle von Objektdefinitionen bekannten Elemente für das Frontend verfügbar (also z.B. Title.png, DescDE/US.txt, etc.)

Particle.txt

In dieser Datei werden - analog zur DefCore.txt bei Objektdefinitionen - die Eigenschaften des Partikeltyps beschrieben.
Sektion [Particle]
Wert Datentyp Beschreibung
Name Zeichenfolge (max. 30) Name of the particle definition. This name is also used to refer to this particle type in scripts.
Face 4 Integer Zielrechteck für die Grafik in der Graphics.png. Siehe Partikelgrafik.

Grafik

The coordinates for the source rectangle within Graphics.png of a particle specify the first phase of the particle graphics the other phases should follow to the right and can be continued in the next row. The animation length is then automatically determined from the image size.

Eigenschaften

Each particle has different attributes like position, lifetime, size and more. These are set by script when creating the particle.
The following properties can be contained in a proplist passed to CreateParticle. For an example, see CreateParticle
You can assign either constants to the properties (f.e. R = 200) or use certain value provider functions (f.e. R = PV_Linear(200, 0)). Available value provider functions are: PV_LinearPV_DirectionPV_RandomPV_StepPV_SpeedPV_KeyFramesPV_WindPV_GravityPV_SinPV_Cos
Particle definition proplist
Name Values Beschreibung
R 0 to 255 Red part of the color modulation.
G 0 to 255 Green part of the color modulation.
B 0 to 255 Blue part of the color modulation.
Alpha 0 to 255 Alpha part of the color modulation.
Size pixels Size of the particle in pixels.
Stretch factor The vertical stretch of the particle. 1000 equals no stretch.
Phase Index of phase The displayed phase of the particle from the Graphics.png. The index starts at 0 and will be wrapped.
Rotation 0 to 360 Rotation of the particle.
ForceX Integer Force in x-direction that is constantly applied to the particle's speed. Can f.e. simulate wind.
ForceY Integer Force in y-direction that is constantly applied to the particle's speed. Ca f.e. simulate gravity.
DampingX 0 to 1000 Damping of the particle's speed in x-direction. 1000 means no damping, 0 means instant stop.
DampingY 0 to 1000 Damping of the particle's speed in y-direction. 1000 means no damping, 0 means instant stop.
BlitMode 0 or GFX_BLIT_Additive The particle's blit mode. Currently only additive blitting is supported.
CollisionVertex 0 to 1000 The offset of the particle's hit point relative to its width. When set, the particle will collide with the landscape. 0 means the particle will collide with its center.
CollisionDensity Integer The material density above which the particle will collide. This can be used to let the particle collide with liquids. By default, particles collide with solid material if the collision is enabled. Also see material definitions.
OnCollision PC_Die, PC_Bounce, PC_Stop Defines what happens when the particle collides with the landscape.
Attach bit mask Defines the attachment of the particles to the calling object. Can be a combination of ATTACH_Front, ATTACH_Back, and ATTACH_MoveRelative. For example ATTACH_Front | ATTACH_MoveRelative. Non-attached particles are drawn on plane 900 (i.e. before most objects).
Zapper, 2013-10