Hello guys. i am^^ very bad in triggering, i tried something with a Trigger, i wantet to make a Mass Entangle root effekt for my hero, i tried it freehand, and somethink is wrong.. there is the trigger (i dont know how to make it in this code hope it works^^)
My problem now is. when i activate it there is a "error?" this trigger needs to have a InitTrig_RootAoe ^^ i dont know whats that are and how to activate..
Code:
function Trig_Mass_Roots_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Mass_Roots takes nothing returns nothing
set gg_trg_Mass_Roots = CreateTrigger( )
call TriggerAddAction( gg_trg_Mass_Roots, function Trig_Mass_Roots_Actions )
endfunction
Entangling Roots
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Entangling Roots
Actions
Set Caster = (Triggering unit)
Set UnitGroup = (Random 4 units from (Units within 500.00 of (Target point of ability being cast)))
Unit Group - Pick every unit in UnitGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of (Owner of Caster)) Equal to True
Then - Actions
Set Target = (Picked unit)
Set TargetPoint = (Position of Target)
Unit - Create 1 dummy for (Owner of Caster) at TargetPoint facing TargetPoint
Set Dummy = (Last created unit)
Unit - Add Entangling Roots to Dummy
Unit - Order Dummy to Nature Dryad - Entangling Roots Target
Unit - Add a 3.00 second Generic expiration timer to Dummy
Else - Actions
Custom script: call RemoveLocation (udg_TargetPoint)
Custom script: call DestroyGroup(udg_UnitGroup)
Custom script: set udg_Target = null
Custom script: set udg_Dummy = null
Custom script: set udg_Caster = null
My problem now is. when i activate it there is a "error?" this trigger needs to have a InitTrig_RootAoe ^^ i dont know whats that are and how to activate..