Jedimindtrixxx
┻━┻ ︵ ¯\(ツ)/¯ ︵ ┻━┻
- Reaction score
- 168
JASS:
function FuncTypeCond takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 039;n01E039; )
endfunction
function Actions takes nothing returns nothing
local location HUnterPOINT = GetUnitLoc(GetTriggerUnit( ))
local group PIGGROUP = GetUnitsInRangeOfLocMatching(512, HUnterPOINT, Condition(function FuncTypeCond))
call SetUnitAbilityLevelSwapped( 039;A000039;, GetTriggerUnit( ), CountUnitsInGroup( PIGGROUP ))
call SetUnitAbilityLevelSwapped( 039;A025039;, GetTriggerUnit( ), CountUnitsInGroup( PIGGROUP ))
set HUnterPOINT = null
set PIGGROUP = null
endfunction
//===========================================================================
function Init takes nothing returns nothing
local trigger Hoag_Train
set Hoag_Train = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( Hoag_Train, 0.50 )
call TriggerRegisterAnyUnitEventBJ( Hoag_Train, EVENT_PLAYER_UNIT_RESEARCH_FINISH )
call TriggerAddAction( Hoag_Train, function Actions )
endfunction
what its supposed to do is, for every Naga Royal Guard in a 1000 range around the "Hoag Train" (name of unit), it sets the level of a spell: level of spell = # of units in the area, one of the spells is based off of endurance aura that targets himself only, and for every unit it increases by 5% the atk speed, (unit is immobile, no ms added) and a spell based of claws of attack given as an ability which increases his dmg by 50 every level
the problem is it doesnt work. at all. i get a normal save, like it doesnt give me any syntax but it doesnt work ingame for some reason
any1 know why?