Naev

Module escort

Library for dealing with escorts in missions.

luacheck: globals _escort_spawn _escort_jumpin _escort_jumpout _escort_land _escort_takeoff _escort_failure _escort_e_death _escort_e_land _escort_e_jump _escort_e_attacked(Hook functions passed by name)

Functions

init (ships[, params]) Initializes the library by setting all the necessary hooks.
exit () Cleans up the escort framework when done, eliminating all hooks.
num_alive () Gets the number of escorts that are still alive.
pilots () Gets the list of pilots.
setDest (dest, success[, failure]) Sets the destination of the
spawn (pos) Spawns the escorts at location.


Functions

init (ships[, params])
Initializes the library by setting all the necessary hooks.

Parameters:

  • ships table List of ships to add.
  • params table List of optional parameters. (optional)
exit ()
Cleans up the escort framework when done, eliminating all hooks.
num_alive ()
Gets the number of escorts that are still alive.

Returns:

    number Number of escorts still alive.
pilots ()
Gets the list of pilots.

Returns:

    table Table containing the existing pilots. The first will be the leader.
setDest (dest, success[, failure])
Sets the destination of the

Parameters:

  • dest system or spob Destination of the escorts.
  • success string Name of the global function to call on success.
  • failure string Name of the global function to call on failure. Default will give a vntk message and fail the mission. (optional)
spawn (pos)
Spawns the escorts at location. This can be useful at the beginning if you want them to jump in or take of while in space. It is handled automatically when the player takes off or jumps into a system.

Parameters:

  • pos Vector, Spob or System Position to spawn the fleet at. The argument is directly passed to pilot.add.

Returns:

    table Table of newly created pilots.
generated by LDoc 1.4.6 Last updated 2022-05-26 02:36:04