| 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 |
Getting Global VariablesIn the previous session you saw hwo to assign values to NWN2 GLobal Variables. In this session you will see how to get the values from previously declared and defined NWN2 Global Variables.
NWN2 Global Variables General Form To get a value from a previously ldeclared and assigned NWN2 Global Variable: GetGLobalType("Identifier"); Where:
NWN2 Global Variable Examples: The following program illustrates examples of getting values from previously declared and assigned NWN2 Global Vaiables with the three different allos NWN2 Global Variable data types.
Explanation: For the GetGlobalInt()
For the GetGlobalFloat()
For the GetGlobalString()
Where do we go from here? The next section introduces NWN2 Local Variables.
|
|