Difference between revisions of "ISKernel:navpoint (Data Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
'''navpoint is deprecated and is not supported. There may be bugs in it. Please use [[LavishNav]] instead'''
 +
 
== Description ==
 
== Description ==
 
This data type gives information and control over Navigation Points.
 
This data type gives information and control over Navigation Points.
Line 13: Line 15:
 
*[[ISSession:navpoint (Data Type)|navpoint]] '''Incoming['''n''']''': nth point with a connection to this point
 
*[[ISSession:navpoint (Data Type)|navpoint]] '''Incoming['''n''']''': nth point with a connection to this point
 
*[[DataType:string|string]] '''Note''': A user-defined note set with the navigational point
 
*[[DataType:string|string]] '''Note''': A user-defined note set with the navigational point
 
+
*[[DataType:string|string]] '''Custom['''name''']''': value of the custom setting <name>
 
== Methods ==
 
== Methods ==
 
*'''SetPosition['''#''','''#''','''#''']''': Changes the location of the navigational point
 
*'''SetPosition['''#''','''#''','''#''']''': Changes the location of the navigational point
Line 23: Line 25:
 
*'''DeleteConnection['''name''',bidirectional]''': Deletes a bidirectional 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
 
*'''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 ==
 
== Returns ==
Line 62: Line 67:
 
*Navigation.World[earth].Point[13]:SetPosition[1234,291,-213]
 
*Navigation.World[earth].Point[13]:SetPosition[1234,291,-213]
 
:This command will change Point 13 in world "earth"'s position to 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 ==
 
== See Also ==
 
*[[ISSession:Navigation_System|Navigation_System]]
 
*[[ISSession:Navigation_System|Navigation_System]]
Line 72: Line 80:
 
*[[ISSession:Navigation (Top-Level Object)|Navigation (Top-Level Object)]]
 
*[[ISSession:Navigation (Top-Level Object)|Navigation (Top-Level Object)]]
 
*[[ISSession:NavPath (Top-Level Object)|NavPath (Top-Level Object)]]
 
*[[ISSession:NavPath (Top-Level Object)|NavPath (Top-Level Object)]]
* [[IS:Session#Data_Types|Inner Space Session Data Types]]
+
*[[LavishScript:Data Types|Data Types]]
* [[LavishScript:Data Types|LavishScript Data Types]]
+
*[[IS:Kernel#Data_Types|Kernel Data Types]]
  
  
 
{{DT-Stub}}
 
{{DT-Stub}}
 
[[Category:Inner Space]]
 
[[Category:Inner Space]]
[[Category:Inner Space Session]]
+
[[Category:Inner Space Kernel]]
[[Category:Inner Space Session Data Types]]
+
[[Category:Inner Space Kernel Data Types]]

Latest revision as of 13:53, 10 July 2009

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