GetWaypointByTag

From NWN Lexicon



Contents

[edit] GetWaypointByTag(string)

Get the first waypoint with a specified tag.

object GetWaypointByTag(
    string sWaypointTag
);

[edit] Parameters

sWaypointTag

Tag of waypoint.


[edit] Description

Returns, as an object, the first waypoint with the tag sWaypointTag.
Returns OBJECT_INVALID if the waypoint cannot be found.



[edit] Version

1.22

[edit] Example

// Attached to OnClick event of a trigger. Sends clicker to
// destination defined by waypoint WP_Destination.
 
void main()
{
  object oClicker = GetClickingObject();
  object oTarget = GetWaypointByTag("WP_Destination");
  location lDest = GetLocation(oTarget);
 
  AssignCommand(oClicker, ActionJumpToLocation(lDest));
}

[edit] See Also



 author: Kristian Markon, editor: Jeremy Spilinek
 

Personal tools
Categories