## Engine
Class Trail

source: C:\XIII\Engine\Classes\Trail.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Trail

Direct Known Subclasses:USA02HelicoBulletTrail, BazookRocketTrail, BoltTrail, BulletTrail, FragmentTrail, GlassShardTrail, GrenadTrail, ICanTrail, M16GrenadTrail, TKnifeTrail, FlashBangTrail

class Trail
extends Engine.Actor

    //=============================================================================
    // Trail: An trail Actor.
    // David Fournier
    //=============================================================================

Variables
`vector` | `ActorOffset` Offset from the attached actor in its coordinates.
`bool` | `BeginPoint` The first section has a null width.
`bool` | `CrossMode` Use a cross instead the simple line for each section.
`float` | `CurRotation` Current section rotation.
`bool` | `DrawOutline` Draw the outline in addition to the ribbons.
`float` | `FadePeriod` Time lenght of a section fade.
`color` | `OutlineColor` Color used for the outline.
`color` | `RibbonColor` Color used for the ribbons.
`float` | `RotationSpeed` Rotation speed in turn per second.
`float` | `ScaleLin` Lenght added to the ribbon width each second (can be negative).
`float` | `SpawnFreq` Number of new sections per second.
`float` | `UVScale` Texture per Unreal unit.
`float` | `Width` Initial width.

Function Summary
`void` | `AddSection(vector Position)`
    // Add manually a new section to the trail.
`void` | `Init()`
    // Initialise the trail when all parameters are set.
`void` | `Reset()`
    // Reset the trail.

Source Code

    00001	//=============================================================================
    00002	// Trail: An trail Actor.
    00003	// David Fournier
    00004	//=============================================================================
    00005	class Trail extends Actor
    00006		native
    00007		noexport;
    00008
    00009	// Call the Init function after each change of these variables :
    00010	var()				float			SpawnFreq;     // Number of new sections per second.
    00011	var()				float			FadePeriod;    // Time lenght of a section fade.
    00012	// Following variables can be changed at any time without call to Init.
    00013	var()				float			Width;         // Initial width.
    00014	var()				float			ScaleLin;      // Lenght added to the ribbon width each second (can be negative).
    00015	var()				float			UVScale;       // Texture per Unreal unit.
    00016	var()				float			CurRotation;   // Current section rotation.
    00017	var()				float			RotationSpeed; // Rotation speed in turn per second.
    00018	var()				vector			ActorOffset;   // Offset from the attached actor in its coordinates.
    00019	var()				color			RibbonColor;   // Color used for the ribbons.
    00020	var()				color			OutlineColor;  // Color used for the outline.
    00021	var()				bool			CrossMode;     // Use a cross instead the simple line for each section.
    00022	var()				bool			DrawOutline;   // Draw the outline in addition to the ribbons.
    00023	var()				bool			BeginPoint;    // The first section has a null width.
    00024	var					bool			AutoDestroy;   // Automatic destroy when there is no more sections and when the attached actor is unlinked.
    00025
    00026	var		transient	int				PrivateData[9];// Internal.
    00027
    00028	// Initialise the trail when all parameters are set.
    00029	native(601) static final function Init();
    00030
    00031	// Reset the trail.
    00032	native function Reset();
    00033
    00034	// Add manually a new section to the trail.
    00035	native(603) static final function AddSection( vector Position );
    00036
    00037	defaultproperties
    00038	{
    00039	     SpawnFreq=20.000000
    00040	     FadePeriod=2.000000
    00041	     width=10.000000
    00042	     ScaleLin=-5.000000
    00043	     UVScale=0.100000
    00044	     RotationSpeed=2.000000
    00045	     RibbonColor=(B=64,G=128,R=128)
    00046	     DrawOutline=True
    00047	     AutoDestroy=True
    00048	     bInteractive=False
    00049	     bBlockZeroExtentTraces=False
    00050	     bBlockNonZeroExtentTraces=False
    00051	     RemoteRole=ROLE_None
    00052	     DrawType=DT_Trail
    00053	     Texture=None
    00054	     Style=STY_Translucent
    00055	}

End Source Code