Skip to content

class Way (server-side)

Available since version: 0.1.4

This class represents Way constructed from waypoints.

Constructor

Way(string world, string startWp, string endWp)

Parameters:

  • string world: the name of the world from config.xml.
  • string startWp: the name of the start waypoint.
  • string endWp: the name of the end waypoint.

Properties

string start (read-only)

Represents the start waypoint for Way.


string end (read-only)

Represents the end waypoint for Way.


Methods

getWaypoints

This method will get the all waypoints between startWp & endWp.

[wpName...] getWaypoints()

Returns [wpName...]:

the array containing the names of all of the Way waypoints.


getCountWaypoints

This method will get the number of waypoints between start waypoint & end waypoint.

int getCountWaypoints()

Returns int:

the number of waypoints.