CreateDestructable

Parameters
objectidinteger

The rawcode of the destructable to be created.

xreal

The map x-coordinate of the destructable.

yreal

The map y-coordinate of the destructable.

facereal

Rotation, destructable facing in degrees.

  • 0 = East
  • 90 = North
  • 180 = West
  • 270 = South
  • -90 = South (wraps around)
scalereal

The X-Y-Z scaling value of the destructable.

variationinteger

The integer representing the variation of the destructable to be created.

comment

Creates a destructable on the ground at the coordinates ( x, y ).

Returns handle to created destructable, or null on failure.

note

When no longer needed, use RemoveDestructable to remove it from the game and avoid leaks (remember to null local variables in Jass).

note

Example:

call CreateDestructable('LTbr', 96, 0, 180, 1, 0) // Jass
myDestr = CreateDestructable(FourCC("LTbr"), 96, 0, 180, 1, 0) -- Lua
note

Map position of destructables with pathing texture is grid-aligned by 32.

patch

1.00

Source
common.j (suggest an edit or discuss on Github)
return type
destructable
Source code
native          CreateDestructable          takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable