|
如题,不知道是不是,只是问一下而已啦。
手头没魔兽,只好发帖了^_^
就是这样:
[codes=jass]
function Tirg_DamageSystem_Action takes nothing returns nothing
local unit u=GetEventDamageSource()
call DisplayTextToPlayer(Player(0),0,0,H2I(u))
set u=null
endfunction
function InitTrig_DamageSystem takes unit u returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
call TriggerAddAction(function Tirg_DamageSystem_Action)
set t=null
endfunction
function A takes nothing returns nothing
call InitTrig_DamageSystem(GetEnumUnit())
endfunction
function B takes nothing returns nothing
local group g=null
set g=GetUnitsInRectAll(GetPlayableMapRect())
call ForGroup(g,function A)
call DestroyGroup(g)
set g=null
endfunction
[/codes]
大家可以用【call B()】来试验(你还得手动释放闪电链^_^) |
|