Avorion Script API Documentation

Shield

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

property float creationDurabilityFactor[write-only]
property double damageFactor
property float deactivationFactor[read-only]
property float deactivationTime[read-only]
property double durability
property Entity entity[read-only]
property uuid entityId[read-only]
property float filledPercentage[read-only]
property bool immuneToDeactivation
property bool impenetrable
property bool invincible
property double maxDurabilityFactor
property double maximum
property float rechargeTime[read-only]
property float timeUntilRechargeAfterDepletion[read-only]
property float timeUntilRechargeAfterHit[read-only]

function var changeDurability(double amount)

Returns

nothing

function double getMaxDurability(bool withUpgrades)

Returns max durability of the shield

Parameters

withUpgrades if true, upgrade effects will be included in the result

function var, var getResistance()

function var healDamage(double amount)

Returns

nothing

function var inflictDamage(double amount, var damageSource, var damageType, vec3 location, Uuid inflictorId)

Returns

nothing

function pair intersectGlobalRay(Ray ray, vec3 location)

function bool intersectGlobalSphere(Sphere sphere)

function pair intersectLocalRay(Ray ray, vec3 location)

function bool intersectLocalSphere(Sphere sphere)

function bool isActive()

Returns whether entity has a shield, the durability is above 0 and it isn't currently deactivated

function bool isInside(vec3 point)

Check if the given point is inside the shield's outer boundaries

function var resetResistance()

Returns

nothing

function var setResistance(var damageType, float factor)

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