|
function Trig_XSlash_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A904'))
endfunction
function Trig_XSlash_Actions takes nothing returns nothing
set udg_XSlash_Caster=GetSpellAbilityUnit()
set udg_XSlash_Target=GetSpellTargetUnit()
call CreateNUnitsAtLocFacingLocBJ(1,'H0AB',GetOwningPlayer(udg_XSlash_Caster),PolarProjectionBJ(GetUnitLoc(udg_XSlash_Target),256.00,(AngleBetweenPoints(GetUnitLoc(udg_XSlash_Target),GetUnitLoc(udg_XSlash_Caster))+45.00)),GetUnitLoc(udg_XSlash_Target))
set udg_XSlash_Mirror[0]=bj_lastCreatedUnit
call SetUnitAnimationWithRarity(udg_XSlash_Mirror[0],"attack",RARITY_RARE)
call SetUnitVertexColorBJ(udg_XSlash_Mirror[0],100,100,100,50.00)
call CreateNUnitsAtLocFacingLocBJ(1,'H0AB',GetOwningPlayer(udg_XSlash_Caster),PolarProjectionBJ(GetUnitLoc(udg_XSlash_Target),256.00,(AngleBetweenPoints(GetUnitLoc(udg_XSlash_Target),GetUnitLoc(udg_XSlash_Caster))-45.00)),GetUnitLoc(udg_XSlash_Target))
set udg_XSlash_Mirror[1]=bj_lastCreatedUnit
call SetUnitAnimationWithRarity(udg_XSlash_Mirror[1],"attack",RARITY_RARE)
call SetUnitVertexColorBJ(udg_XSlash_Mirror[1],100,100,100,50.00)
call PolledWait(GetRandomReal(0.40,0.70))
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Target,"Abilities\\Spells\\Orc\\AncestralSpirit\\AncestralSpiritCaster.mdl")
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=1
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitTimeScalePercent(udg_XSlash_Mirror[bj_forLoopAIndex],0.00)
call SetUnitPositionLoc(udg_XSlash_Mirror[bj_forLoopAIndex],PolarProjectionBJ(GetUnitLoc(udg_XSlash_Mirror[bj_forLoopAIndex]),512.00,GetUnitFacing(udg_XSlash_Mirror[bj_forLoopAIndex])))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Mirror[0],"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl")
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Mirror[1],"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl")
set bj_forLoopBIndex=6
set bj_forLoopBIndexEnd=10
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call SetUnitVertexColorBJ(udg_XSlash_Mirror[0],100,100,100,((0.00+I2R(bj_forLoopBIndex))*10.00))
call SetUnitVertexColorBJ(udg_XSlash_Mirror[1],100,100,100,((0.00+I2R(bj_forLoopBIndex))*10.00))
call PolledWait(0.05)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveUnit(udg_XSlash_Mirror[0])
call RemoveUnit(udg_XSlash_Mirror[1])
endfunction
//===========================================================================
function InitTrig_XSlash takes nothing returns nothing
set gg_trg_XSlash=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_XSlash,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_XSlash,Condition(function Trig_XSlash_Conditions))
call TriggerAddAction(gg_trg_XSlash,function Trig_XSlash_Actions)
endfunction
我复制这段代码放进war3map.j 结果地图运行不了了 高手帮忙则个 小弟万分感激 |
|