Difference between revisions of "Shape"

From NWN Lexicon
Jump to: navigation, search
(See Also)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=SHAPE_* Constant Group=
 
=SHAPE_* Constant Group=
  
SHAPE_* constants are used in the GetFirstObjectInShape() and GetNextObjectInShape() functions.
+
SHAPE_* constants are used in the [[GetFirstObjectInShape]]() and [[GetNextObjectInShape]]() functions.
 
 
<br /><br />
 
  
 
===Constants===
 
===Constants===
  
 
+
fSize Value relates directly to the value put into [[GetFirstObjectInShape]] and taken from that description.
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
 
! width="25%" | Constant
 
! width="25%" | Constant
 
! width="10%" | Value
 
! width="10%" | Value
 +
! fSize Value
 
! Description
 
! Description
 
|-
 
|-
 
| valign="top" | SHAPE_CONE
 
| valign="top" | SHAPE_CONE
 
| 1
 
| 1
|
+
| fSize is the widest radius of the cone
 +
|  
 
{| style="border: 0" width="100%"
 
{| style="border: 0" width="100%"
| style="border: 0" width="99%" valign="top" | A cone. The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are unknown. Their constant values are, however, definitely different. SHAPE_CONE is used in only one spell script: nw_s1_krenscare.nss.
+
| style="border: 0" width="99%" valign="top" | A cone. The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are unknown; it's rarely used, only really used for one main ability SPELLABILITY_KRENSHAR_SCARE - nw_s1_krenscare.nss (as well as a few like Gem Spray, Wod of Wonder and Butterflies item spell effects).
  
 
Note: This may be buggy. It is suggested you don't use this.
 
Note: This may be buggy. It is suggested you don't use this.
Line 25: Line 25:
 
| valign="top" | SHAPE_CUBE
 
| valign="top" | SHAPE_CUBE
 
| 2
 
| 2
 +
| fSize is half the length of one of the sides of the cube
 
|
 
|
 
{| style="border: 0" width="100%"
 
{| style="border: 0" width="100%"
Line 32: Line 33:
 
| valign="top" | SHAPE_SPELLCONE
 
| valign="top" | SHAPE_SPELLCONE
 
| 3
 
| 3
 +
| fSize is the length of the cone in the direction of lTarget. Spell cones are always 60 degrees with the origin at OBJECT_SELF.
 
|
 
|
 
{| style="border: 0" width="100%"
 
{| style="border: 0" width="100%"
| style="border: 0" width="99%" valign="top" | Presumably, a cone. The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are unknown. Their constant values are, however, definitely different. This is used by 99% of normal spells.
+
| style="border: 0" width="99%" valign="top" | A more reliable cone. 60 degrees is a solid amount of "width". The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are not fully. This is used by 99% of normal spells, eg; SPELL_BURNING_HANDS - nw_s0_burnhand.nss
 
|}
 
|}
 
|-
 
|-
 
| valign="top" | SHAPE_SPELLCYLINDER
 
| valign="top" | SHAPE_SPELLCYLINDER
 
| 0
 
| 0
 +
| fSize is the length of the cylinder. Spell Cylinder's always have a radius of 1.5m.
 
|
 
|
 
{| style="border: 0" width="100%"
 
{| style="border: 0" width="100%"
| style="border: 0" width="99%" valign="top" | A cylinder.
+
| style="border: 0" width="99%" valign="top" | A cylinder, eg; SPELL_LIGHTNING_BOLT - nw_s0_lghtnbolt.nss
 
|}
 
|}
 
|-
 
|-
 
| valign="top" | SHAPE_SPHERE
 
| valign="top" | SHAPE_SPHERE
 
| 4
 
| 4
 +
| fSize is the radius of the sphere
 
|
 
|
 
{| style="border: 0" width="100%"
 
{| style="border: 0" width="100%"
| style="border: 0" width="99%" valign="top" | A sphere.
+
| style="border: 0" width="99%" valign="top" | A sphere. eg; SPELL_FIREBALL - nw_s0_fireball.nss
 
|}
 
|}
 
|}
 
|}
Line 59: Line 63:
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
|
 
|
[[GetNextObjectInShape | GetNextObjectInShape ]]
+
[[GetFirstObjectInShape]] [[GetNextObjectInShape]]
 
|}
 
|}
  
 
----
 
----
 
[[Category:Constants]]
 
[[Category:Constants]]

Latest revision as of 00:06, 27 June 2020

SHAPE_* Constant Group

SHAPE_* constants are used in the GetFirstObjectInShape() and GetNextObjectInShape() functions.

Constants

fSize Value relates directly to the value put into GetFirstObjectInShape and taken from that description.

Constant Value fSize Value Description
SHAPE_CONE 1 fSize is the widest radius of the cone
A cone. The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are unknown; it's rarely used, only really used for one main ability SPELLABILITY_KRENSHAR_SCARE - nw_s1_krenscare.nss (as well as a few like Gem Spray, Wod of Wonder and Butterflies item spell effects).

Note: This may be buggy. It is suggested you don't use this.

SHAPE_CUBE 2 fSize is half the length of one of the sides of the cube
A cube.
SHAPE_SPELLCONE 3 fSize is the length of the cone in the direction of lTarget. Spell cones are always 60 degrees with the origin at OBJECT_SELF.
A more reliable cone. 60 degrees is a solid amount of "width". The difference(s) between SHAPE_CONE and SHAPE_SPELLCONE are not fully. This is used by 99% of normal spells, eg; SPELL_BURNING_HANDS - nw_s0_burnhand.nss
SHAPE_SPELLCYLINDER 0 fSize is the length of the cylinder. Spell Cylinder's always have a radius of 1.5m.
A cylinder, eg; SPELL_LIGHTNING_BOLT - nw_s0_lghtnbolt.nss
SHAPE_SPHERE 4 fSize is the radius of the sphere
A sphere. eg; SPELL_FIREBALL - nw_s0_fireball.nss


See Also

functions: 

GetFirstObjectInShape GetNextObjectInShape