Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN2 SCRIPTS

- Jump to comments -
Name  Vector Library v1.02
Author  Clement Poh
Submitted / Updated  11-28-2006 / 12-04-2006
Category  Area
Type  Type - Other
Format  Code Only
Patch  1.02
Description
A basic library for vectors. Vector library per se might be a misnomer because the point of the library was so that one doesn't need to fiddle around with vectors, just that vectors are used internally. However the library does come with in built functions for things like dot and cross products in the case the user wants to work at a lower level. More for proof of concept than anything else.

Update History: 04/12/06 - v1.02:
- Added short demonstration module, more strange functions can be found in the module, so please check it out.
- Changed the way family of LocAtAngleTo* functions work. the angle of 0.0 degrees is the facing of the reference location or object.
- Added slightly more abstraction.

Notes:
Generally, a vector has a magnitude, and a direction. In the case of NWN2, vectors are used to represent positions in an area. these vectors consist of three parts, the x, y and z coordinates because NWN2 Areas are three dimensional.

Uses:
Because vectors are so abstract, they're useful to find locations relative to other objects or locations.
e.g. LocInFrontOfObj(oPC, 5.0);
would return a *Location* (not vector) 5.0 units in front of the PC.

therefore you can use it in the context:
ActionJumpToLocation(LocBehindObj(oPC, 5.0));
And the action subject will teleport 5.0 units behind the PC.

Files

NameTypeSizeDownloads
vectors_1.02.erfvectors_1.02.erf
Submitted: 11-28-2006 / Last Updated: 12-03-2006
erf11.5Kb183
Library itself.
Vector_Library_Demonstration.modVector_Library_Demonstration.mod
Submitted: 11-28-2006 / Last Updated: 12-03-2006
mod6.1Mb200
Demonstration Module.
SCORE OUT OF 10
10
2 votes
View Stats
Cast Your Vote!
Voting FAQ

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (6):

Posted by kamal at 2012-10-15 18:11:11    Voted 10.00 on 10/15/12
Makes vector math so much simpler...
_________________________
Shadow Thief: Crimmor and Path of Evil blog Link

Posted by SillyCrazy at 2009-07-19 18:26:02    Voted 10.00 on 07/19/09
Excellent work! Just what I needed! Registered just to express my thanks.

10+

Posted by DonC at 2006-12-01 18:52:16    
This was true for NWN too. Computationally, I guess it is all based on the origin point of the current area. Likewise, all the models are cartesian based, and that is probably the easiest way to render them in the engine.

It is just a personal gripe of mine... I believe area of effect in NWN was calculated just on the x-y plane. For NWN that was OK, since the altitude changes of the terrain were pretty small, but not true w/ NWN2, like in Highcliff.

It has been a hang-up since DOOM , where you could chain-saw down a monster at the top of a 6 story lift when you were down at the bottom.

Posted by mercifulhop at 2006-12-01 01:39:30    
I'm just trying to build on to what NWN2 has already, where its vector definitions are in cartesian form already.

Posted by DonC at 2006-11-30 19:58:54    
Shouldn't a 3D vector be described as an azimuth (degrees or radians from North), an elevation (degrees up or down from level) and a distance (a.k.a. magnitude)?
Particularly for spell effects and ranged weapons, that is an easier implementation than cartesian coordinates, where the magnitude is Sqrt(X^2+Y^2+Z^2) (although NWScripts can do the math).

Posted by Anda at 2006-11-29 08:29:04    
For us NoobS, what's a 3d vector do in nwn2, or moreover what can we use this for?
_________________________
I see repented people

You must be Logged In to post comments in this section.

10 - A Masterpiece, Genuinely Groundbreaking
9 - Outstanding, a Must Have
8 - Excellent, Recommended to Anyone
7 - Very Good, Deserves a Look
6 - Good, Qualified Recommendation
5 - Fair, Solid yet Unremarkable
4 - Some Merit, Requires Improvements
3 - Poor Execution, Potential Unrealized
2 - Very Little Appeal
1 - Not Recommended to Anyone

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 UI


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters