Main   Class List   Namespace List   Wiki

Lightning Class Reference
[Special EffectsAtmosphere]

An individual lightning bolt, created from a LightningData object. More...

Inheritance diagram for Lightning:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void strikeObject (int id=NULL)
 Creates a LightningStrikeEvent which strikes a specific object.
void strikeRandomPoint ()
 Creates a LightningStrikeEvent which attempts to strike a random target in range of the Lightning object.
void warningFlashes ()
 Adds a new LightningStrikeEvent to all clients.
Callbacks

void applyDamage (Point3F hitPosition, Point3F hitNormal, SceneObject hitObject)
 Informs an object that it was hit by lightning and needs to take damage.

Public Attributes

Bolts

float boltStartRadius
 The radius in which a lightning bolt can occur from the center of the LightningData object.
float chanceToHitTarget
 Percentage change between 0.0f and 1.0f that the lightning bolt will hit something.
bool useFog
 Boolean, determines the useage of fog on the lightning bolts.
Colors

ColorF color
 Color to blend the StrikeTextures in LightningData with.
ColorF fadeColor
 Color to blend the StrikeTextures in LightningData with when the bolt is fading away.
Strikes

float strikeRadius
 Radius in which a lightning bolt may occur from the center of the Lightning object.
int strikesPerMinute
 Number of lightning strikes to perform per minute.
float strikeWidth
 Width of a lightning bolt.

Static Public Attributes

static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.

Detailed Description

An individual lightning bolt, created from a LightningData object.

See also:
LightningData

Member Function Documentation

void Lightning::applyDamage ( Point3F  hitPosition,
Point3F  hitNormal,
SceneObject  hitObject 
)

Informs an object that it was hit by lightning and needs to take damage.

Parameters:
Lightning object.
Object that was hit.
Position the lightning bolt hit in the world.
Range that the lightning bolt struck.
See also:
Lightning, LightningData
void Lightning::strikeObject ( int  id = NULL  ) 

Creates a LightningStrikeEvent which strikes a specific object.

Example:
// Define a ShapeBase ID
  %shapeBaseID = 4566;

// Tell the lightning object to create a LightningStrikeEvent which hits a specific target.
%lightning.strikeObject(%shapeBaseID);
void Lightning::strikeRandomPoint (  ) 

Creates a LightningStrikeEvent which attempts to strike a random target in range of the Lightning object.

Example:
// Tell the lightning object to create a LightningStrikeEvent which will hit a target if one is available.
%lightning.strikeRandomPoint();
void Lightning::warningFlashes (  ) 

Adds a new LightningStrikeEvent to all clients.

Example:
// Tell the lightning object to create a LightningStrikeEvent on all connected clients.
%lightning.warningFlashes();

Member Data Documentation

The radius in which a lightning bolt can occur from the center of the LightningData object.

Percentage change between 0.0f and 1.0f that the lightning bolt will hit something.

Color to blend the StrikeTextures in LightningData with.

Color to blend the StrikeTextures in LightningData with when the bolt is fading away.

bool Lightning::isRenderable [static]

Disables rendering of all instances of this type.

Reimplemented from GameBase.

bool Lightning::isSelectable [static]

Disables selection of all instances of this type.

Reimplemented from GameBase.

Radius in which a lightning bolt may occur from the center of the Lightning object.

Number of lightning strikes to perform per minute.

Width of a lightning bolt.

Boolean, determines the useage of fog on the lightning bolts.



Copyright © GarageGames, LLC. All Rights Reserved.