ISKernel:navpoint (Data Type)
Jump to navigation
Jump to search
Contents
- 1 Description
- 2 Members
- 3 Methods
- 4 Returns
- 5 Examples
- 5.1 Retrieve a name of a point by ID#
- 5.2 Check a points connection to another point
- 5.3 Display the nth connection point from given point
- 5.4 Create a bidrection connection between two points
- 5.5 Remove a connection from point A to point B
- 5.6 Create a note for a point
- 5.7 Read a note for a point
- 5.8 Retrieve the location of a point in a world
- 5.9 Set a new position for a given point
- 6 See Also
Description
Members
- float X: X coordinate
- float Y: Y coordinate
- float Z: Z coordinate
- string Name: Name of the navigational point
- bool ConnectsTo[name]: TRUE if the point connects to a specified point
- bool ConnectsFrom[name]: TRUE if the point connects from a specified point
- int Outgoing: Number of outgoing connections from this point
- int Incoming: Number of incoming connections to this point
- navpoint Outgoing[n]: nth point with a connection from this point
- navpoint Incoming[n]: nth point with a connection to this point
- string Note: A user-defined note set with the navigational point
Methods
- SetPosition[#,#,#]: Changes the location of the navigational point
- SetName[name]: Changes the name of the nav point
- Delete: Deletes the nav point
- AddConnection[name]: Adds a connection to a nav point
- AddConnection[name,bidirectional]: Adds a bidirectional connection to a nav point
- DeleteConnection[name]: Deletes a connection to a nav point
- DeleteConnection[name,bidirectional]: Deletes a bidirectional connection to a nav point
- SetNote[note]: Attaches a note to the navigational point
Returns
Examples
Retrieve a name of a point by ID#
- echo Point name: ${Navigation.World[earth].Point[13].Name}
- Output
Point name: Cincinatti
Check a points connection to another point
- echo 13 Connect to 14? ${Navigation.World[earth].Point[13].ConnectsTo[${Navigation.World[earth].Point[14]}]}
- Output
13 connect to 14? TRUE
Display the nth connection point from given point
- echo 1st connection to Point13: ${Navigation.World[earth].Point[13].Outgoing[1]}
- echo 2st connection to Point13: ${Navigation.World[earth].Point[13].Outgoing[2]}
- Output
1st connection to Point13: Columbus 2nd connection to Point13: Chicago
Create a bidrection connection between two points
- Navigation.World[earth].Point[13]:AddConnection[${Navigation.World[earth].Point[15]},bidirectional]
- Navigation.World[earth].Point[13]:AddConnection[Detroit,bidirectional]
Note: These two are functionally the same
Remove a connection from point A to point B
- Navigation.World[earth].Point[13]:RemoveConnection[Detroit]
Note: Now Cincinatti no longer connects to detroit, but detroit still connects to cincinatti
Create a note for a point
- Navigation.World[earth].Point[15]:SetNote[MCC Poker room is better than Greektown]
Read a note for a point
- echo Note: ${Navigation.World[earth].Point[15].Note}
- Output
Note: MCC Poker room is better than Greektown
Retrieve the location of a point in a world
- echo X: ${Navigation.World[earth].Point[Michigan].X} Y: ${Navigation.World[earth].Point[Michigan].Y}
- Output
X: -341.77 Y: -2743.61
Set a new position for a given point
- Navigation.World[earth].Point[13]:SetPosition[1234,291,-213]