Avorion Script API Documentation

Turret

function Turret(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 Turret

property bool activated
property int attachedBlock
property bool automatic
property bool coaxial
property bool craftPlayerPiloted[read-only]
property float damageMultiplier[read-only]
property bool enabledByAI[read-only]
property bool favorite
property int group
property bool horizontalRotation[read-only]
property Matrix localPosition[read-only]
property bool lookingAtTarget[read-only]
property bool rigin[read-only]
property bool selected
property uuid shootingCraft[read-only]
property int shootingFaction[read-only]
property uuid shotCollisionException[read-only]
property float size[read-only]
property uuid targetedObject[read-only]
property float templateSize
property bool trash
property float turningSpeed
property int usedSlots
property bool verticalRotation[read-only]
property bool weaponsPlayerControlled[read-only]

function var consumeEnergyForShot(double amount)

Returns

nothing

function vec3 getCurrentVelocity()

function Matrix getLookingPosition()

function bool hasEnergyForShot(double amount)

function var setOrientation(float rotationVertical, float rotationHorizontal, bool lookingAtTarget)

Returns

nothing

function bool shootingVectorOk(var ray)

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