HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting status effects

10-12-2003, 06:37 PM#1
Kaluo
I was wondering if anyone has a trigger to detect status affects for any amount of units. My goal is to be able to reorder units under the affects of inferno, impale, and warstomp to move somewhere before they recover. The only way i know how is to do event - a unit casts spell on unit, but that only works for things like web or stormbolt. Any ideas?
10-12-2003, 07:30 PM#2
Illithid
Haven't found a method of detecting status effects yet. All I would do in a situation like this is use triggers to detect all units with in the spell radius and give them actions.

For war stomp/thunder clap
Event
Unit is issued an order without a target
Condition
issued order is equal to (what ever spell order you are using)
Action
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Ordered unit)) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Ordered unit))) Equal to True)) and do (Actions)
Loop - Actions
what ever you want to do to each unit

For blizzard/inferno and other circular areas
Event
Unit is issued an order targeting a point
Condition
Issued order is equal to ()
Actions
set spellpoint = point of issued order {spellpoint is a variable of type point}
Unit Group - Pick every unit in (Units within 512.00 of (spellpoint) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Ordered unit))) Equal to True)) and do (Actions)
Loop - Actions
what ever you want to do to each unit

One small note, normally in a situation like this for actions to do I will just add the units to a unit group variable and then make another trigger that detects casting of the spell to actually perform actions on the units in the unit group, For the blizzard/inferno method, you will likely just want to store the point at detection of the order and then at casting detect the units in the area around that point. Doing it this way makes sure the units affected are those actually hit by the spell and not those meant to be hit when the order was issued even if the order was out of range.