- Joined
- Nov 30, 2007
- Messages
- 1,202
Method 1 works, but method 2 for some reason doesn't, you can't rotate buildings or whats up?
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local unit u = gg_unit_hhou_0006
local real x = GetUnitX(u)
local real y = GetUnitY(u)
call BJDebugMsg("Rotate")
// Method 1
//call RemoveUnit(u)
//set u = CreateUnit(Player(0), 'hhou', x, y, 0)
// Method 2
call SetUnitPosition(u, x, y)
call SetUnitFacing(u, 0)
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 5 )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction