HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with a triggered spell

08-08-2008, 06:52 AM#1
dabest2503
Trigger:
Super Fan Of Knives
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Super Fan Of Knives
Collapse Actions
Collapse For each (Integer A) from 1 to (Number of units in (Units within 700.00 of (Position of (Casting unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal , do (Actions)
Collapse Loop - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Random unit from (Units within 700.00 of (Position of (Casting unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting uni facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fan Of Knives to (Last created unit)
Unit - Set level of Fan Of Knives for (Last created unit) to (Level of Super Fan Of Knives for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives

Basically, this trigger was MEANT to create a 1 dummy caster for every unit near the casting unit, give it fan of knives and let it cast fan of knives.

The problem is, that only 1 Fan Of Knives is casted.

Any idea how to fix this trigger?
08-08-2008, 07:58 AM#2
Pyrogasm
Yeah, use a better group loop:
Trigger:
Collapse Super Fan Of Knives
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Super Fan Of Knives
Collapse Actions
Custom script: set bj_wantDestroyGroup = true
Collapse Unit Group - Pick every unit in (Units within 700.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and do (Actions)
Collapse Loop - Actions
Set TempPoint = (Position of (Picked Unit))
Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fan Of Knives to (Last created unit)
Unit - Set level of Fan Of Knives for (Last created unit) to (Level of Super Fan Of Knives for (Triggering unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of
Collapse Knives
Custom script: call RemoveLocation(udg_TempPoint)