- Joined
- Mar 15, 2007
- Messages
- 230
I'm having trouble with a DoT ability. The way it's supposed to work is that after channeling the ability for a few seconds, a dummy unit is created at the target location that casts a version of Thunderclap, and the units affected are supposed to take damage over time from the caster for as long as they have the buff. Well, the damage over time is the part of the ability that isn't working.
Here are my triggers:
Here are my triggers:
-
Get Condemn Point
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Condemn (Inquisitor)
-
Actions
- Set VariableSet UDexNew = (Custom value of (Casting unit))
- Set VariableSet Condemn_Point[UDexNew] = (Target point of ability being cast)
-
Events
-
Condemn Damage
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Condemn (Inquisitor)
-
Actions
- Set VariableSet UDexNew = (Custom value of (Casting unit))
- Unit - Create 1 Condemn Dummy for (Owner of (Casting unit)) at Condemn_Point[UDexNew] facing Default building facing degrees
- Unit - Set level of Condemn dummy (Inquisitor) for (Last created unit) to (Level of Condemn (Inquisitor) for (Casting unit))
- Unit - Order (Last created unit) to Human Mountain King - Thunder Clap.
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit Group - Pick every unit in Condemn_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Casting unit)).) Equal to True
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is alive) Equal to True
- ((Picked unit) is hidden) Equal to False
-
Then - Actions
- Set VariableSet UDex = (Custom value of (Picked unit))
- Set VariableSet Chosen_Caster[UDex] = (Casting unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in Condemn_Group.) Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to Condemn_Group
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Condemn DoT <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on Condemn DoT <gen>
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_Condemn_Point[udg_UDexNew])
-
Events
-
Condemn DoT
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Condemn_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) has buff Condemn (Inquisitor)) Equal to True
-
Then - Actions
- Set VariableSet UDex = (Custom value of (Picked unit))
- Unit - Cause Condemn_Caster[UDex] to damage (Picked unit), dealing (2.00 x (Real((Level of Condemn (Inquisitor) for Condemn_Caster[UDex])))) damage of attack type Spells and damage type Normal
-
Else - Actions
- Unit Group - Remove (Picked unit) from Condemn_Group.
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Condemn_Group) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in Condemn_Group and do (Actions)
-
Events