Creates a unit of type unitid for player id, facing a certain direction at the provided coordinates. Returns handle to unit.
unitid
id
Example: Create a human footman for first player (red) at map coordinates -30, 0, facing north:
// Jass call CreateUnit(Player(0), 'hfoo', -30, 0, 90) Copy
// Jass call CreateUnit(Player(0), 'hfoo', -30, 0, 90)
-- Lua CreateUnit(Player(0), FourCC("hfoo"), -30, 0, 90) Copy
-- Lua CreateUnit(Player(0), FourCC("hfoo"), -30, 0, 90)
The owner of the unit.
The rawcode of the unit.
The x-coordinate of the unit.
The y-coordinate of the unit.
Unit facing in degrees.
See: bj_UNIT_FACING constant for default facing direction of units in BJ scripts and GUI.
bj_UNIT_FACING
Generated using TypeDoc
Creates a unit of type
unitidfor playerid, facing a certain direction at the provided coordinates. Returns handle to unit.Example: Create a human footman for first player (red) at map coordinates -30, 0, facing north: