Class: Effect#

Hierarchy#

Constructors#

constructor#

new Effect(modelName: string, x: number, y: number): Effect

Creates a special effect.

Parameters:#

NameTypeDescription
modelNamestringThe path of the model that the effect will use.
xnumber
ynumber

Returns: Effect

Defined in: handles/effect.ts:8

new Effect(modelName: string, targetWidget: Widget, attachPointName: string): Effect

Creates a special effect attached to a widget.

Parameters:#

NameTypeDescription
modelNamestringThe path of the model that the effect will use.
targetWidgetWidgetThe widget to attach the effect to.
attachPointNamestringThe attachment point of the widget where the effect will be placed. Attachment points are points in a model that can be referenced to as areas for effects to be attached, whether it be from a spell or this function. If the attachment point does not exist, it will attach the effect to the model's origin.

Returns: Effect

Defined in: handles/effect.ts:15

Properties#

handle#

• Readonly handle: effect

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18


scale#

scale(): number

Returns: number

Defined in: handles/effect.ts:36

scale(scale: number): void

Parameters:#

NameType
scalenumber

Returns: void

Defined in: handles/effect.ts:40


x#

x(): number

Warning: asynchronous

Returns: number

Defined in: handles/effect.ts:47

x(x: number): void

Warning: asynchronous

Parameters:#

NameType
xnumber

Returns: void

Defined in: handles/effect.ts:51


y#

y(): number

Warning: asynchronous

Returns: number

Defined in: handles/effect.ts:58

y(y: number): void

Warning: asynchronous

Parameters:#

NameType
ynumber

Returns: void

Defined in: handles/effect.ts:62


z#

z(): number

Warning: asynchronous

Returns: number

Defined in: handles/effect.ts:69

z(z: number): void

Warning: asynchronous

Parameters:#

NameType
znumber

Returns: void

Defined in: handles/effect.ts:73

Methods#

addSubAnimation#

addSubAnimation(subAnim: subanimtype): void

Parameters:#

NameType
subAnimsubanimtype

Returns: void

Defined in: handles/effect.ts:77


clearSubAnimations#

clearSubAnimations(): void

Returns: void

Defined in: handles/effect.ts:81


destroy#

destroy(): void

Destroy the effect handle. This will play the effect's death animation.

Returns: void

Defined in: handles/effect.ts:88


playAnimation#

playAnimation(animType: animtype): void

Parameters:#

NameType
animTypeanimtype

Returns: void

Defined in: handles/effect.ts:92


playWithTimeScale#

playWithTimeScale(animType: animtype, timeScale: number): void

Parameters:#

NameType
animTypeanimtype
timeScalenumber

Returns: void

Defined in: handles/effect.ts:96


removeSubAnimation#

removeSubAnimation(subAnim: subanimtype): void

Parameters:#

NameType
subAnimsubanimtype

Returns: void

Defined in: handles/effect.ts:100


resetScaleMatrix#

resetScaleMatrix(): void

Returns: void

Defined in: handles/effect.ts:104


setAlpha#

setAlpha(alpha: number): void

Parameters:#

NameType
alphanumber

Returns: void

Defined in: handles/effect.ts:108


setColor#

setColor(red: number, green: number, blue: number): void

Parameters:#

NameType
rednumber
greennumber
bluenumber

Returns: void

Defined in: handles/effect.ts:112


setColorByPlayer#

setColorByPlayer(whichPlayer: MapPlayer): void

Parameters:#

NameType
whichPlayerMapPlayer

Returns: void

Defined in: handles/effect.ts:116


setHeight#

setHeight(height: number): void

Parameters:#

NameType
heightnumber

Returns: void

Defined in: handles/effect.ts:120


setOrientation#

setOrientation(yaw: number, pitch: number, roll: number): void

Parameters:#

NameType
yawnumber
pitchnumber
rollnumber

Returns: void

Defined in: handles/effect.ts:124


setPitch#

setPitch(pitch: number): void

Parameters:#

NameType
pitchnumber

Returns: void

Defined in: handles/effect.ts:128


setPoint#

setPoint(p: Point): void

Parameters:#

NameType
pPoint

Returns: void

Defined in: handles/effect.ts:132


setPosition#

setPosition(x: number, y: number, z: number): void

Parameters:#

NameType
xnumber
ynumber
znumber

Returns: void

Defined in: handles/effect.ts:136


setRoll#

setRoll(roll: number): void

Parameters:#

NameType
rollnumber

Returns: void

Defined in: handles/effect.ts:140


setScaleMatrix#

setScaleMatrix(x: number, y: number, z: number): void

Parameters:#

NameType
xnumber
ynumber
znumber

Returns: void

Defined in: handles/effect.ts:144


setTime#

setTime(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/effect.ts:148


setTimeScale#

setTimeScale(timeScale: number): void

Parameters:#

NameType
timeScalenumber

Returns: void

Defined in: handles/effect.ts:152


setYaw#

setYaw(y: number): void

Parameters:#

NameType
ynumber

Returns: void

Defined in: handles/effect.ts:156


fromHandle#

static fromHandle(handle: effect): Effect

Parameters:#

NameType
handleeffect

Returns: Effect

Defined in: handles/effect.ts:160