- Joined
- Mar 2, 2013
- Messages
- 127
So I made an ability that summons 3 units and has them charge at 3 random units around the point of ability being cast. They also die after doing 4 hits or the expiration time is up. I need some ideas to make the triggers better, or see what can be improved on.
-
Lightning Hounds
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to (==) Lightning Hounds New
-
-

Actions
-


Set Ka_Unit[2] = (Triggering unit)
-


Special Effect - Create a special effect attached to the Ka_SFX[2] of Ka_Unit[2] using Ka_SFX[0]
-


Special Effect - Destroy (Last created special effect)
-


Special Effect - Create a special effect attached to the Ka_SFX[2] of Ka_Unit[2] using Ka_SFX[1]
-


Special Effect - Destroy (Last created special effect)
-


Wait 0.50 seconds
-


Set Ka_Point[1] = (Position of Ka_Unit[2])
-


Set Ka_Ang[0] = (Facing of Ka_Unit[2])
-


Set Ka_Point[7] = (Target point of ability being cast)
-


Set Ka_Group[2] = (Units within 350.00 of Ka_Point[7] matching ((((Matching unit) belongs to an enemy of (Owner of Ka_Unit[2])) Equal to (==) True) and (((Matching unit) is alive) Equal to (==) True)))
-


Set Ka_Int[10] = 11
-


Set Ka_Int[11] = 8
-


Set Ka_Int[12] = 1
-


Unit Group - Pick every unit in (Random 3 units from Ka_Group[2]) and do (Actions)
-



Loop - Actions
-




Set Ka_Unit[(Ka_Int[10] + Ka_Int[12])] = (Picked unit)
-




Set Ka_Point[(Ka_Int[11] + Ka_Int[12])] = (Position of (Picked unit))
-




Set Ka_Int[12] = (Ka_Int[12] + 1)
-
-
-


Custom script: call DestroyGroup (udg_Ka_Group[2])
-


Trigger - Turn on Hounds unit dies <gen>
-


Trigger - Turn on Hound Hits <gen>
-


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-



Loop - Actions
-




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) is in Ka_Group[1]) Equal to (==) True
-
-





Then - Actions
-





Else - Actions
-






Trigger - Add to Hound Hits <gen> the event (Unit - (Picked unit) Takes damage)
-






Unit Group - Add (Picked unit) to Ka_Group[1]
-
-
-
-
-


Special Effect - Create a special effect attached to the Ka_SFX[2] of Ka_Unit[2] using Ka_SFX[0]
-


Special Effect - Destroy (Last created special effect)
-


Special Effect - Create a special effect attached to the Ka_SFX[2] of Ka_Unit[2] using Ka_SFX[1]
-


Special Effect - Destroy (Last created special effect)
-


Animation - Play Ka_Unit[2]'s stand animation
-



Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(Level of Lightning Hounds New for Ka_Unit[2]) Equal to (==) 1
-
-




Then - Actions
-





Unit - Create 1 Hound1 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing Ka_Ang[0] degrees
-





Set Ka_Unit[3] = (Last created unit)
-





Set Ka_Point[6] = (Position of Ka_Unit[3])
-





Set Ka_Real[5] = 0.00
-





Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[3]
-





Unit - Set Ka_Unit[3] movement speed to (Current movement speed of Ka_Unit[2])
-





Unit - Move Ka_Unit[3] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-





Unit - Order Ka_Unit[3] to Attack (Ka_Point[1] offset by 600.00 towards Ka_Ang[0] degrees)
-





Unit - Create 1 Hound1 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] - 17.00) degrees
-





Set Ka_Unit[4] = (Last created unit)
-





Set Ka_Point[7] = (Position of Ka_Unit[4])
-





Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[4]
-





Unit - Set Ka_Unit[4] movement speed to (Current movement speed of Ka_Unit[2])
-





Unit - Move Ka_Unit[4] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-





Unit - Order Ka_Unit[4] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] - 17.00) degrees)
-





Unit - Create 1 Hound1 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] + 17.00) degrees
-





Set Ka_Unit[5] = (Last created unit)
-





Set Ka_Point[8] = (Position of Ka_Unit[5])
-





Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[5]
-





Unit - Set Ka_Unit[5] movement speed to (Current movement speed of Ka_Unit[2])
-





Unit - Move Ka_Unit[5] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-





Unit - Order Ka_Unit[5] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] + 17.00) degrees)
-





Trigger - Turn on Hounds Move <gen>
-
-




Else - Actions
-





Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-






If - Conditions
-







(Level of Lightning Hounds New for Ka_Unit[2]) Equal to (==) 2
-
-






Then - Actions
-







Unit - Create 1 Hound2 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing Ka_Ang[0] degrees
-







Set Ka_Unit[3] = (Last created unit)
-







Set Ka_Point[6] = (Position of Ka_Unit[3])
-







Set Ka_Real[5] = 25.00
-







Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[3]
-







Unit - Set Ka_Unit[3] movement speed to (Current movement speed of Ka_Unit[2])
-







Unit - Move Ka_Unit[3] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-







Unit - Order Ka_Unit[3] to Attack (Ka_Point[1] offset by 600.00 towards Ka_Ang[0] degrees)
-







Unit - Create 1 Hound2 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] - 17.00) degrees
-







Set Ka_Unit[4] = (Last created unit)
-







Set Ka_Point[7] = (Position of Ka_Unit[4])
-







Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[4]
-







Unit - Set Ka_Unit[4] movement speed to (Current movement speed of Ka_Unit[2])
-







Unit - Move Ka_Unit[4] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-







Unit - Order Ka_Unit[4] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] - 17.00) degrees)
-







Unit - Create 1 Hound2 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] + 17.00) degrees
-







Set Ka_Unit[5] = (Last created unit)
-







Set Ka_Point[8] = (Position of Ka_Unit[5])
-







Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[5]
-







Unit - Set Ka_Unit[5] movement speed to (Current movement speed of Ka_Unit[2])
-







Unit - Move Ka_Unit[5] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-







Unit - Order Ka_Unit[5] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] + 17.00) degrees)
-







Trigger - Turn on Hounds Move <gen>
-
-






Else - Actions
-







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-








If - Conditions
-









(Level of Lightning Hounds New for Ka_Unit[2]) Equal to (==) 3
-
-








Then - Actions
-









Unit - Create 1 Hound3 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing Ka_Ang[0] degrees
-









Set Ka_Unit[3] = (Last created unit)
-









Set Ka_Point[6] = (Position of Ka_Unit[3])
-









Set Ka_Real[5] = 50.00
-









Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[3]
-









Unit - Set Ka_Unit[3] movement speed to (Current movement speed of Ka_Unit[2])
-









Unit - Move Ka_Unit[3] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-









Unit - Order Ka_Unit[3] to Attack (Ka_Point[1] offset by 600.00 towards Ka_Ang[0] degrees)
-









Unit - Create 1 Hound3 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] - 17.00) degrees
-









Set Ka_Unit[4] = (Last created unit)
-









Set Ka_Point[7] = (Position of Ka_Unit[4])
-









Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[4]
-









Unit - Set Ka_Unit[4] movement speed to (Current movement speed of Ka_Unit[2])
-









Unit - Move Ka_Unit[4] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-









Unit - Order Ka_Unit[4] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] - 17.00) degrees)
-









Unit - Create 1 Hound3 for (Owner of Ka_Unit[2]) at Ka_Point[1] facing (Ka_Ang[0] + 17.00) degrees
-









Set Ka_Unit[5] = (Last created unit)
-









Set Ka_Point[8] = (Position of Ka_Unit[5])
-









Unit - Add a 10.00 second Generic expiration timer to Ka_Unit[5]
-









Unit - Set Ka_Unit[5] movement speed to (Current movement speed of Ka_Unit[2])
-









Unit - Move Ka_Unit[5] instantly to (Ka_Point[1] offset by 50.00 towards Ka_Ang[0] degrees)
-









Unit - Order Ka_Unit[5] to Attack (Ka_Point[1] offset by 600.00 towards (Ka_Ang[0] + 17.00) degrees)
-









Trigger - Turn on Hounds Move <gen>
-
-








Else - Actions
-
-
-
-
-
-
-


Wait 10.00 seconds
-


Set Ka_Int[0] = 0
-


Set Ka_Int[1] = 0
-


Set Ka_Int[2] = 0
-


Trigger - Turn off Hounds unit dies <gen>
-


Trigger - Turn off Hound Hits <gen>
-
-
-
Hounds Move
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Ka_Unit[12] Equal to (==) No unit
-




Ka_Int[7] Not equal to (!=) 1
-
-



Then - Actions
-




Custom script: call RemoveLocation(udg_Ka_Point[9])
-




Custom script: call RemoveLocation(udg_Ka_Point[6])
-




Set Ka_Int[7] = 1
-
-



Else - Actions
-




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Distance between Ka_Point[6] and Ka_Point[9]) Less than or equal to (<=) 125.00
-






Ka_Int[7] Not equal to (!=) 1
-
-





Then - Actions
-






Unit - Order Ka_Unit[3] to attack Ka_Unit[12]
-






Unit - Cause Ka_Unit[2] to damage Ka_Unit[12], dealing (75.00 + Ka_Real[5]) damage of attack type Spells and damage type Normal
-






Custom script: call RemoveLocation(udg_Ka_Point[9])
-






Custom script: call RemoveLocation(udg_Ka_Point[6])
-






Set Ka_Int[7] = 1
-
-





Else - Actions
-






Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Ka_Int[7] Not equal to (!=) 1
-
-







Then - Actions
-








-------- Target --------
-








Set Ka_Point[9] = (Position of Ka_Unit[12])
-








-------- Wolf --------
-








Set Ka_Point[6] = (Position of Ka_Unit[3])
-








Unit - Move Ka_Unit[3] instantly to (Ka_Point[6] offset by 30.00 towards (Angle from Ka_Point[6] to Ka_Point[9]) degrees), facing (Angle from Ka_Point[6] to Ka_Point[9]) degrees
-
-







Else - Actions
-
-
-
-
-
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Ka_Unit[13] Equal to (==) No unit
-




Ka_Int[8] Not equal to (!=) 1
-
-



Then - Actions
-




Custom script: call RemoveLocation(udg_Ka_Point[10])
-




Custom script: call RemoveLocation(udg_Ka_Point[7])
-




Set Ka_Int[8] = 1
-
-



Else - Actions
-




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Distance between Ka_Point[7] and Ka_Point[10]) Less than or equal to (<=) 125.00
-






Ka_Int[8] Not equal to (!=) 1
-
-





Then - Actions
-






Unit - Order Ka_Unit[4] to attack Ka_Unit[13]
-






Unit - Cause Ka_Unit[2] to damage Ka_Unit[13], dealing (75.00 + Ka_Real[5]) damage of attack type Spells and damage type Normal
-






Custom script: call RemoveLocation(udg_Ka_Point[10])
-






Custom script: call RemoveLocation(udg_Ka_Point[7])
-






Set Ka_Int[8] = 1
-
-





Else - Actions
-






Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Ka_Int[8] Not equal to (!=) 1
-
-







Then - Actions
-








-------- Target --------
-








Set Ka_Point[10] = (Position of Ka_Unit[13])
-








-------- Wolf --------
-








Set Ka_Point[7] = (Position of Ka_Unit[4])
-








Unit - Move Ka_Unit[4] instantly to (Ka_Point[7] offset by 30.00 towards (Angle from Ka_Point[7] to Ka_Point[10]) degrees), facing (Angle from Ka_Point[7] to Ka_Point[10]) degrees
-
-







Else - Actions
-
-
-
-
-
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Ka_Unit[14] Equal to (==) No unit
-




Ka_Int[9] Not equal to (!=) 1
-
-



Then - Actions
-




Custom script: call RemoveLocation(udg_Ka_Point[11])
-




Custom script: call RemoveLocation(udg_Ka_Point[8])
-




Set Ka_Int[9] = 1
-
-



Else - Actions
-




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Distance between Ka_Point[8] and Ka_Point[11]) Less than or equal to (<=) 125.00
-






Ka_Int[9] Not equal to (!=) 1
-
-





Then - Actions
-






Unit - Order Ka_Unit[5] to attack Ka_Unit[14]
-






Unit - Cause Ka_Unit[2] to damage Ka_Unit[14], dealing (75.00 + Ka_Real[5]) damage of attack type Spells and damage type Normal
-






Custom script: call RemoveLocation(udg_Ka_Point[11])
-






Custom script: call RemoveLocation(udg_Ka_Point[8])
-






Set Ka_Int[9] = 1
-
-





Else - Actions
-






Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Ka_Int[9] Not equal to (!=) 1
-
-







Then - Actions
-








-------- Target --------
-








Set Ka_Point[11] = (Position of Ka_Unit[14])
-








-------- Wolf --------
-








Set Ka_Point[8] = (Position of Ka_Unit[5])
-








Unit - Move Ka_Unit[5] instantly to (Ka_Point[8] offset by 30.00 towards (Angle from Ka_Point[8] to Ka_Point[11]) degrees), facing (Angle from Ka_Point[8] to Ka_Point[11]) degrees
-
-







Else - Actions
-
-
-
-
-
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Ka_Int[7] Equal to (==) 1
-




Ka_Int[8] Equal to (==) 1
-




Ka_Int[9] Equal to (==) 1
-
-



Then - Actions
-




Game - Display to (All players) the text: Trigger off.
-




Set Ka_Real[5] = 0.00
-




Set Ka_Int[7] = 0
-




Set Ka_Int[8] = 0
-




Set Ka_Int[9] = 0
-




Set Ka_Unit[12] = No unit
-




Set Ka_Unit[13] = No unit
-




Set Ka_Unit[14] = No unit
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
-
Hound Hits
-

Events
-

Conditions
-


Multiple ConditionsOr - Any (Conditions) are true
-



Conditions
-




(Damage source) Equal to (==) Ka_Unit[3]
-




(Damage source) Equal to (==) Ka_Unit[4]
-




(Damage source) Equal to (==) Ka_Unit[5]
-
-
-
-

Actions
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Damage source) Equal to (==) Ka_Unit[3]
-
-



Then - Actions
-




Set Ka_Int[0] = (Ka_Int[0] + 1)
-




Game - Display to (All players) the text: ((String(Ka_Int[0])) + hits have been detected.)
-





Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-






If - Conditions
-







Ka_Int[0] Equal to (==) 4
-
-






Then - Actions
-







Unit - Remove Ka_Unit[3] from the game
-







Set Ka_Unit[3] = No unit
-







Set Ka_Int[0] = 0
-
-






Else - Actions
-
-
-
-



Else - Actions
-




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Damage source) Equal to (==) Ka_Unit[4]
-
-





Then - Actions
-






Set Ka_Int[1] = (Ka_Int[1] + 1)
-






Game - Display to (All players) the text: ((String(Ka_Int[1])) + hits have been detected.)
-







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-








If - Conditions
-









Ka_Int[1] Equal to (==) 4
-
-








Then - Actions
-









Unit - Remove Ka_Unit[4] from the game
-









Set Ka_Unit[4] = No unit
-









Set Ka_Int[1] = 0
-
-








Else - Actions
-
-
-
-





Else - Actions
-






Set Ka_Int[2] = (Ka_Int[2] + 1)
-






Game - Display to (All players) the text: ((String(Ka_Int[2])) + hits have been detected.)
-







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-








If - Conditions
-









Ka_Int[2] Equal to (==) 4
-
-








Then - Actions
-









Unit - Remove Ka_Unit[5] from the game
-









Set Ka_Unit[5] = No unit
-









Set Ka_Int[2] = 0
-
-








Else - Actions
-
-
-
-
-
-
-
-
-
Hounds unit dies
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


((Triggering unit) is A Hero) Not equal to (!=) True
-


((Triggering unit) is in Ka_Group[1]) Equal to (==) True
-
-

Actions
-


Unit Group - Remove (Triggering unit) from Ka_Group[1]
-
-
