NWN2 Scripting.




Simulation Training.

Introduction
Home
First Program
Seeing Results
Variables and Data Types
Comments
Functions
Data Conversion
Random Numbers
Concatenation
Arithmetic Operators
Compound Assignments
One More or Less
Precedence
Relational Operators
The Open Branch
The Closed Branch
Logical AND
Logical OR
Compound Statements
ELSE If
Switch Case
The ? Operator
The for Loop
The while Loop
The do while Loop
Introduction to Functions
Passing Values
Passing Multiple Values
Multiple Functions
Simplifying Functions
TRUE/fALSE Conditions
Return Values
Setting Global Variables
Getting Global Variables
Setting Local Variables
Getting Local Variables
WayPoints Introduction
Static Waypoint Sets
Dynamic Waypoint Sets
Dynamic WP Cycles
Input Output

WayPoints Introduction

NWN2 Waypoints offer a unique opportunity to give life-life characteristics to NPCS. In a village or town setting, for example, friendly NPCS as village and town folk, can be made to walk about and preform various actiosn as if they were real people going about their daily buisness. This section introduces the use of NWN2 Waypoints along with necessary scripting to help create such realisitc envrionment.


WayPoint Sets

Static Sets

A Static Waypoint Set is a numerical sequence of a series of NWN2 Waypoints connected to each other by a common Identifier for the purpose of providing a pathway for oen or more NPCS to traverse. The common Identiier for each Waypoint in the Static Waypoint Set is any String identifier.


Dynamic Sets

A Dynamic Waypoint Set is a series of NWN2 Waypoints connected to each other through Scripting. The Dynamic Waypoint Set may be any series of Waypoints including one or more Waypoints form a pre-defined Static Waypoint Set.


Waypoint Cycles

Static Cycles

A Static Waypoint Cycle is a pre-defined Set of Waypoints, either Static Waypoints or Dynamic Waypoints where the tranversal of the Set is always the same sequence of Waypoints.

Dynamic Cycles

A DynamicWaypoint Cycle may or may not consist of any pre-defined Sets of Waypoints either Static or Dynamic ehre the transveral paths are completly determined through Scripting.


What Waypoints can do

  • NWN2 Waypoints can be assigned as Sets where each Set consists of a series of interconnected and ordered waypoints called a Waypoint Set.
  • NWN2 Waypoint Sets can be either Static or Dynamic or a combination of Static and Dynamic.
  • NWN2 Waypoints which are Seted (grouped) can be used as pathways for NPCs to travel in a predefined and designated or random order.
  • NWN2 Waypoints are normally transveresed by NpCs from the lowest numbered Waypoint to the highest numbered Waypoint and then back again from the highest numbered to the lowest numbered in what is called a Waypoint Cycle.
  • NWN2 Waypoint Cycles may be either Static or Dynamic or a combination of both.
  • NWN2 Waypoints can serve as trigger for specific or random actions by NPs when a Waypoint within the Waypoint Set is reached by the NPC.
  • NWN2 Waypoints can, with proper scripting, be randomly ordered so that NPCs do not transverse the Waypoints in the Waypoint Set in the same order.
  • NWN2 Waypoints can, with proper scripting, be randomly assigned so that NPCs may skip one or more of the Waypoints in teh Waypoint Set through each Waypoint Cycle.
  • NWN2 Waypoints as Waypoint Sets can be assigned to any number of NPCs so that one or more NPCs are using the saem Waypoint Set while other NPCs are using different Waypoint Sets.
  • NWN2 Waypoints when used in a dynamic Scripting environment can completly modify the interactiosn of NPCs, Waypoint Sets, and Waypoint Cycles, acording to actions and events within the simulation.
  • NWN2 Waypoints, whenproperly used, cna make any Set of NPCs dynamic and life-like, adding a greater degree of realism to any NwN2 simulation.


Where do we go from here?

The next section introduces the creation of Static Waypoint Sets.


 

Nwn2Scripting provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 2008 by Adamson House, Ltd. All Rights Reserved.

Questions or Comments: EMail Webmaster

Donations are to Adamson House, Ltd who maintains this site.
All donations go the the improvement of this site.