ok this is the jass i have :
my problem is, when other ability been cast near the caster, this spell do no damage, so demage are miss and u only see special effect!!!! i dont know how explain it good!!!! when i use this trigger after another trigger been use this trigger do no damage , did i miss something on trigger that do this ?
function Trig_Kamehameha_Func001C takes nothing returns boolean
return((GetSpellAbilityId()=='A00R'))or((GetSpellAbilityId()=='A01H'))or((GetSpellAbilityId()=='A006'))
endfunction
function Trig_Kamehameha_Conditions takes nothing returns boolean
return(Trig_Kamehameha_Func001C())
endfunction
function Trig_Kamehameha_Func005002003 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function Trig_Kamehameha_Func006A takes nothing returns nothing
call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*2.00))
call CameraSetTargetNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*3.00),200.00)
endfunction
function Trig_Kamehameha_Func022Func005002003001 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),GetTriggerPlayer())==false)
endfunction
function Trig_Kamehameha_Func022Func005002003002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)
endfunction
function Trig_Kamehameha_Func022Func005002003 takes nothing returns boolean
return GetBooleanAnd(Trig_Kamehameha_Func022Func005002003001(),Trig_Kamehameha_Func022Func005002003002())
endfunction
function Trig_Kamehameha_Func022Func006A takes nothing returns nothing
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetEnumUnit(),udg_real02,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
call UnitAddType(GetEnumUnit(),UNIT_TYPE_ANCIENT)
endfunction
function Trig_Kamehameha_Func022Func008Func001C takes nothing returns boolean
return((IsDestructableAliveBJ(GetEnumDestructable())))
endfunction
function Trig_Kamehameha_Func022Func008A takes nothing returns nothing
if(Trig_Kamehameha_Func022Func008Func001C())then
call KillDestructable(GetEnumDestructable())
call TriggerExecute(udg_trigger623)
endif
endfunction
function Trig_Kamehameha_Func023Func002002003001 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),GetTriggerPlayer())==false)
endfunction
function Trig_Kamehameha_Func023Func002002003002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT))
endfunction
function Trig_Kamehameha_Func023Func002002003 takes nothing returns boolean
return GetBooleanAnd(Trig_Kamehameha_Func023Func002002003001(),Trig_Kamehameha_Func023Func002002003002())
endfunction
function Trig_Kamehameha_Func023Func003A takes nothing returns nothing
call UnitRemoveType(GetEnumUnit(),UNIT_TYPE_ANCIENT)
endfunction
function Trig_Kamehameha_Func031A takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
function Trig_Kamehameha_Actions takes nothing returns nothing
set udg_location07=GetUnitLoc(GetTriggerUnit())
set udg_location08=GetSpellTargetLoc()
set udg_location09=PolarProjectionBJ(udg_location07,150.00,AngleBetweenPoints(udg_location07,udg_location08))
set udg_group05=GetUnitsInRangeOfLocMatching(512.00,udg_location07,Condition(function Trig_Kamehameha_Func005002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func006A)
call DestroyGroup(udg_group05)
call AddSpecialEffectLocBJ(udg_location09,"Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl")
call TriggerExecute(udg_trigger620)
call AddSpecialEffectLocBJ(udg_location09,"Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call TriggerExecute(udg_trigger620)
call CreateNUnitsAtLoc(1,'h018',GetTriggerPlayer(),udg_location09,AngleBetweenPoints(udg_location07,udg_location08))
call SetUnitScalePercent(bj_lastCreatedUnit,(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)))
call CreateNUnitsAtLoc(1,'h029',GetTriggerPlayer(),udg_location09,AngleBetweenPoints(udg_location07,udg_location08))
call SetUnitScalePercent(bj_lastCreatedUnit,(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)))
call SetUnitTimeScalePercent(bj_lastCreatedUnit,15.00)
call KillUnit(bj_lastCreatedUnit)
call RemoveLocation(udg_location09)
set udg_real02=((I2R(GetHeroStatBJ(2,GetTriggerUnit(),false))*(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*2.00))+100.00)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location09=PolarProjectionBJ(udg_location07,(I2R(bj_forLoopAIndex)*200.00),AngleBetweenPoints(udg_location07,udg_location08))
call SetTerrainTypeBJ(udg_location09,'Kdtr',-1,3,0)
call SetTerrainTypeBJ(udg_location09,'Jdtr',-1,2,0)
call CreateNUnitsAtLoc(1,'h028',GetTriggerPlayer(),udg_location09,bj_UNIT_FACING)
set udg_group05=GetUnitsInRangeOfLocMatching(300.00,udg_location09,Condition(function Trig_Kamehameha_Func022Func005002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func022Func006A)
call DestroyGroup(udg_group05)
call EnumDestructablesInCircleBJ(300.00,udg_location09,function Trig_Kamehameha_Func022Func008A)
call RemoveLocation(udg_location09)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location09=PolarProjectionBJ(udg_location07,(I2R(bj_forLoopAIndex)*200.00),AngleBetweenPoints(udg_location07,udg_location08))
set udg_group05=GetUnitsInRangeOfLocMatching(300.00,udg_location09,Condition(function Trig_Kamehameha_Func023Func002002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func023Func003A)
call DestroyGroup(udg_group05)
call RemoveLocation(udg_location09)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_location09=PolarProjectionBJ(udg_location07,900.00,AngleBetweenPoints(udg_location07,udg_location08))
call TerrainDeformationWaveBJ(3.00,udg_location07,udg_location09,400.00,128.00,1.00)
call RemoveLocation(udg_location09)
call RemoveLocation(udg_location08)
call RemoveLocation(udg_location07)
call TriggerSleepAction(2.00)
call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Kamehameha_Func031A)
endfunction
my problem is, when other ability been cast near the caster, this spell do no damage, so demage are miss and u only see special effect!!!! i dont know how explain it good!!!! when i use this trigger after another trigger been use this trigger do no damage , did i miss something on trigger that do this ?
function Trig_Kamehameha_Func001C takes nothing returns boolean
return((GetSpellAbilityId()=='A00R'))or((GetSpellAbilityId()=='A01H'))or((GetSpellAbilityId()=='A006'))
endfunction
function Trig_Kamehameha_Conditions takes nothing returns boolean
return(Trig_Kamehameha_Func001C())
endfunction
function Trig_Kamehameha_Func005002003 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function Trig_Kamehameha_Func006A takes nothing returns nothing
call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*2.00))
call CameraSetTargetNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*3.00),200.00)
endfunction
function Trig_Kamehameha_Func022Func005002003001 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),GetTriggerPlayer())==false)
endfunction
function Trig_Kamehameha_Func022Func005002003002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false)
endfunction
function Trig_Kamehameha_Func022Func005002003 takes nothing returns boolean
return GetBooleanAnd(Trig_Kamehameha_Func022Func005002003001(),Trig_Kamehameha_Func022Func005002003002())
endfunction
function Trig_Kamehameha_Func022Func006A takes nothing returns nothing
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetEnumUnit(),udg_real02,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
call UnitAddType(GetEnumUnit(),UNIT_TYPE_ANCIENT)
endfunction
function Trig_Kamehameha_Func022Func008Func001C takes nothing returns boolean
return((IsDestructableAliveBJ(GetEnumDestructable())))
endfunction
function Trig_Kamehameha_Func022Func008A takes nothing returns nothing
if(Trig_Kamehameha_Func022Func008Func001C())then
call KillDestructable(GetEnumDestructable())
call TriggerExecute(udg_trigger623)
endif
endfunction
function Trig_Kamehameha_Func023Func002002003001 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),GetTriggerPlayer())==false)
endfunction
function Trig_Kamehameha_Func023Func002002003002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT))
endfunction
function Trig_Kamehameha_Func023Func002002003 takes nothing returns boolean
return GetBooleanAnd(Trig_Kamehameha_Func023Func002002003001(),Trig_Kamehameha_Func023Func002002003002())
endfunction
function Trig_Kamehameha_Func023Func003A takes nothing returns nothing
call UnitRemoveType(GetEnumUnit(),UNIT_TYPE_ANCIENT)
endfunction
function Trig_Kamehameha_Func031A takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
function Trig_Kamehameha_Actions takes nothing returns nothing
set udg_location07=GetUnitLoc(GetTriggerUnit())
set udg_location08=GetSpellTargetLoc()
set udg_location09=PolarProjectionBJ(udg_location07,150.00,AngleBetweenPoints(udg_location07,udg_location08))
set udg_group05=GetUnitsInRangeOfLocMatching(512.00,udg_location07,Condition(function Trig_Kamehameha_Func005002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func006A)
call DestroyGroup(udg_group05)
call AddSpecialEffectLocBJ(udg_location09,"Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl")
call TriggerExecute(udg_trigger620)
call AddSpecialEffectLocBJ(udg_location09,"Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call TriggerExecute(udg_trigger620)
call CreateNUnitsAtLoc(1,'h018',GetTriggerPlayer(),udg_location09,AngleBetweenPoints(udg_location07,udg_location08))
call SetUnitScalePercent(bj_lastCreatedUnit,(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(250.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)))
call CreateNUnitsAtLoc(1,'h029',GetTriggerPlayer(),udg_location09,AngleBetweenPoints(udg_location07,udg_location08))
call SetUnitScalePercent(bj_lastCreatedUnit,(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)))
call SetUnitTimeScalePercent(bj_lastCreatedUnit,15.00)
call KillUnit(bj_lastCreatedUnit)
call RemoveLocation(udg_location09)
set udg_real02=((I2R(GetHeroStatBJ(2,GetTriggerUnit(),false))*(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*2.00))+100.00)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location09=PolarProjectionBJ(udg_location07,(I2R(bj_forLoopAIndex)*200.00),AngleBetweenPoints(udg_location07,udg_location08))
call SetTerrainTypeBJ(udg_location09,'Kdtr',-1,3,0)
call SetTerrainTypeBJ(udg_location09,'Jdtr',-1,2,0)
call CreateNUnitsAtLoc(1,'h028',GetTriggerPlayer(),udg_location09,bj_UNIT_FACING)
set udg_group05=GetUnitsInRangeOfLocMatching(300.00,udg_location09,Condition(function Trig_Kamehameha_Func022Func005002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func022Func006A)
call DestroyGroup(udg_group05)
call EnumDestructablesInCircleBJ(300.00,udg_location09,function Trig_Kamehameha_Func022Func008A)
call RemoveLocation(udg_location09)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location09=PolarProjectionBJ(udg_location07,(I2R(bj_forLoopAIndex)*200.00),AngleBetweenPoints(udg_location07,udg_location08))
set udg_group05=GetUnitsInRangeOfLocMatching(300.00,udg_location09,Condition(function Trig_Kamehameha_Func023Func002002003))
call ForGroupBJ(udg_group05,function Trig_Kamehameha_Func023Func003A)
call DestroyGroup(udg_group05)
call RemoveLocation(udg_location09)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_location09=PolarProjectionBJ(udg_location07,900.00,AngleBetweenPoints(udg_location07,udg_location08))
call TerrainDeformationWaveBJ(3.00,udg_location07,udg_location09,400.00,128.00,1.00)
call RemoveLocation(udg_location09)
call RemoveLocation(udg_location08)
call RemoveLocation(udg_location07)
call TriggerSleepAction(2.00)
call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Kamehameha_Func031A)
endfunction