|
楼主 |
发表于 2009-7-3 11:45:31
|
显示全部楼层
这样?
[jass]
function EstablishCommArrayConditions takes nothing returns boolean
return GetSpellAbilityId()=='A01P'
endfunction
function EstablishCommArray takes nothing returns nothing
local group g = GetUnitsOfTypeIdAll('o001')
local unit u = FirstOfGroup(g)
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local player p = GetOwningPlayer(GetTriggerUnit())
call DestroyGroup(g)
call RemoveUnit(u)
set u = null
set g = null
call PolledWait(0.1)
set udg_CommArray = CreateUnit(p,'o001',x,y,0.0)
call PolledWait(2.25)
if GetWidgetLife(udg_Hero[GetConvertedPlayerId(p)])>0.405 then
call ModifyHeroStat( bj_HEROSTAT_INT, udg_Hero[GetConvertedPlayerId(p)], bj_MODIFYMETHOD_SUB, 8 )
endif
endfunction
function EngineerInit takes unit u returns nothing
set udg_EngyCommArray = CreateTrigger()
call TriggerRegisterUnitEvent( udg_EngyCommArray, u, EVENT_UNIT_SPELL_FINISH )
call TriggerAddCondition( udg_EngyCommArray, Condition( function EstablishCommArrayConditions ) )
call TriggerAddAction( udg_EngyCommArray, function EstablishCommArray )
endfunction
[/jass] |
|