- Joined
- Mar 23, 2007
- Messages
- 302
Ok, here we go again, i cant figure out whats wrong here...
what is this about:
Its a Spell, kind a ultimate of a city. Costs 0 mana and has a 360sec coldown.
Target unit gets catched by entangling roots til it dies , dealing 50 dmg every second. If this unit dies, every unit within 300 range will be entangled too, a.s.o.
what does not work:
ehm, nothing, means after the first entanged dead unit no other unit is affected.
Details:
This trigger runs whenever a unit dies With Specific Buff
I used 2 different spells for this and a new created Buff.
the first one is for the City to be able to cast it all over the world.
the second one is for the DUMMY unit to cast it after the dead of an affected unit. Ths Buff is given to both spells.
The Code:
What i did not forget:
I checked the integers (mb i did somthing wrong there, but no, all fine)
I checked the Manacosts, Range, allowedTargets, etc
This is why i realy have no idead why nothing happens.
So, after that all i was wondering if some one here could help me Out...
PLEAS
what is this about:
Its a Spell, kind a ultimate of a city. Costs 0 mana and has a 360sec coldown.
Target unit gets catched by entangling roots til it dies , dealing 50 dmg every second. If this unit dies, every unit within 300 range will be entangled too, a.s.o.
what does not work:
ehm, nothing, means after the first entanged dead unit no other unit is affected.
Details:
This trigger runs whenever a unit dies With Specific Buff
I used 2 different spells for this and a new created Buff.
the first one is for the City to be able to cast it all over the world.
the second one is for the DUMMY unit to cast it after the dead of an affected unit. Ths Buff is given to both spells.
The Code:
JASS:
function Trig_Painroots_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(GetDyingUnit(), 'B004') > 0) == true
endfunction
function Trig_Painroots_Actions takes nothing returns nothing
local unit u = GetDyingUnit()
local unit b
local unit u2
local player P = GetOwningPlayer(u)
local location L = GetUnitLoc(u)
local real X = GetUnitX(u)
local real Y = GetUnitY(u)
local group G = GetUnitsInRangeOfLocAll(300.00, L)
call RemoveLocation(L)
set L = null
loop
set u2 = FirstOfGroup(G)
exitwhen u2 == null
if (((GetUnitState(u2, UNIT_STATE_LIFE) > 0 )==true)and( u2 != GetDyingUnit())and(IsUnitType(u2,UNIT_TYPE_STRUCTURE )== false)) then
set b = CreateUnit(P,'n00I',X,Y,0 )
call IssueTargetOrder( b, "entanglingroots",u2)
call UnitApplyTimedLife( b, 'BTLF',4.00 )
endif
call GroupRemoveUnit(G, u2)
endloop
call DestroyGroup(G)
set P = null
set G = null
set b = null
set u = null
set u2 = null
set L = null
endfunction
What i did not forget:
I checked the integers (mb i did somthing wrong there, but no, all fine)
I checked the Manacosts, Range, allowedTargets, etc
This is why i realy have no idead why nothing happens.
So, after that all i was wondering if some one here could help me Out...
PLEAS