Location keyword

From Dragon Age Toolset Wiki
Revision as of 20:19, 30 July 2009 by Sunjammer (Talk | contribs) (Initial layout for dascript types)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Constructor

A constructor is a function that creates an instance of a dascript type.

The constructor for a location is Location

Literals

A literal is a textual representation of a particular value of a type.

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, event or effect:

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

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