ISKernel:navpoint (Data Type)

From Lavish Software Wiki
Jump to navigation Jump to search

navpoint is deprecated and is not supported. There may be bugs in it. Please use LavishNav instead

Description

This data type gives information and control over Navigation Points.

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
  • string Custom[name]: value of the custom setting <name>

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
  • Rename[newname]: Renames a point to <newname>
  • SetCustom[name,value]: Sets a Custom data for this point
  • RemoveCustom[name]: Removes a Custom data

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]
This command will create the note "MCC Poker room is better than Greektown" for point 15 in world "earth"

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]
This command will change Point 13 in world "earth"'s position to 1234,291,-213

Rename a point

  • Navigation.World[earth].Point[France]:Rename["Mike's Kingdom"]

See Also