#
Class: Destructable#
Hierarchy↳ Destructable
#
Constructors#
constructornew Destructable(objectId: number, x: number, y: number, z: number, face: number, scale: number, varation: number): Destructable
Creates a destructable at the specified coordinates.
#
Parameters:Name | Type | Description |
---|---|---|
objectId | number | The rawcode of the destructable to be created. |
x | number | The x-coordinate of the Destructable. |
y | number | The y-coordinate of the Destructable. |
z | number | The z-coordinate of the Destructable. |
face | number | The facing of the Destructable. |
scale | number | The X-Y-Z scaling value of the Destructable. |
varation | number | The integer representing the variation of the Destructable to be created. |
Returns: Destructable
Defined in: handles/destructable.ts:7
#
Properties#
handle• Readonly
handle: destructable
Defined in: handles/destructable.ts:7
#
Accessors#
idid(): 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
#
invulnerableinvulnerable(): boolean
Returns: boolean
Defined in: handles/destructable.ts:31
invulnerable(flag: boolean): void
#
Parameters:Name | Type |
---|---|
flag | boolean |
Returns: void
Defined in: handles/destructable.ts:27
#
lifelife(): number
Returns: number
Defined in: handles/destructable.ts:35
life(value: number): void
#
Parameters:Name | Type |
---|---|
value | number |
Returns: void
Defined in: handles/destructable.ts:39
#
maxLifemaxLife(): number
Returns: number
Defined in: handles/destructable.ts:43
maxLife(value: number): void
#
Parameters:Name | Type |
---|---|
value | number |
Returns: void
Defined in: handles/destructable.ts:47
#
namename(): string
This will return different values depending on the locale.
Returns: string
Defined in: handles/destructable.ts:54
#
occluderHeightoccluderHeight(): number
Returns: number
Defined in: handles/destructable.ts:58
occluderHeight(value: number): void
#
Parameters:Name | Type |
---|---|
value | number |
Returns: void
Defined in: handles/destructable.ts:62
#
typeIdtypeId(): number
Returns: number
Defined in: handles/destructable.ts:66
#
xx(): number
Returns: number
Defined in: handles/destructable.ts:70
#
yy(): number
Returns: number
Defined in: handles/destructable.ts:74
#
Methods#
destroydestroy(): void
Returns: void
Defined in: handles/destructable.ts:78
#
healheal(life: number, birth: boolean): void
Resurrects a Destructable with the specified hit points.
#
Parameters:Name | Type | Description |
---|---|---|
life | number | The amount of hit points the Destructable will have when it is resurrected. A value of 0, or any value above the Destructable's maximum HP, will give the Destructable its maximum HP (as defined in the object editor). Any value below 0.5 will give the Destructable 0.5 hit points. |
birth | boolean | If true, the Destructable will play its birth animation upon resurrection. |
Returns: void
Defined in: handles/destructable.ts:90
#
killkill(): void
Returns: void
Defined in: handles/destructable.ts:94
#
queueAnimqueueAnim(whichAnimation: string): void
#
Parameters:Name | Type |
---|---|
whichAnimation | string |
Returns: void
Defined in: handles/destructable.ts:98
#
setAnimsetAnim(whichAnimation: string): void
#
Parameters:Name | Type |
---|---|
whichAnimation | string |
Returns: void
Defined in: handles/destructable.ts:102
#
setAnimSpeedsetAnimSpeed(speedFactor: number): void
#
Parameters:Name | Type |
---|---|
speedFactor | number |
Returns: void
Defined in: handles/destructable.ts:106
#
showshow(flag: boolean): void
#
Parameters:Name | Type |
---|---|
flag | boolean |
Returns: void
Defined in: handles/destructable.ts:110
#
fromEventstatic fromEvent(): Destructable
Returns: Destructable
Overrides: Widget
Defined in: handles/destructable.ts:114
#
fromHandlestatic fromHandle(handle: destructable): Destructable
#
Parameters:Name | Type |
---|---|
handle | destructable |
Returns: Destructable
Overrides: Widget
Defined in: handles/destructable.ts:118