- Joined
- Aug 15, 2007
- Messages
- 37
Everytime this trigger is called, the game lags terribly. What needs fixed? Does it have anything to do with the InitTrig functions?
JASS:
function Trig_ChannelManaStopped_Copy_Conditions takes nothing returns boolean
local unit u = GetOrderedUnit()
if ( GetUnitTypeId(u) != 'e002' and GetIssuedOrderId() != OrderId("stop") ) then
set u = null
return false
endif
set u = null
return true
endfunction
function Trig_ChannelManaStopped_Copy_Actions takes nothing returns nothing
local unit u = GetOrderedUnit()
call TriggerSleepAction( 1.00 )
call IssueImmediateOrderById(u,852548)
set u = null
endfunction
//===========================================================================
function InitTrig_ChannelManaStopped_Copy takes nothing returns nothing
set gg_trg_ChannelManaStopped_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ChannelManaStopped_Copy, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_ChannelManaStopped_Copy, Condition( function Trig_ChannelManaStopped_Copy_Conditions ) )
call TriggerAddAction( gg_trg_ChannelManaStopped_Copy, function Trig_ChannelManaStopped_Copy_Actions )
endfunction