Hello,
Firstly, here is the Jass code;
If I were to remove ''local real dmg='' - the spell itself shouldn't take any damage, right?
If not, correct me.
Moving on to the REAL hurdle that I have faced for 2 hours straight now and can't seem to just crack this nut - so guidance would be very appreciated.
Basically what I want to do, is simply removing the damage AND add a AoE silence for it. Now, most of it is done, the spell and everything that is - it is already set up and it already has an AoE; the only thing I need to do now is add a Silence Effect to it and everything is *perfect* - but I have no clue on how to add the silence so it would be nice with a bit of help here.
Regards
Firstly, here is the Jass code;
JASS:
function SacredSongCast6 takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer id=GetHandleId(t)
local unit u=LoadUnitHandle(h,id,0)
local real dmg=GetHeroInt(u,true)*(0.2+0.1*GetUnitAbilityLevel(u,0x41313955))
local real x1=LoadReal(h,id,4)
local real y1=LoadReal(h,id,5)
local real a=LoadReal(h,id,3)
local integer i=50
local real dist=LoadReal(h,id,2)
local real dist2=LoadReal(h,id,6)
local group g=LoadGroupHandle(h,id,10)
local player p=GetOwningPlayer(u)
if dist<1.1 then
call SaveReal(h,id,2,dist+0.1)
set n=CreateUnit(p,0x65313038,x1,y1,a*bj_RADTODEG)
call SetUnitTimeScale(n,1)
call UnitApplyTimedLife(n,1,1)
call GroupEnumUnitsInRange(G,x1,y1,400,Base)
loop
set E=FirstOfGroup(G)
exitwhen E==null
if Condition_Base(p,E)then
call UnitDamageTarget(u,E,dmg,false,false,null,null,null)
endif
call GroupRemoveUnit(G,E)
endloop
else
call RemoveUnit(LoadUnitHandle(h,id,2))
call DestroyLightning(LoadLightningHandle(h,id,11))
call DestroyLightning(LoadLightningHandle(h,id,12))
call DestroyLightning(LoadLightningHandle(h,id,13))
call DestroyLightning(LoadLightningHandle(h,id,14))
call DestroyLightning(LoadLightningHandle(h,id,15))
loop
set de=LoadDestructableHandle(h,id,i)
exitwhen de==null
call RemoveDestructable(de)
set i=i+1
endloop
call ForGroup(g,function KillGroup)
call DestroyGroup(g)
call PauseTimer(t)
call DestroyTimer(t)
call FlushChildHashtable(h,id)
endif
set g=null
set u=null
set p=null
set t=null
endfunction
If I were to remove ''local real dmg='' - the spell itself shouldn't take any damage, right?
If not, correct me.
Moving on to the REAL hurdle that I have faced for 2 hours straight now and can't seem to just crack this nut - so guidance would be very appreciated.
Basically what I want to do, is simply removing the damage AND add a AoE silence for it. Now, most of it is done, the spell and everything that is - it is already set up and it already has an AoE; the only thing I need to do now is add a Silence Effect to it and everything is *perfect* - but I have no clue on how to add the silence so it would be nice with a bit of help here.
Regards
Last edited: