SCE Explosions

   Print  Previous  Next

Functions Provided By SCE Explosions

The following table provides an overview of all functions the effect can use:

Function

Description

void SetDirection(int dir)

Set the direction of the effect. Valid values are DIR_UP, DIR_DOWN, DIR_LEFT and DIR_RIGHT.

int GetDirection()

Returns the current direction.

void SetBpm(int bpm)

Sets the speed of the effect in BPM. Valid values range from 0 to 9999. The default value is 3000.

int GetBpm()

Returns the current speed of the effect in BPM.

void SetExplosionSize(int size)

Sets the size of a single explosion. Valid values for size range from 1 to 1000. The default value is 400.

int GetExplosionSize()

Returns the current size of a single explosion.

void SetShapeSize(int size)

Sets the size of single objects. Valid values for size range from 1 to 100. The default value is 8.

int GetShapeSize()

Returns the current size of single objects.

void SetGravity(float gravity)

Sets the gravity value for the effect. Valid values range from 0.01 to 99.99. The default value is 0.25.

float GetGravity()

Returns the currently set gravity.

void SetFadeOut(int fadeout)

Sets the size of a fade out tail. Valid values range from 0 to 1000. The default value is 20.

int GetFadeOut()

Returns the currently set fade out value.

void SetShapeCount(int count)

Sets the number of objects within an explosion. Valid values range from 1 to 1000. The default value is 75.

int GetShapeCount()

Returns the currently set number of objects of an explosion.

void SetRocketCount(int count)

Sets the number of rockets or explosions displayed by the effect at the same time in Fireworks mode and Explosion mode. Valid values range from 0 to 100. The default value is 1.

int GetRocketCount()

Returns the currently set number of rockets or explosions.

void SetBlur(int enable)

Activates Blur mode for the effect. Valid values are 0 (off) or 1 (on).

int GetBlur()

Returns the status of Blur mode.

void FireRocket(int posX, int posY, int explPosX, int explPosY, int ParticleCtn, int explSize, int explShape, int drawShape, color Col, color sparkleCol)

Manually creates a firework. posX is the X-coordinate, posY is the Y-coordinate, explPosX is the end-coordinate of the fireworks explosion in X, explPosY is the end-coordinate of the fireworks explosion in Y, ParticleCtn is the number of objects, explSize is the size of the fireworks explosion, explShape is the type of the fireworks explosion, drawShape is the shape of the objects, Col is the color of the effect, sparkleCol is the color of the sparkle part.

void Detonate(int explPosX, int explPosY, int ParticleCtn, int explSize, int explShape, int drawShape, color Col, color sparkleCol)

Manually creates an explosion. explPosX is the end-coordinate of the explosion in X, explPosY is the end-coordinate of the explosion in Y, ParticleCtn is the number of objects, explSize is the size of the explosion, explShape is the type of the explosion, drawShape is the shape of the objects, Col is the color of the effect, sparkleCol is the color of the sparkle part.

void SetExplosionMode(int mode)

Sets the explosion mode. See below for details.

int GetExplosionMode()

Returns which effect mode is set.

void SetExplosionShape(int shape)

Sets the type of an explosion. See below for details.

int GetExplosionShape()

Returns which type of explosion is selected.

void SetDrawShape(int shape)

Sets the type of objects of an explosion. See below for details.

int GetDrawShape()

Returns which object shape is set.

void SetColorMode(int mode)

Sets the type of color mode of the Color Table. See below for details.

int GetColorMode()

Returns which color mode is set for the Color Table.

int GetColorCount()

Returns the number of colors in the Color Table.

void RemoveColor(int idx)

Removes the color located at the specified index. If the given index is out of range, nothing happens. The Color Table of this effect needs to include at least 1 entry.

void SetColor(int idx, color c)

Sets the color values for a certain, indexed color in the Color Table.

color GetColor(int idx)

Returns which color is set for a certain color at a certain position (index) in the Color Table.

void AddColor(int idx, color c)

Adds color c at position idx to the Color Table.

void SetSparkleColorMode(int mode)

Sets the type of color mode of the Color Table for the Sparkle. See below for details.

int GetSparkleColorMode()

Returns which color mode is set for the Color Table of the Sparkle.

int GetSparkleColorCount()

Returns the number of colors in the Color Table of the Sparkle.

void RemoveSparkleColor(int )

Removes a color from the Sparkle Color Table.

void SetSparkleColor(int idx, color c)

Sets the color values for a certain, indexed color in the Sparkle Color Table.

color GetSparkleColor(int idx)

Returns which color is set for a certain color at a certain position (index) in the Sparkle Color Table.

void AddSparkleColor(int idx, color c)

Adds color c at position idx to the Sparkle Color Table.

 

This Effect uses the Color Table. Learn more about Using Colors.

 

Explosion Modes

Value

Description

MODE_EXPLOSIONS

Sets the Explosion mode.

MODE_FIREWORKS

Sets the Fireworks mode.

 

Explosion Shapes

Value

Description

EXPLOSION_SHAPE_SPHERE

Sets the sphere type of explosion.

EXPLOSION_SHAPE_SPHERE_GLOW

Sets the glowing sphere type of explosion.

EXPLOSION_SHAPE_SPIRAL

Sets the spiral type of explosion.

EXPLOSION_SHAPE_RADIAL

Sets the radial type of explosion.

EXPLOSION_SHAPE_DIAMOND

Sets the diamond type of explosion.

EXPLOSION_SHAPE_STAR

Sets the star type of explosion.

EXPLOSION_SHAPE_RANDOM

Sets a random type of explosion.

 

Shapes

This effect uses various geometrical figures. The function SetDrawShape can be used to change them. The following values can be used as parameter:

Value

Description

DRAW_RECT

Selects the unfilled rectangle for drawing.

FILL_RECT

Selects the filled rectangle for drawing.

DRAW_CIRCLE

Selects the unfilled circle for drawing.

FILL_CIRCLE

Selects the filled circle for drawing.

DRAW_CROSS

Selects the cross for drawing.

DRAW_STAR

Selects the star for drawing.

DRAW_DIAMOND

Selects the unfilled diamond for drawing.

FILL_DIAMOND

Selects the filled diamond for drawing.

DRAW_RANDOM

Selects random shapes for drawing.

 

Color Modes

Value

Description

CM_LOOP

Sets the loop mode. In this mode the effect loops through the colortable to select the colors for new shapes.

CM_SHUFFLE

Sets the shuffle mode. In this mode the effect selects the color for a new shape from the color table by random access.

CM_RANDOM

Sets the random mode. In this mode the colors for the shapes are generated by random but 10% of the colors will be generated by random access to the color table.