FX
Classes:
Base debris class. Uses the DebrisData datablock for properties of individual debris objects.
Stores properties for an individual debris type.
A datablock describing an individual decal.
The object that manages all of the decals in the active mission.
The emitter for an explosion effect, with properties defined by a ExplosionData object.
Defines the attributes of an Explosion: particleEmitters, debris, lighting and camera shake effects.
Object responsible for simulating wind in a level.
A datablock which defines and performs light animation, such as rotation, brightness fade, and colorization.
An emitter for lightning bolts.
Common data for a Lightning emitter object.
Network event that triggers a lightning strike on the client when it is received.
Contains information for how specific particles should look and react including particle colors, particle imagemap, acceleration value for individual particles and spin information.
This object is responsible for spawning particles.
Defines particle emission properties such as ejection angle, period and velocity for a ParticleEmitter.
A particle emitter object that can be positioned in the world and dynamically enabled or disabled.
Contains additional data to be associated with a ParticleEmitterNode.
Defines a precipitation based storm (rain, snow, etc).
Defines the droplets used in a storm (raindrops, snowflakes, etc).
Contains additional data to be associated with a RibbonNode.
Acts as the physical point in space in white a Splash is created from.
Groups:
Decals are non-SimObject derived objects that are stored and loaded separately from the normal mission file.
Enumerations
ParticleBlendStyle { NORMAL ADDITIVE SUBTRACTIVE PREMULTALPHA }
The type of visual blending style to apply to the particles.
Functions
float
calcExplosionCoverage(Point3F pos, int id, uint covMask)
Calculates how much an explosion effects a specific object.
Detailed Description
Enumerations
ParticleBlendStyle
Enumerator
- NORMAL
...
No blending style.
- ADDITIVE
...
Adds the color of the pixel to the frame buffer with full alpha for each pixel.
- SUBTRACTIVE
...
Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect.
- PREMULTALPHA
...
Color blends with the colors of the imagemap rather than the alpha.
The type of visual blending style to apply to the particles.
Functions
calcExplosionCoverage(Point3F pos, int id, uint covMask)
Calculates how much an explosion effects a specific object.
Use this to determine how much damage to apply to objects based on their distance from the explosion's center point, and whether the explosion is blocked by other objects.
Parameters:
pos | Center position of the explosion. |
id | Id of the object of which to check coverage. |
covMask | Mask of object types that may block the explosion. |
Coverage value from 0 (not affected by the explosion) to 1 (fully affected)
// Get the position of the explosion. %position = %explosion.getPosition(); // Set a list of TypeMasks (defined in gameFunctioncs.cpp), seperated by the | character. %TypeMasks = $TypeMasks::StaticObjectType | $TypeMasks::ItemObjectType // Acquire the damage value from 0.0f - 1.0f. %coverage = calcExplosionCoverage( %position, %sceneObject, %TypeMasks ); // Apply damage to object %sceneObject.applyDamage( %coverage * 20 );