City17
4 years
creates a unit of type unitid for player id, 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:
See: bj_UNIT_FACING constant for default facing direction of units in BJ scripts and GUI.
Unit facing is in degrees (type: real). Describes unit rotation:
Example: Create a human footman for first player (red) at map coordinates -30, 0, facing north:
Code (jass) Select
1 // Jass2 call CreateUnit(Player(0), 'hfoo', -30, 0, 90)
3 -- Lua
4 CreateUnit(Player(0), FourCC("hfoo"), -30, 0, 90)
See: bj_UNIT_FACING constant for default facing direction of units in BJ scripts and GUI.
Unit facing is in degrees (type: real). Describes unit rotation:
- 0 = East
- 90 = North
- 180 = West
- 270 = South
- -90 = South (wraps around)