-
Splitting Fireball Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
Conditions
-
Actions
-
For each (Integer SF_loop) from 1 to SF_Index2, do (Actions)
-
Loop - Actions
-
Set SF_Distances[SF_loop] = (Distance between SF_DummyPoint[SF_loop] and SF_TargetPoint[SF_loop])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SF_Distances[SF_loop] Greater than 20.00
-
(SF_Target[SF_loop] is dead) Not equal to True
-
(SF_Caster[SF_loop] is dead) Not equal to True
-
SF_Expired[SF_loop] Less than SF_Duration[SF_loop]
-
Then - Actions
-
Set SF_Expired[SF_loop] = (SF_Expired[SF_loop] + 0.03)
-
Set SF_TargetPoint[SF_loop] = (Position of SF_Target[SF_loop])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SF_Angle[SF_loop] Less than 30.00
-
SF_Angle2[SF_loop] Less than 30.00
-
Then - Actions
-
Set SF_Angle[SF_loop] = (SF_Angle[SF_loop] + 5.00)
-
Set SF_Angle2[SF_loop] = (SF_Angle2[SF_loop] - 5.00)
-
Else - Actions
-
Set SF_Angle[SF_loop] = (SF_Angle[SF_loop] - 5.00)
-
Set SF_Angle2[SF_loop] = (SF_Angle2[SF_loop] + 5.00)
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by SF_Distance[SF_loop] towards ((Facing of SF_Dummy[SF_loop]) + SF_Angle[SF_loop]) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy2[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by SF_Distance[SF_loop] towards ((Facing of SF_Dummy2[SF_loop]) + SF_Angle2[SF_loop]) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy2[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_SF_DummyPoint[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_DummyPoint2[udg_SF_loop])
-
Set SF_DummyPoint[SF_loop] = (Position of SF_Dummy[SF_loop])
-
Set SF_DummyPoint2[SF_loop] = (Position of SF_Dummy2[SF_loop])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SF_Expired[SF_loop] Greater than or equal to 0.12
-
SF_Splitted[SF_loop] Equal to False
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 100) Equal to 1
-
Then - Actions
-
Set SF_Splitted[SF_loop] = True
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by 150.00 towards ((Facing of SF_Dummy[SF_loop]) - 90.00) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy3[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy2[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by 150.00 towards ((Facing of SF_Dummy2[SF_loop]) + 90.00) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy4[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
Set SF_DummyPoint3[SF_loop] = (Position of SF_Dummy3[SF_loop])
-
Set SF_DummyPoint4[SF_loop] = (Position of SF_Dummy4[SF_loop])
-
Else - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SF_Splitted[SF_loop] Equal to True
-
Then - Actions
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy3[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by SF_Distance[SF_loop] towards ((Facing of SF_Dummy3[SF_loop]) + SF_Angle[SF_loop]) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy3[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
-------- Create Dummies (Main) --------
-
-------- --------------------------------------------------------------------- --------
-
Set SF_TempPoint = (Position of SF_Dummy4[SF_loop])
-
Set SF_TempPoint2 = (SF_TempPoint offset by SF_Distance[SF_loop] towards ((Facing of SF_Dummy4[SF_loop]) + SF_Angle2[SF_loop]) degrees)
-
Unit - Create 1 SF_Dummy for SF_Player[SF_loop] at SF_TempPoint2 facing SF_TargetPoint[SF_loop]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Set SF_Dummy4[SF_loop] = (Last created unit)
-
Custom script: call RemoveLocation(udg_SF_TempPoint)
-
Custom script: call RemoveLocation(udg_SF_TempPoint2)
-
-------- --------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_SF_DummyPoint3[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_DummyPoint4[udg_SF_loop])
-
Set SF_DummyPoint3[SF_loop] = (Position of SF_Dummy3[SF_loop])
-
Set SF_DummyPoint4[SF_loop] = (Position of SF_Dummy4[SF_loop])
-
Else - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SF_Splitted[SF_loop] Equal to True
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of SF_TargetPoint[SF_loop] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Equal to SF_Target[SF_loop]
-
Then - Actions
-
-------- --------------------------------------------------------------------- --------
-
-------- Deal damage x 2 to the main target --------
-
-------- --------------------------------------------------------------------- --------
-
Unit - Cause SF_Caster[SF_loop] to damage SF_Target[SF_loop], dealing (SF_Damage[SF_loop] x 2.00) damage of attack type Spells and damage type Normal
-
Else - Actions
-
-------- --------------------------------------------------------------------- --------
-
-------- Deal half damage to surronding enemies --------
-
-------- --------------------------------------------------------------------- --------
-
Unit - Cause SF_Caster[SF_loop] to damage (Picked unit), dealing (SF_Damage[SF_loop] / 2.00) damage of attack type Spells and damage type Normal
-
Else - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of SF_TargetPoint[SF_loop] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Equal to SF_Target[SF_loop]
-
Then - Actions
-
-------- --------------------------------------------------------------------- --------
-
-------- Deal damage to the main target --------
-
-------- --------------------------------------------------------------------- --------
-
Unit - Cause SF_Caster[SF_loop] to damage SF_Target[SF_loop], dealing SF_Damage[SF_loop] damage of attack type Spells and damage type Normal
-
Else - Actions
-
-------- --------------------------------------------------------------------- --------
-
-------- Deal quarter damage to surronding enemies --------
-
-------- --------------------------------------------------------------------- --------
-
Unit - Cause SF_Caster[SF_loop] to damage (Picked unit), dealing (SF_Damage[SF_loop] / 4.00) damage of attack type Spells and damage type Normal
-
Custom script: call RemoveLocation(udg_SF_DummyPoint[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_DummyPoint2[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_DummyPoint3[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_DummyPoint4[udg_SF_loop])
-
Custom script: call RemoveLocation(udg_SF_TargetPoint[udg_SF_loop])
-
Set SF_Index2 = (SF_Index2 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Set SF_Index1 = 0
-
Trigger - Turn off (This trigger)
-
Else - Actions
-
[/hidden]
Instructions on how to move into your map :
1. Copy Abilitiy (Splitting Fireballs) and Unit (SF_Dummy)
2. Copy Splitting Fireball <gen> and Splitting Fireball Loop
3. Make sure all values are right;
Ability being cast is equal to Splitting Fireball
The right unit is created.
And damage is "X" level of Spitting Fireball
Update :
Removed un-needed wait.
Added a 1% chance that the fireballs will split into another.
Redone the 1% chane so it only happens every 0.12
Units removed in a more clean way.
If Target is not in 250 range of Dummy position then, target not hurt.
Small changes
- Moved triggers around abit
- Got rid of Dummy Group
- Got rid of some unneccesary variables.
- Increased damage select range to 400.
Changed from Owner of to Player.
Keywords:
fire, ball, fireball, split, four, damage, aoe, spell, gui, mui