D
dArKzEr0
Guest
I have this:
In my map header section, but the TriggerSleepActions stop all subsequent actions from occurring. Why does this happen?
-darkz
Code:
function TransportUnitToStart takes unit x returns nothing
local unit transportUnit = x
local player owner = GetOwningPlayer( transportUnit )
local location startPoint = GetUnitLoc( transportUnit )
local location endPoint = GetRectCenter(gg_rct_Revive_Point)
local effect array transportEffect
call PauseUnit( transportUnit, true )
set transportEffect[1] = AddSpecialEffectLoc( "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl", startPoint )
call TriggerSleepAction( 1 )
set transportEffect[2] = AddSpecialEffectLoc( "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl", startPoint )
call DestroyEffect( transportEffect[1] )
call TriggerSleepAction( .3 )
call PanCameraToTimedLocForPlayer( owner, endPoint, 0.0 )
call SetUnitPositionLoc( transportUnit, endPoint )
set transportEffect[3] = AddSpecialEffectLoc( "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl", endPoint )
call DestroyEffect( transportEffect[2] )
call TriggerSleepAction( .3 )
call PauseUnit( transportUnit, false )
call DestroyEffect( transportEffect[3] )
call RemoveLocation( startPoint )
call RemoveLocation( endPoint )
set transportUnit = null
set owner = null
set startPoint = null
set endPoint = null
set transportEffect[1] = null
set transportEffect[2] = null
set transportEffect[3] = null
endfunction
In my map header section, but the TriggerSleepActions stop all subsequent actions from occurring. Why does this happen?
-darkz