ironfist19
New Member
- Reaction score
- 3
hello, my second trigger made by me... kills all 5 units in map when someone cast "Dark Bishop"..
i know, i suck at jass but ;] i need some help here guys
Edit : Renewed the trigger but still i had a problem.. it doesn't work.. ;/
JASS:
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;AUan039; ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnumUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Func004A takes nothing returns nothing
if ( Trig_Untitled_Trigger_001_Func004Func001C() ) then
loop
exitwhen udg_kills == 5
call KillUnit(udg_firstunit)
set udg_kills = ( udg_kills + 1 )
endloop
endif
call DestroyGroup(udg_temp_group)
call RemoveUnit(udg_firstunit)
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
set udg_firstunit = FirstOfGroup(udg_temp_group)
set udg_temp_group = GetUnitsInRectAll(GetPlayableMapRect())
set udg_kills = 0
call ForGroupBJ( udg_temp_group, function Trig_Untitled_Trigger_001_Func004A )
endfunction
//---ironfist19
function InitTrig_Practice_06 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(t, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction(t, function Trig_Untitled_Trigger_001_Actions )
endfunction
i know, i suck at jass but ;] i need some help here guys
Edit : Renewed the trigger but still i had a problem.. it doesn't work.. ;/