Difference between revisions of "TLVFXPillar"

From NWN Lexicon
Jump to: navigation, search
 
Line 6: Line 6:
  
 
<nwscript>
 
<nwscript>
[[void | void ]] TLVFXPillar(
+
void TLVFXPillar(
    [[int | int ]] nVFX,
+
    int nVFX,
    [[location | location ]] lStart,
+
    location lStart,
    [[int | int ]] nIterations = 3,
+
    int nIterations = 3,
    [[float | float ]] fDelay = 0.1f,
+
    float fDelay = 0.1f,
    [[float | float ]] fZOffset = 6.0f,
+
    float fZOffset = 6.0f,
    [[float | float ]] fStepSize = -2.0f
+
    float fStepSize = -2.0f
);
+
);
 
</nwscript>
 
</nwscript>
  
Line 61: Line 61:
  
 
<nwscript>
 
<nwscript>
// Create a trigger and attach this script to the OnEnter event then create a  
+
// Create a trigger and attach this script to the OnEnter event then create a  
// waypoint nearby and set its tag to "wp_pillar_loc".
+
// waypoint nearby and set its tag to "wp_pillar_loc".
+
 
// This script can actually run from any object event but certain events will
+
// This script can actually run from any object event but certain events will
// not be appropriate as the PC would not see the visual effects.
+
// not be appropriate as the PC would not see the visual effects.
+
 
#include "x2_inc_toollib"
+
#include "x2_inc_toollib"
+
 
void main()
+
void main()
{
+
{
    // Locate the waypoint that indicates where the vfx pillar should appear.
+
    // Locate the waypoint that indicates where the vfx pillar should appear.
    object oPillar = GetWaypointByTag("wp_pillar_loc");
+
    object oPillar = GetWaypointByTag("wp_pillar_loc");
    location lPillar = GetLocation(oPillar);
+
    location lPillar = GetLocation(oPillar);
+
 
    // Create a vertical pillar of five blue/white rings with the first ring
+
    // Create a vertical pillar of five blue/white rings with the first ring
    // 0.5m above the ground and the subsequent rings 1m above each other.
+
    // 0.5m above the ground and the subsequent rings 1m above each other.
    // NOTE: the rings only last for 3 seconds.
+
    // NOTE: the rings only last for 3 seconds.
    TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, 5, 0.0, 0.5, 1.0);
+
    TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, 5, 0.0, 0.5, 1.0);
}
+
}
 
</nwscript>
 
</nwscript>
  

Latest revision as of 01:50, 26 August 2012


TLVFXPillar(int, location, int, float, float, float)

Creates a rising or falling pillar with a certain visual effect.

void TLVFXPillar(
    int nVFX,
    location lStart,
    int nIterations = 3,
    float fDelay = 0.1f,
    float fZOffset = 6.0f,
    float fStepSize = -2.0f
);

Parameters

nVFX

The visual effect to draw.

lStart

Location to put on the light show.

nIterations

Number of times to draw the light show. (Default: 3)

fDelay

Number of seconds to delay before drawing. (Default: 0.1)

fZOffset

How far off the ground to draw the light show. (Default: 6.0)

fStepSize

How far to lower the drawing of the next iteration. (Default: -2.0)


Description

Creates a rising or falling pillar with a certain visual effect.

Looks cool but quite expensive on the graphics engine, so don't get too mad with it.

Visual effects are all in the file "visualeffects.2da" and there are normally several which do not have effect constants (under VFX_ in the constants list).



Requirements

#include " x2_inc_toollib "

Version

1.61

Example

// Create a trigger and attach this script to the OnEnter event then create a 
// waypoint nearby and set its tag to "wp_pillar_loc".
 
// This script can actually run from any object event but certain events will
// not be appropriate as the PC would not see the visual effects.
 
#include "x2_inc_toollib"
 
void main()
{
    // Locate the waypoint that indicates where the vfx pillar should appear.
    object oPillar = GetWaypointByTag("wp_pillar_loc");
    location lPillar = GetLocation(oPillar);
 
    // Create a vertical pillar of five blue/white rings with the first ring
    // 0.5m above the ground and the subsequent rings 1m above each other.
    // NOTE: the rings only last for 3 seconds.
    TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, 5, 0.0, 0.5, 1.0);
}

See Also

constants: 

VFX_IMP_*



author: Mistress,  editors: Sunjammer, Axe Murderer