Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:Gets the index of the current waypoint for the group.

The "current" index of the one a group is approaching.

The returned index corresponds to the WP element in the waypoints, e.g. [[EAST 1-1-A,0],[EAST 1-1-A,1],[EAST 1-1-A,2]]and can be read via
_wp = (waypoints myGroup) select (waypointCurrent myGroup)

When the last waypoint has been reached, the index returned is one higher than the last existing waypoint (e.g. if there are 3 waypoints, a 2 is returned when approaching the last waypoint. Once that WP has been reached, a 3 is returned-an index that does NOT exist in the returned waypoints array!)

If a group does not have any waypoints, or has not yet finished the first one, then 1 is returned.

Syntax

Syntax:waypointCurrent grp
Parameters:
Return Value:Number

Examples

Examples:
_wp = waypointCurrent groupOne

Additional Information

See also: setCurrentWaypoint, waypoints
Multiplayer: 
Problems: 

Notes