JASS:
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Fury_of_the_Sapphiron_Actions takes nothing returns nothing
local group g
local unit cu
if ( GetSpellAbilityId() == 'A00P' ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h009', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 100.00, 100.00)), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 0.01, 'BTLF', GetLastCreatedUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set g = GetUnitsInRectAll(GetUnitsInRangeOfLocAll(800.00, GetUnitLoc(GetTriggerUnit())))
loop
set cu = FirstOfGroup(g)
exitwhen cu = null
if ((IsUnitType(GetEnumUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false ) and ( IsUnitType(cu, UNIT_TYPE_STRUCTURE) == false ) and ( IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(cu)) = true ) and (GetOwningPlayer(cu)) == true )) then
call UnitDamageTargetBJ( GetTriggerUnit(), cu, 3000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call CreateNUnitsAtLoc( 1, 'h005', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(cu), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "entanglingroots", cu)
call GroupRemoveUnit(g,cu)
endif
endloop
call DestroyGroup(g)
endif
endfunction
//===========================================================================
function InitTrig_Fury_of_the_Sapphiron takes nothing returns nothing
set gg_trg_Fury_of_the_Sapphiron = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fury_of_the_Sapphiron, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Fury_of_the_Sapphiron, function Trig_Fury_of_the_Sapphiron_Actions )
endfunction
JASS:
set g = GetUnitsInRectAll(GetUnitsInRangeOfLocAll(800.00, GetUnitLoc(GetTriggerUnit()))
This is my Fury of the Sapphiron spell which damages and casts entaglin rots spell(with crystal buff efect) on enemies nearby and I use units for some effects to make them bigger
Well It was okan in GUI but when I converted in jass and make some modifications on it, it got broken
NewGen WE gives error, normal WE doesnt give error but closes application with error the error drwatson gives This app applied invaild action blabla blabla
Last edited: