Cabal Common Library Doc Overlay

From Elite Wiki
Revision as of 17:00, 24 October 2012 by Svengali (talk | contribs) (started doc for overlay script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

This is the main class for the overlay helpers with its members and part of the Cabal_Common_Library.

It handles 19 slots for inflight overlays (10x characters, 9x notifications) and uses shaders to place them on screen and works in a similiar way to the overlays in Vector (this OXP will be changed to use this mechanism).


Methods

ovAdd()

worldScripts.Cabal_Common_Overlay.ovAdd( obj, off )

Adds overlay to one of the available slots. Added overlays will stay inflight until the calling script explicitely removes them, the VisualEffect becomes invalid or the autoremove option is used. All overlays will be removed when the player docks or leaves the system, but are respawned (offscreen) when the player launches or enters a new system. The script does not store anything to the savedgame though, so scripts are responsible to add them if necessary.

Parameters:

obj
Object. Properties see below.
off
Boolean. If true overlay is added, but offscreen.

Returns:

result
VisualEffect or false.

Properties:

cclov_id
String. Unique Identifier.
cclov_type
Number. 0=Notification, 1=Character.
cclov_blend
Number. Duration for effect in seconds. Set to -1 for permanent.
cclov_autoremove
Boolean. Removes effect after cclov_blend seconds.
cclov_fx
String. VisualEffect to be used instead.
cclov_png
String/Texture. Must be specified if cclov_fx is not used.
cclov_color
Array. Color in rgb. Values should be in range 0...3.


ovSpeak()

worldScripts.Cabal_Common_Overlay.ovSpeak( who, cclov_blend, message, whom, autoremove )

Lights up the overlay.

Parameters:

who
String. Identifier (see ovAdd() - cclov_id).
cclov_blend
Number. Duration for effect in seconds.
message
String.
whom
Entity.
autoremove
Boolean. Removes effect after cclov_blend seconds.

Returns:

result
Boolean. True on success. Otherwise false.


ovRemove()

worldScripts.Cabal_Common_Overlay.ovRemove( who )

Remove specified overlay.

Parameters:

who
String. Identifier (see ovAdd() - cclov_id).

Returns:

result
Boolean. True on success. Otherwise false.