Particle Particle Particles are lightweight objects which are not synchronized in a network game. This means that on the one hand you can create huge amounts of particles without slowing down the game too much but on the other hand there are only limited options for control of particle behaviour. If the particles are not sufficient for a given effect you have in mind, you can always use true objects instead. If a particle is defined in a ocd group, any object definition located in the same group is ignored. Particles are not stored in savegames and are designed for temporary visual effects only. Particle Components (ocd)
Particle.txt
Particle properties.
Graphics.png
Particle graphics. The particle definition can also contain the known components of object definitions for describing the particle (e.g. Title.png, DescDE/US.txt, etc.)
Particle.txt This component contains the properties of the particle - as DefCore.txt does for object definitions. ValueData typeDescription NameString (max. 30 chars)Name of the particle definition. This name is also used to refer to this particle type in scripts. Face4 integersTarget rectangle for the graphics within Graphics.png. See particle graphics.
Section [Particle]
Graphics 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. Properties 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_Linear PV_Direction PV_Random PV_Step PV_Speed PV_KeyFrames PV_Wind PV_Gravity PV_Sin PV_Cos NameValuesDescription R0 to 255Red part of the color modulation. G0 to 255Green part of the color modulation. B0 to 255Blue part of the color modulation. Alpha0 to 255Alpha part of the color modulation. SizepixelsSize of the particle in pixels. StretchfactorThe vertical stretch of the particle. 1000 equals no stretch. PhaseIndex of phaseThe displayed phase of the particle from the Graphics.png. The index starts at 0 and will be wrapped. Rotation0 to 360Rotation of the particle. ForceXIntegerForce in x-direction that is constantly applied to the particle's speed. Can f.e. simulate wind. ForceYIntegerForce in y-direction that is constantly applied to the particle's speed. Ca f.e. simulate gravity. DampingX0 to 1000Damping of the particle's speed in x-direction. 1000 means no damping, 0 means instant stop. DampingY0 to 1000Damping of the particle's speed in y-direction. 1000 means no damping, 0 means instant stop. BlitMode0 or GFX_BLIT_AdditiveThe particle's blit mode. Currently only additive blitting is supported. CollisionVertex0 to 1000The 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. CollisionDensityIntegerThe 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. OnCollisionPC_Die, PC_Bounce, PC_StopDefines what happens when the particle collides with the landscape. Attachbit maskDefines 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).
Particle definition proplist
Zapper2013-10