HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Action/Cond NOT working

10-25-2003, 08:03 PM#1
Zachary_Shadow
Why isn't this working?:

Unit Group - Pick every unit in (Units within 250.00 of (Position of (Summoned unit)) matching (((Picked unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set mana of (Picked unit) to 0.00%
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
Unit - Pause (Picked unit)
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl

It's red that is summoning a unit, thus every unit around the summoned unit should be picked, and have the following actions done to them.

The problem is, that it picks EVERYTHING within range, ALSO the casting unit and the summoned unit! I have this kind of triggering on another spell, where it works fine, picking only the enemies. But in this case, it just won't do it.

Anyone able to see an error here.
10-25-2003, 08:21 PM#2
Peppar
Try (Matching Unit) instead of (Picked Unit) in the "matching"-comparision.
10-25-2003, 08:43 PM#3
|)@rk-Revenant
your first passage is fine, but when saying PICKED UNIT in the actions, you should say MATCHING UNIT
10-25-2003, 08:43 PM#4
Zachary_Shadow
YAY, Peppar! It worked...no idea why it didn't before, but it works now :) Thanks alot :) NEVER used that command EVER, good to see it has some use :)