Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

Fx

Source

class Fx

Source

* * * * * * * * * Fx * * * * * * * * * * * * * * * * * An Fx-Object is basically just a moveable effect. * Up above you find the Fx-Class. By creating * an instace of it, you recieve the mentioned, * moveable effect. * Constructors and functions defined as following, * should be self-explanatory. * Also features automatic recycling of Fx-instances * * Credits to Vexorian, Anitarf *

function flash(string fx)

Source

"flashes" the given effect. Flashing plays the death animation of the effect at the fx's position.

function getColor() returns colorA

Source

Get the color (rgba)

function getDummy() returns unit

Source

Get the dummyunit

function getOwner() returns player

Source

Get the owner of this Fx Object

function getPos2() returns vec2

Source

Get the 2d position

function getPos3() returns vec3

Source

Get the 3d position

function getXYAngle() returns angle

Source

Get the xy angle

function getZ() returns real

Source

Get the z coordinate (fly height)

function getZAngle() returns angle

Source

Get the z angle

function hiddenDestroy()

Source

Destroys the Fx object without showing the effect's death animation Sort of a workaround by setting the position to the top right corner, hopefully not visible.

function setColor(colorA newColor)

Source

Sets the color of the Fx object to the given color Color: 0 = no color - 255 = full color Alpha: 0 = transparent - 255 = visible

function setFx(string newpath)

Source

Set the path to the sfx model that should be displayed. If there is already a model displayed, it will be replaced with the new one.

function setOwner(player p, boolean changeColor)

Source

Set the owner of this Fx Object

function setPlayerColor(playercolor pc)

Source

function setPlayercolor(playercolor c)

Source

Set the playercolor of this Fx Object

function setScale(real value)

Source

Set the scale of this Fx Object

function setXY(vec2 pos)

Source

Set the position to the given xy vector tuple

function setXYAngle(angle value)

Source

Set the xy angle

function setXYAngleInstant(angle value)

Source

Creates a new dummy with the given facing in order to achieve instant turning.

function setXYZ(vec3 pos)

Source

Set the position to the given xyz vector tuple

function setXYZ(vec3 pos, boolean ignoreTerrainHeight)

Source

Set the position to the given xyz vector tuple. It is possible to ignore the terrain height when desired. Use setXYheight when you never need terrain height.

function setZ(real z)

Source

Set the z coordinate (flyHeight)

function setZAngle(angle zangle)

Source

Set the z angle in radians