- Joined
- Jan 27, 2009
- Messages
- 57
Mana Damage Trigger - Solved
Cant find the error. Can some one please help me? The mana "damage" isnt applying correctly. I'm just getting the base damage, without the add of the Remnants per-unit bonus mana damage. The slow cast part is doing fine.
PS.: New tests revealed that POSSIBLY the Remnants are being detected by the trigger only after they die/expire (leaving a corpse). While active/alive, the Remnants are not getting detected/counted by the trigger. They have the Locust ability.
PS2.: Yeah, just confirmed that. The trigger is only detecting the dead Remnants.. do the fact that they have the Locust ability matters to this issue?
I've been creating things in the WE for a looong time and i cant find what's wrong with this trigger:
Cant find the error. Can some one please help me? The mana "damage" isnt applying correctly. I'm just getting the base damage, without the add of the Remnants per-unit bonus mana damage. The slow cast part is doing fine.
PS.: New tests revealed that POSSIBLY the Remnants are being detected by the trigger only after they die/expire (leaving a corpse). While active/alive, the Remnants are not getting detected/counted by the trigger. They have the Locust ability.
PS2.: Yeah, just confirmed that. The trigger is only detecting the dead Remnants.. do the fact that they have the Locust ability matters to this issue?
I've been creating things in the WE for a looong time and i cant find what's wrong with this trigger:
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Pulse
-
Actions
- Set tmpPoint3 = (Position of (Triggering unit))
-
Unit Group - Pick every unit in (Units within 600.00 of tmpPoint3 matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to PulseUnitGroup
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 600.00 of tmpPoint3 matching ((Unit-type of (Matching unit)) Equal to Dummy (Darkness Remnant))) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to RemnantsGroup
-
Loop - Actions
- Set NumberOfRemnants = (Number of units in RemnantsGroup)
- Set ManaDamage = ((25.00 + (25.00 x (Real((Level of Pulse for (Triggering unit)))))) + ((Real(NumberOfRemnants)) x (5.00 + (5.00 x (Real((Level of Pulse for (Triggering unit))))))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to Balance Spirit (Yin)
-
Then - Actions
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ManaDamage)
-
Loop - Actions
- Unit - Create 1 Dummy for Player 2 (Blue) at tmpPoint3 facing Default building facing degrees
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
-
For each (Integer A) from 1 to (Number of units in PulseUnitGroup), do (Actions)
-
Loop - Actions
- Set TotalUnits = (TotalUnits + 1)
-
Loop - Actions
- Game - Display to (All players) the text: (String(TotalUnits))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 0
-
Then - Actions
- Unit - Add Pulse Slow to (Last created unit)
- Unit - Set level of Pulse Slow for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 1
-
Then - Actions
- Unit - Add Pulse Slow (+1) to (Last created unit)
- Unit - Set level of Pulse Slow (+1) for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 2
-
Then - Actions
- Unit - Add Pulse Slow (+2) to (Last created unit)
- Unit - Set level of Pulse Slow (+2) for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 3
-
Then - Actions
- Unit - Add Pulse Slow (+3) to (Last created unit)
- Unit - Set level of Pulse Slow (+3) for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 4
-
Then - Actions
- Unit - Add Pulse Slow (+4) to (Last created unit)
- Unit - Set level of Pulse Slow (+4) for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumberOfRemnants Equal to 5
-
Then - Actions
- Unit - Add Pulse Slow (+5) to (Last created unit)
- Unit - Set level of Pulse Slow (+5) for (Last created unit) to (Level of Pulse for (Triggering unit))
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
- Unit Group - Remove (Picked unit) from PulseUnitGroup
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in PulseUnitGroup and do (Actions)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_tmpPoint3)
Last edited: