Avorion Script API Documentation

TorpedoLauncher

function TorpedoLauncher(var id)

Parameters

id The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context

Returns

A new instance of TorpedoLauncher

property Entity entity[read-only]
property uuid entityId[read-only]
property float freeStorage[read-only]
property float maximumStorage[read-only]
property int maxShafts[read-only]
property unsigned int numShafts[read-only]
property unsigned int numTorpedoes[read-only]
property float occupiedStorage[read-only]

function bool addTorpedo(TorpedoTemplate torpedo, var shaft)

function var clear()

Returns

nothing

function Entity createTorpedo(Box position, TorpedoTemplate torpedo)

function unsigned int getFreeSlots(var shaftIndex)

function unsigned int getMaxTorpedoes(var shaftIndex)

function unsigned int getNumTorpedoes(int shaftIndex)

function unsigned int... getShafts()

function TorpedoTemplate getTorpedo(int torpedoIndex, int shaftIndex)

Accesses a torpedo in a specific shaft.

Parameters

torpedoIndex
shaftIndex, -1 for torpedo storage

Returns

The torpedo, if found. nil otherwise.

function var moveTorpedoToShaft(var shaftIndex, int torpedoIndex, var newShaftIndex)

Returns

nothing

function var removeTorpedo(int index, var shaft)

Returns

nothing

Overview
Home Functions Search
Search:

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.7 c8e4beec84f7