- Joined
- Feb 20, 2014
- Messages
- 409
Hi, Here is a "Black Hole" spell.
It moves unit to its center and damage them every second.
But it doesn't damùage them and I can't find the problem.
It moves unit to its center and damage them every second.
But it doesn't damùage them and I can't find the problem.
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Black Hole
-
-
Actions
-
Set BH_Index = (BH_Index + 1)
-
Set BH_Caster[BH_Index] = (Triggering unit)
-
Set TempPoint = (Target point of ability being cast)
-
Set UnitGroup = (Units within 700.00 of TempPoint)
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an enemy of (Owner of BH_Caster[Bh_Loop_Integer])) Equal to True
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_TempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BH_Index Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Black Hole Loop <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Black Hole for (Triggering unit)) Less than or equal to 4
-
-
Then - Actions
-
Set BH_Counter[BH_Index] = 3
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Black Hole for (Triggering unit)) Less than or equal to 8
-
(Level of Black Hole for (Triggering unit)) Greater than or equal to 5
-
-
Then - Actions
-
Set BH_Counter[BH_Index] = 4
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Black Hole for (Triggering unit)) Equal to 9
-
-
Then - Actions
-
Set BH_Counter[BH_Index] = 5
-
-
Else - Actions
-
-
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Actions
-
For each (Integer Bh_Loop_Integer) from 1 to BH_Index, do (Actions)
-
Loop - Actions
-
Set BH_Counter[Bh_Loop_Integer] = (CS_Counter[Bh_Loop_Integer] - 1)
-
Set intellE = (Intelligence of BH_Caster[Bh_Loop_Integer] (Include bonuses))
-
Set intell = ((Real(intellE)) / 10.00)
-
Set TempPoint = (Target point of ability being cast)
-
Set UnitGroup = (Units within 700.00 of TempPoint)
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an enemy of (Owner of BH_Caster[Bh_Loop_Integer])) Equal to True
-
-
Then - Actions
-
Unit - Cause BH_Caster[Bh_Loop_Integer] to damage (Picked unit), dealing (40000.00 + ((intell x 5.00) + (intell x (Real((Level of Black Hole for BH_Caster[BH_Index])))))) damage of attack type Spells and damage type Universal
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_TempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BH_Counter[Bh_Loop_Integer] Less than or equal to 0
-
-
Then - Actions
-
Set BH_Damage[Bh_Loop_Integer] = BH_Damage[BH_Index]
-
Set BH_Counter[Bh_Loop_Integer] = BH_Counter[BH_Index]
-
Set BH_Index = (BH_Index - 1)
-
Set Bh_Loop_Integer = (Bh_Loop_Integer - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BH_Index Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-