HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How can this be right?!

05-16-2006, 07:11 AM#1
kaldoreielf
Trigger:
Untitled Trigger 002
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to PaladinABILITY
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Region centered at (Position of (Target unit of ability being cast)) with size (500.00, 500.00)) matching (((Target unit of ability being cast) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) is Undead) Equal to True
Collapse Then - Actions
Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 500.00 at (Target point of ability being cast), dealing 200.00 damage of attack type Spells and damage type Normal
Collapse Else - Actions
Unit - Set life of (Target unit of ability being cast) to 100.00%

It has Undead, but NO other race, so I set it too undead. It was supposed to deal damage to UD, and heal all other races, but instead it deals damage to all races.... I want it too deal damage to only UD units, how can that be accomplished?
05-16-2006, 07:48 AM#2
Tiki
Does the units have the unit type undead checked?
05-16-2006, 09:06 AM#3
Freakazoid
You don't pick the right units.

Use (Matching Unit) instead of (Target unit of ability being cast), in the Unit Group action.
05-16-2006, 10:34 AM#4
Anitarf
Why should the spell only be allowed to affect enemies of player 1?
05-16-2006, 03:08 PM#5
Mystic Prophet
NONONO he's picking the right units. problem is this little line right here.

Trigger:
Unit - cause triggering unit to damage CIRCULAR AREA

you're damaging an area. this will also mean that the guy casting the spell is doing damage several times. once for each unit in the area.

you want him to damage picked unit, like this.

Trigger:
Unit - cause triggering unit to damage (picked unit) dealing 200 damage of attack type spells and damage type normal

Oh and as anitarf said change enemies of player1 to enemies of owner of triggering unit

also. Instead of using a region. why don't you use within range of target point of ability being cast.

I'd also suggest looking at a leak tutorial because unit groups and points cause a lot of memory leaks.
05-16-2006, 03:39 PM#6
The)TideHunter(
Big major point to mention is, your not picking any units from as far as i can see.

In the trigger you showed, the IF statement wasent inside the Unit group loop section.
05-16-2006, 04:20 PM#7
Vexorian
Also the race undead and the unit classification undead are different things
05-16-2006, 05:35 PM#8
Freakazoid
He can't use any other unit, for the "Matching Condition", just (Matching Unit).
05-16-2006, 06:07 PM#9
blu_da_noob
Your if/then/else is outside the group loop, you are using the wrong unit response in your boolexpr and in your later healing (because there is no target unit for blizzard) and then you are using a damage area function in the group loop (well, it would be if you didn't screw that up). You are also using a region, meaning it will be square. You leak the region, the group and a few locations. Did I miss anything?
05-16-2006, 10:56 PM#10
Mystic Prophet
heh think you hit every point there blue.
05-19-2006, 03:55 AM#11
kaldoreielf
What can I do too fix this?