Effect

Handle Wrappers View source
Effect

Change the orientation of the special effect. yaw : z-axis pitch: y-axis roll : x-axis

Source on GitHub

Functions

flashEffect

public function flashEffect(string path, vec3 pos)

flashEffect

public function flashEffect(string path, vec2 pos)

flashEffect

public function flashEffect(string path, vec2 pos, real scale)

flashEffect

public function flashEffect(string path, vec3 pos, real scale)

flashEffect

public function flashEffect(string path, vec2 pos, real scale, angle yaw)

flashEffect

public function flashEffect(string path, vec3 pos, real scale, angle yaw)

flashEffect

public function flashEffect(string path, widget target, string attachPointName)

flashEffect

public function flashEffect(int abilityId, effecttype effType, vec3 pos)

Creates and immediatly destroys an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

flashEffect

public function flashEffect(int abilityId, effecttype effType, vec2 pos)

Creates and immediatly destroys an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j) Works for custom abilities.

flashEffect

public function flashEffect(int abilityId, effecttype effType, widget target, string attachPointName)

Creates and immediatly destroys an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

addEffect

public function addEffect(string path, vec2 pos) returns effect

addEffect

public function addEffect(string path, vec3 pos) returns effect

addEffect

public function addEffect(string path, widget target, string attachPointName) returns effect

addEffect

public function addEffect(int abilityId, effecttype effType, vec2 pos) returns effect

Creates an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

addEffect

public function addEffect(int abilityId, effecttype effType, vec3 pos) returns effect

Creates an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

addEffect

public function addEffect(int abilityId, effecttype effType, widget target, string attachPointName) returns effect

Creates an effect from the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

getAbilityEffect

public function getAbilityEffect(int abilityId, effecttype effType, int index) returns string

Returns the data defined in the ability’s field “Art - Caster/Target/Missile/Ligtning/etc.” (full list in common.j). Works for custom abilities.

Extension Functions

effect.destr

public function effect.destr()

effect.setColorByPlayer

public function effect.setColorByPlayer(player whichPlayer)

effect.setColor

public function effect.setColor(int r, int g, int b)

effect.setAlpha

public function effect.setAlpha(int alpha)

effect.setScale

public function effect.setScale(real scale)

effect.setPosition

public function effect.setPosition(real x, real y, real z)

effect.setHeight

public function effect.setHeight(real height)

effect.setTimeScale

public function effect.setTimeScale(real timeScale)

effect.setTime

public function effect.setTime(real time)

effect.setOrientation

public function effect.setOrientation(real yaw, real pitch, real roll)

effect.setOrientation

public function effect.setOrientation(mat3 matrix)

effect.setOrientation

public function effect.setOrientation(quat quaternion)

effect.setYaw

public function effect.setYaw(real yaw)

effect.setPitch

public function effect.setPitch(real pitch)

effect.setRoll

public function effect.setRoll(real roll)

effect.setX

public function effect.setX(real x)

effect.setY

public function effect.setY(real y)

effect.setZ

public function effect.setZ(real z)

effect.setPositionLoc

public function effect.setPositionLoc(location loc)

effect.getLocalX

public function effect.getLocalX() returns real

effect.getLocalY

public function effect.getLocalY() returns real

effect.getLocalZ

public function effect.getLocalZ() returns real

effect.setPos

public function effect.setPos(vec3 pos)

effect.setPos

public function effect.setPos(vec2 pos)

effect.getPos3

public function effect.getPos3() returns vec3

effect.getPos

public function effect.getPos() returns vec2

effect.setColor

public function effect.setColor(color color)

effect.setColor

public function effect.setColor(colorA color)

effect.setOrientation

public function effect.setOrientation(angle yaw, angle pitch, angle roll)

effect.setYaw

public function effect.setYaw(angle yaw)

Change the angle of the special effect around the z-axis. This is like changing a unit’s facing.

effect.setPitch

public function effect.setPitch(angle pitch)

Change the of the special effect around the y-axis. Warning: As of 1.29.2, setPitch has issues for values between 1.57-4.7 radians or 90-270 degrees. It is recommended to use setOrientation.

effect.setRoll

public function effect.setRoll(angle roll)

Change the angle of the special effect around x-axis.

effect.playAnimation

public function effect.playAnimation(animtype whichAnim)

Plays an animation such as birth/death/stand/etc. defined in constants ANIM_TYPE_BIRTH/ANIM_TYPE_DEATH/ANIM_TYPE_STAND/etc. (full list in common.j).

effect.playAnimation

public function effect.playAnimation(animtype whichAnim, real timeScale)

Plays an animation such as birth/death/stand/etc. defined in constants ANIM_TYPE_BIRTH/ANIM_TYPE_DEATH/ANIM_TYPE_STAND/etc. (full list in common.j).

animtype.getName

public function animtype.getName() returns string

Returns the name of the animation type.

effect.addSubAnimation

public function effect.addSubAnimation(subanimtype whichSubAnim)

effect.clearSubAnimations

public function effect.clearSubAnimations()

effect.removeSubAnimation

public function effect.removeSubAnimation(subanimtype whichSubAnim)

effect.getScale

public function effect.getScale() returns real

Get effect scale.

effect.setScale

public function effect.setScale(vec3 scaleVector)

Set effect 3D scale

effect.resetScale

public function effect.resetScale()

Reset effect scale.