Difference between revisions of "TLVFXPillar"

From NWN Lexicon
Jump to: navigation, search
(Created page with " =TLVFXPillar(int, location, int, float, float, float)= Creates a rising or falling pillar with a certain visual effect. void TLVFXPillar( [[int | ...")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
Creates a rising or falling pillar with a certain visual effect.
 
Creates a rising or falling pillar with a certain visual effect.
  
[[void | void ]] TLVFXPillar(
+
<nwscript>
    [[int | int ]] nVFX,
+
void TLVFXPillar(
    [[location | location ]] lStart,
+
    int nVFX,
    [[int | int ]] nIterations = 3,
+
    location lStart,
    [[float | float ]] fDelay = 0.1f,
+
    int nIterations = 3,
    [[float | float ]] fZOffset = 6.0f,
+
    float fDelay = 0.1f,
    [[float | float ]] fStepSize = -2.0f
+
    float fZOffset = 6.0f,
);
+
    float fStepSize = -2.0f
 +
);
 +
</nwscript>
  
 
====Parameters====
 
====Parameters====
Line 58: Line 60:
 
====Example====
 
====Example====
  
<font color="#007F00">// Create a trigger and attach this script to the OnEnter event then create a  
+
<nwscript>
// waypoint nearby and set its tag to "wp_pillar_loc".
+
// 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.</font>
+
// 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.
<font color="#7f0000">#include "x2_inc_toollib"</font>
+
 
+
#include "x2_inc_toollib"
<font color="#0000FF">void</font> main()
+
 
{
+
void main()
    <font color="#007F00">// Locate the waypoint that indicates where the vfx pillar should appear.</font>
+
{
    <font color="#0000FF">object</font> oPillar = GetWaypointByTag(<font color="#00007F">"wp_pillar_loc"</font>);
+
    // Locate the waypoint that indicates where the vfx pillar should appear.
    <font color="#0000FF">location</font> lPillar = GetLocation(oPillar);
+
    object oPillar = GetWaypointByTag("wp_pillar_loc");
+
    location lPillar = GetLocation(oPillar);
    <font color="#007F00">// Create a vertical pillar of five blue/white rings with the first ring</font>
+
 
    <font color="#007F00">// 0.5m above the ground and the subsequent rings 1m above each other.</font>
+
    // Create a vertical pillar of five blue/white rings with the first ring
    <font color="#007F00">// NOTE: the rings only last for 3 seconds.</font>
+
    // 0.5m above the ground and the subsequent rings 1m above each other.
    TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, <font color="#7F007F">5</font>, <font color="#7F007F">0.0</font>, <font color="#7F007F">0.5</font>, <font color="#7F007F">1.0</font>);
+
    // NOTE: the rings only last for 3 seconds.
}
+
    TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, 5, 0.0, 0.5, 1.0);
 +
}
 +
</nwscript>
  
 
====See Also====
 
====See Also====

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