找回密码
 点一下
查看: 2860|回复: 0

这个触发会不会导致地图奔溃

[复制链接]
发表于 2011-3-29 10:33:19 | 显示全部楼层 |阅读模式
function Trig_Tu_Ci_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A06K' ) ) then
        return false
    endif
    return true
endfunction
function tuci takes nothing returns nothing
local unit u = GetUnit(H2Tx(GetTriggeringTrigger()),"tc_u")
local real r = GetReal(H2Tx(GetTriggeringTrigger()),"tc_r")
local real r2
local location p = GetUnitLoc(u)
local location p2 = PolarProjectionBJ(p, 50.00, r)
local location p3
local integer i = GetInteger(H2Tx(GetTriggeringTrigger()),"tc_i")
local real r3
call EnumDestructablesInCircleBJ( 192.00, p2, function KillDestructableEnum )
call SetUnitPositionLoc( u, p2 )
set p3 = GetUnitLoc(u)
set i = i + 1
call SetInteger(H2Tx(GetTriggeringTrigger()),"tc_i",i)
set r3 = DistanceBetweenPoints(p3, p2)
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
if (GetBooleanOr(i>17,r3>8)) then
call FastFlush(H2Tx(GetTriggeringTrigger()))
call DestroyTriggerEx(GetTriggeringTrigger())
else
endif
call RemoveLocation (p)
call RemoveLocation (p2)
call RemoveLocation (p3)
set p = null
set p3 = null
set p2 = null
set u = null
endfunction
function Trig_Tu_Ci_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local trigger t = CreateTrigger()
local unit u2 = GetTriggerUnit()
local location p = GetUnitLoc(u)
local location p2 = GetUnitLoc(u2)
local real r = AngleBetweenPoints(p2, p)
call SetUnit(H2Tx(t),"tc_u",u)
call SetReal(H2Tx(t),"tc_r",r)
call SetInteger(H2Tx(t),"tc_i",0)
call TriggerRegisterTimerEventPeriodic(t,0.04)
call TriggerAddAction(t,function tuci)
set t = null
call RemoveLocation(p)
call RemoveLocation(p2)
set p = null
set p2 = null
set u = null
set u2 = null
endfunction
您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-12-22 10:45 , Processed in 0.042993 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表