NavRoute: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
Mick (talk | contribs)
Mick (talk | contribs)
Line 188: Line 188:
=== SetFinalDestination ===
=== SetFinalDestination ===
'''Definition:'''<br>
'''Definition:'''<br>
SetFinalDestination() -> ?
SetFinalDestination(int destination) -> nil
<br><br>
<br><br>
'''Description:''' <br>
'''Description:''' <br>
 
Plot navroute to specified sector.
<br><br>
<br><br>
'''Arguments:''' <br>
'''Arguments:''' <br>
?
''destination'' - [[sectorid]] of destination sector.
<br><br>
'''Returns:''' <br>
?
<br><br>
<br><br>
'''Example:'''
'''Example:'''
<br><br>
<br>
 
<source lang="lua">
 
NavRoute.SetFinalDestination(SectorIDFromLocationStr'Dau A1')
</source>


=== SetFullRoute ===
=== SetFullRoute ===

Revision as of 23:34, 22 April 2009

Functions

add

Definition:
add() -> ?

Description:



Arguments:
?

Returns:
?

Example:


addbyid

Definition:
addbyid(int sectorid) -> true

Description:
Add a waypoint to the navigation route.
sectorid equal or lower than 0 generates an error.

Arguments:
sectorid - sector to plot a route to

Returns:
Seems to always return true.

Example: <source lang="lua"> local sectorid = SectorIDFromLocationStr("Bractus C-5") NavRoute.addbyid(sectorid) </source>


clear

Definition:
clear() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetCurrentRoute

Definition:
GetCurrentRoute() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetFinalDestination

Definition:
GetFinalDestination() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetNextHop

Definition:
GetNextHop() -> ?

Description:



Arguments:
?

Returns:
?

Example:


list

Definition:
list() -> ?

Description:



Arguments:
?

Returns:
?

Example:


load

Definition:
load() -> ?

Description:



Arguments:
?

Returns:
?

Example:


OnEvent

Definition:
OnEvent() -> ?

Description:



Arguments:
?

Returns:
?

Example:


save

Definition:
save() -> ?

Description:



Arguments:
?

Returns:
?

Example:


SetFinalDestination

Definition:
SetFinalDestination(int destination) -> nil

Description:
Plot navroute to specified sector.

Arguments:
destination - sectorid of destination sector.

Example:
<source lang="lua"> NavRoute.SetFinalDestination(SectorIDFromLocationStr'Dau A1') </source>

SetFullRoute

Definition:
SetFullRoute(table route) -> nil

Description:
Set the navigation route by specifying all it's points.

Arguments:
route - list containing sectorid's describing the navroute.
Calling it with arguments of wrong type (not table) causes Lua errors that cripple the HUD.

Example: <source lang="lua"> local sectorid = SectorIDFromLocationStr("Bractus C-5") NavRoute.SetFullRoute({sectorid, sectorid+1, 1234}) </source>

undo

Definition:
undo() -> ?

Description:



Arguments:
?

Returns:
?

Example: