Difference between revisions of "Location keyword"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (fixing persistence)
m (Updating links)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
The '''location''' type is a structure which consists of three members: an area [[Object (dascript type)|object]], a position [[Vector (dascript type)|vector]] and a facing [[Float (dascript type)|float]].
+
The '''location''' type is a structure which consists of three members: an area [[Object keyword|object]], a position [[Vector keyword|vector]] and a facing [[Float keyword|float]].
  
 
== Constructor ==
 
== Constructor ==
  
A constructor is a function that creates an instance of a [[DAScript_types|dascript type]].
+
The [[Scripting terminology#constructor|constructor]] for a location is the [[Location]] function.
 
+
The constructor for a location is [[Location]]
+
  
 
== Literals ==
 
== Literals ==
  
A literal is a textual representation of a particular value of a type.
+
There is no [[Scripting terminology#literal|literal]] for a location.
 
+
There is no literal for a location.
+
  
 
== Conversion ==
 
== Conversion ==
Line 53: Line 49:
  
  
[[Category: DAScript types]]
+
[[Category:Keywords]]

Latest revision as of 12:25, 15 August 2011

The location type is a structure which consists of three members: an area object, a position vector and a facing float.

Constructor

The constructor for a location is the Location function.

Literals

There is no literal for a location.

Conversion

There is no explicit or implicit conversion to or from a location.

Persistence

The following functions allow a location to exist outside of the scope of the current script by storing it on an object or event:

The following functions allow a location which exists outside of the scope of the current script to be used in the current script by retrieving it from an object or event:

Examples

void main()
{
    // uninitialised
    location lDefault;
 
    // initialised using the constructor
    location lConstructed = Location(oArea, vPosition, fFacing);
 
    // assigned using the Player's location
    location lAssigned = GetLocation(GetHero());    
}

See Also

GetLocation