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 | ...")
 
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.
  
 +
<nwscript>
 
  [[void | void ]] TLVFXPillar(
 
  [[void | void ]] TLVFXPillar(
 
     [[int | int ]] nVFX,
 
     [[int | int ]] nVFX,
Line 13: Line 14:
 
     [[float | float ]] fStepSize = -2.0f
 
     [[float | 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>
 +
// 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.</font>
+
  // 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>
+
     // Locate the waypoint that indicates where the vfx pillar should appear.
     <font color="#0000FF">object</font> oPillar = GetWaypointByTag(<font color="#00007F">"wp_pillar_loc"</font>);
+
     object oPillar = GetWaypointByTag("wp_pillar_loc");
     <font color="#0000FF">location</font> lPillar = GetLocation(oPillar);
+
     location lPillar = GetLocation(oPillar);
 
   
 
   
     <font color="#007F00">// Create a vertical pillar of five blue/white rings with the first ring</font>
+
     // Create a vertical pillar of five blue/white rings with the first ring
     <font color="#007F00">// 0.5m above the ground and the subsequent rings 1m above each other.</font>
+
     // 0.5m above the ground and the subsequent rings 1m above each other.
     <font color="#007F00">// NOTE: the rings only last for 3 seconds.</font>
+
     // NOTE: the rings only last for 3 seconds.
     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>);
+
     TLVFXPillar(VFX_DUR_SPELLTURNING, lPillar, 5, 0.0, 0.5, 1.0);
 
  }
 
  }
 +
</nwscript>
  
 
====See Also====
 
====See Also====

Revision as of 22:03, 25 August 2012


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

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

 [[void | void ]] TLVFXPillar(
     [[int | int ]] nVFX,
     [[location | location ]] lStart,
     [[int | int ]] nIterations = 3,
     [[float | float ]] fDelay = 0.1f,
     [[float | float ]] fZOffset = 6.0f,
     [[float | 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