- Joined
- Nov 13, 2006
- Messages
- 1,814
[Solved]Metamorphosis/Bear form ability with paused unit problem
why dont transform the unit if i unpause at begining of function, order for metamorphosis and pause at end?
(unit is correct if i checked with GetUnitName and wrote to screen also if work well just unit dont make the order even i used call TriggerSleepAction(1) before pause back :/)
why dont transform the unit if i unpause at begining of function, order for metamorphosis and pause at end?
(unit is correct if i checked with GetUnitName and wrote to screen also if work well just unit dont make the order even i used call TriggerSleepAction(1) before pause back :/)
JASS:
function RemoveAttachment takes integer pl, integer opt returns nothing
local unit u = udg_Hero[pl]
local integer x = 10000 * pl
local integer a = 'A00C'
local integer a1 = 'A00D'
local integer w = LoadInteger(udg_Stat_Table, x + 3, 99 )
if udg_Camera_Lock[pl] then
if IsUnitPaused(u) then
call PauseUnit(u, false)
endif
endif
//destroy few special effect
call UnitAddAbility( u, a )
call IssueImmediateOrder( u, "bearform" )
call UnitRemoveAbility( u, a )
if w>=900 and w < 950 then
if ( GetUnitTypeId( u ) == 'H000' ) then
call SetPlayerAbilityAvailable( Player( pl - 1 ), a1, true )
call IssueImmediateOrder( u, "metamorphosis" )
call SetPlayerAbilityAvailable( Player( pl - 1 ), a1, false )
endif
else
if ( GetUnitTypeId( u ) == 'H001' ) then
call SetPlayerAbilityAvailable( Player( pl - 1 ), a1, true )
call IssueImmediateOrder( u, "metamorphosis" )
call SetPlayerAbilityAvailable( Player( pl - 1 ), a1, false )
endif
endif
if udg_Camera_Lock[pl] then
call PauseUnit(u, true)
endif
set u = null
endfunction
Last edited: