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

请教下列函数的问题。。。群体技能模板制作失败

[复制链接]
发表于 2009-9-20 11:45:57 | 显示全部楼层 |阅读模式
function Enemy_Alive_All_Ability takes integer Ability_Hero,integer Ability_unit,unit SpellUnit,unit EnumUnit returns nothing
    local location UnitLoc = GetUnitLoc(SpellUnit)
    local location EnumLoc = GetUnitLoc(EnumUnit)
    local unit FalseSpell = CreateUnitAtLoc(GetOwningPlayer(SpellUnit), 'ewsp', UnitLoc, AngleBetweenPoints(UnitLoc, EnumLoc))
    call UnitAddAbility( FalseSpell, Ability_unit )
    call SetUnitAbilityLevel( FalseSpell, Ability_unit, GetUnitAbilityLevel(SpellUnit, Ability_Hero) )
    call IssueTargetOrderById( FalseSpell, 852095, EnumUnit )
    call ShowUnitHide( FalseSpell )
    call RemoveLocation( UnitLoc )
    call RemoveLocation( EnumLoc )
endfunction




function Enemy_Alive_Ability_Choose takes nothing returns boolean
    if GetBooleanAnd(IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetSpellAbilityUnit())),IsUnitAliveBJ(GetFilterUnit())) == true then
        return TRUE
    else
        return FALSE
    endif
endfunction     

function Enemy_Alive_Ability_Actions takes nothing returns nothing
    if GetSpellAbilityId() == 'AUfn' then
        call Enemy_Alive_All_Ability('AUfn','ACfn',GetSpellAbilityUnit(),GetEnumUnit())
    elseif GetSpellAbilityId() == 'AHtb' then
        call Enemy_Alive_All_Ability('AHtb','A000',GetSpellAbilityUnit(),GetEnumUnit())
    else
        call DoNothing(  )
    endif   
endfunction

function Trig____________________001_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(GetSpellTargetUnit()), Condition(function Enemy_Alive_Ability_Choose)), function Enemy_Alive_Ability_Actions )
endfunction


function InitTrig____________________001 takes nothing returns nothing
    set gg_trg____________________001 = CreateTrigger(  )
    call TriggerAddAction( gg_trg____________________001, function Trig____________________001_Actions )
endfunction
您需要登录后才可以回帖 登录 | 点一下

本版积分规则

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

GMT+8, 2024-12-4 16:18 , Processed in 0.167717 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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