- Joined
- Nov 25, 2008
- Messages
- 1,309
When I use the function below to create units with and then I don't do anything with the unit via triggers the unit will after some time be ordered to move to the location they were created at, versus the point they were moved to via triggers. Why is this and what can I do to fix this?
JASS:
globals
constant player PLAYER_NEUTRAL_EXTRA=Player(bj_PLAYER_NEUTRAL_EXTRA) // This is the extra player in the game (not passive mobs, hostile creeps, or the victums of left players).
endglobals
function CreateUnitEx takes integer UnitTypeId,real X,real Y,real FacingAngle returns nothing
local unit Unit=CreateUnit(PLAYER_NEUTRAL_EXTRA,UnitTypeId,0,0,FacingAngle)
call SetUnitX(Unit,X)
call SetUnitY(Unit,Y)
endfunction