Skip to content

Latest commit

 

History

History
153 lines (86 loc) · 4.34 KB

LightDescription.rst

File metadata and controls

153 lines (86 loc) · 4.34 KB

LightDescription

A helper datablock used by classes (such as shapebase) that submit lights to the scene but do not use actual "LightBase" objects.

Inherit:

SimDataBlock

Description

A helper datablock used by classes (such as shapebase) that submit lights to the scene but do not use actual "LightBase" objects.

This datablock stores the properties of that light as fields that can be initialized from script.

Example:

// Declare a light description to be used on a rocket launcher projectile
datablock LightDescription(RocketLauncherLightDesc)
{
   range = 4.0;
   color = "1 1 0";
   brightness = 5.0;
   animationType = PulseLightAnim;
   animationPeriod = 0.25;
};

// Declare a ProjectileDatablock which uses the light description
datablock ProjectileData(RocketLauncherProjectile)
{
   lightDesc = RocketLauncherLightDesc;

   projectileShapeName = "art/shapes/weapons/SwarmGun/rocket.dts";

   directDamage = 30;
   radiusDamage = 30;
   damageRadius = 5;
   areaImpulse = 2500;

   // ... remaining ProjectileData fields not listed for this example
};

Methods

Fields