Difference between revisions of "GetLocation"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Generated by Sunjammer's Dragon Age Script Paser)
 
m (Examples: replaced non-example with an acutal example)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Generated}}
 
 
{{dafunction
 
{{dafunction
 
|name=GetLocation
 
|name=GetLocation
Line 20: Line 19:
 
<!-- This section contains additional comments, observations and known issues. -->
 
<!-- This section contains additional comments, observations and known issues. -->
  
<!-- == Examples == -->
+
== Examples ==
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->
 +
<dascript>void main()
 +
{   
 +
    // get a location from a waypoint with a unique tag
 +
    object oWaypoint = GetObjectByTag("wp_werewolf_spawn");
 +
    location lWaypoint = GetLocation(oWaypoint);
 +
                 
 +
    // create a werewolf object at the location
 +
    object oWerewolf = CreateObject(OBJECT_TYPE_CREATURE, R"werewolf_core.utc", lWaypoint);
 +
}</dascript>
  
 
== See also ==
 
== See also ==

Latest revision as of 11:58, 13 November 2009

Returns the location of the specified object.

location GetLocation(
object oObject
);
Parameters:
oObject
the object to get the location of
Returns:

a valid location on success or invalid location on error

Source:

script.ldf

Description

This function returns the location of the specified object. If an invalid object is specified, then an invalid location will be returned.


Examples

void main()
{     
    // get a location from a waypoint with a unique tag
    object oWaypoint = GetObjectByTag("wp_werewolf_spawn"); 
    location lWaypoint = GetLocation(oWaypoint);
 
    // create a werewolf object at the location
    object oWerewolf = CreateObject(OBJECT_TYPE_CREATURE, R"werewolf_core.utc", lWaypoint);
}

See also

IsLocationValid