Function BlzCreateUnitWithSkin

  • Creates a unit with the model from the unit referenced by the skinId. BlzCreateUnitWithSkin(players[0], 'hpea', 0, 0, 270, 'hfoo') will create a peasant with a footman model. Scale from the unit referenced by the skinId is applied to whichUnit. SoundSet from the unit referenced by the skinId is applied to whichUnit.

    Parameters

    • id: Player<PlayerEventMap>

      The owner of the unit.

    • unitid: number

      The rawcode of the unit.

    • x: number

      The x-coordinate of the unit.

    • y: number

      The y-coordinate of the unit.

    • face: number

      Unit facing in degrees.

    • skinId: number

      The function will apply the skinId model to the unit created.

    Returns Unit

    Patch

    1.32

Generated using TypeDoc