- Joined
- Dec 5, 2009
- Messages
- 846
Hello. I want to detect damage and i thought you could first store the unit in an variable then do another trigger where you use the stored unit in the event Unit - Takes Damage but in that event it wont find the variable... Is there anyway to do this?
I want it like this:
I want it like this:
-
Storing
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Attacking unit) Equal to Sorceress 0003 <gen>
-
Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Attacking unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True)) and do (Actions)
-
Loop - Actions
- Set unit = (Picked unit)
- Set unit2 = (sorceress0013)
- Trigger - Turn on using the stored <gen>
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Attacking unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True)) and do (Actions)
-
Events
-
using the stored
-
Events
- Unit - unit Takes damage
-
Conditions
- Unit2 Equal to (Damage source)
- Actions
-
Events