Imported a custom damage event system (GDD) and just want to know about efficiency here.
Want to know if I should keep the trigger like this, or have multiple small triggers instead. The trigger as is is somewhat laggy when working with it.
Want to know if I should keep the trigger like this, or have multiple small triggers instead. The trigger as is is somewhat laggy when working with it.
-
Damage
-

Events
-


Game - GDD_Event becomes Equal to 0.00
-
-

Conditions
-

Actions
-


-------- Berserker --------
-


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



If - Conditions
-




(GDD_DamageSource has buff 0_BRS-3 Challenge ) Equal to True
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamageSource)
-




Set temp_group = (Units within 1.00 of temp_point)
-




Unit Group - Remove all units of temp_group from temp_group
-




Unit Group - Add GDD_DamageSource to temp_group
-




Unit Group - Pick every unit in temp_group and do (Actions)
-





Loop - Actions
-






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







If - Conditions
-








GDD_DamagedUnit Equal to (Load (Key caster) of (Key (Picked unit)) in H_BRS_Challenge)
-








(GDD_DamagedUnit has buff 0_PAL-3 Sanctified Bond ) Equal to False
-
-







Then - Actions
-








Hashtable - Save ((Load (Key damage) of (Key (Picked unit)) from H_BRS_Challenge) + GDD_Damage) as (Key damage) of (Key (Picked unit)) in H_BRS_Challenge
-
-







Else - Actions
-








Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + (0.50 x GDD_Damage))
-
-
-
-
-
-



Else - Actions
-
-


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



If - Conditions
-




(GDD_DamagedUnit has buff 0_BRS-6 Berserk ) Equal to True
-




(GDD_DamagedUnit has buff 0_PAL-3 Sanctified Bond ) Equal to False
-




GDD_DamageSource Not equal to GDD_DamagedUnit
-
-



Then - Actions
-




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





If - Conditions
-






(Life of GDD_DamagedUnit) Greater than (1.25 x GDD_Damage)
-
-





Then - Actions
-






Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) - (0.25 x GDD_Damage))
-
-





Else - Actions
-






Unit - Set life of GDD_DamagedUnit to 1.00
-
-
-
-



Else - Actions
-
-


-------- Paladin --------
-


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



If - Conditions
-




(GDD_DamagedUnit has buff 0_PAL-3 Sanctified Bond ) Equal to True
-
-



Then - Actions
-




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





If - Conditions
-






GDD_Damage Less than or equal to ((Max life of GDD_DamagedUnit) - (Life of GDD_DamagedUnit))
-
-





Then - Actions
-






Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + GDD_Damage)
-
-





Else - Actions
-






Set temp_timer_unit = GDD_DamagedUnit
-






Set temp_timer_real = (Life of GDD_DamagedUnit)
-






Countdown Timer - Start T_PAL_SanctifiedBond as a One-shot timer that will expire in 0.00 seconds
-
-
-
-



Else - Actions
-
-


-------- Assassin --------
-


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



If - Conditions
-




(GDD_DamageSource has buff Unknown (B009)) Equal to True
-
-



Then - Actions
-




Unit Group - Add GDD_DamageSource to GDD__Group
-




Unit Group - Pick every unit in GDD__Group and do (Actions)
-





Loop - Actions
-






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







If - Conditions
-








GDD_DamagedUnit Equal to (Load (Key target) of (Key (Picked unit)) in H_ASN_LotusExtract)
-
-







Then - Actions
-








Unit - Set life of GDD_DamageSource to ((Life of GDD_DamageSource) + (0.33 x GDD_Damage))
-








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









If - Conditions
-










GDD_Damage Greater than or equal to 10.00
-
-









Then - Actions
-










Special Effect - Create a special effect attached to the chest of GDD_DamageSource using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
-










Special Effect - Destroy (Last created special effect)
-










Special Effect - Create a special effect attached to the origin of GDD_DamagedUnit using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
-










Special Effect - Destroy (Last created special effect)
-
-









Else - Actions
-
-
-







Else - Actions
-
-
-
-




Unit Group - Remove GDD_DamageSource from GDD__Group
-
-



Else - Actions
-
-


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



If - Conditions
-




(GDD_DamageSource has buff ~ASN-6 Flurry (Assassin)) Equal to True
-
-



Then - Actions
-




Unit Group - Add GDD_DamageSource to GDD__Group
-




Unit Group - Pick every unit in GDD__Group and do (Actions)
-





Loop - Actions
-






Unit - Cause (Load (Key source) of (Key (Picked unit)) in H_ASN_Flurry) to damage GDD_DamagedUnit, dealing (0.25 x GDD_Damage) damage of attack type Spells and damage type Magic
-






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







If - Conditions
-








GDD_Damage Greater than or equal to 10.00
-
-







Then - Actions
-








Floating Text - Create floating text that reads (String((Integer((1.25 x GDD_Damage))))) above GDD_DamagedUnit with Z offset 32.00, using font size 12.00, color (75.00%, 25.00%, 100.00%), and 0.00% transparency
-








Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Random real number between 30.00 and 150.00) degrees
-








Floating Text - Change (Last created floating text): Disable permanence
-








Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
-








Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
-








Special Effect - Create a special effect attached to the origin of GDD_DamagedUnit using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-








Special Effect - Destroy (Last created special effect)
-
-







Else - Actions
-
-






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







If - Conditions
-








GDD_DamagedUnit Equal to (Load (Key target) of (Key (Picked unit)) in H_ASN_LotusExtract)
-
-







Then - Actions
-








Unit - Set life of GDD_DamageSource to ((Life of GDD_DamageSource) + (0.33 x (0.25 x GDD_Damage)))
-
-







Else - Actions
-
-
-
-




Unit Group - Remove GDD_DamageSource from GDD__Group
-
-



Else - Actions
-
-


-------- Ranger --------
-


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



If - Conditions
-




(Unit-type of GDD_DamageSource) Equal to D.RNG-1 Searing Arrow
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamageSource)
-




Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-




Custom script: call SaveReal(udg_H_RNG_SearingArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("duration"),3)
-




Custom script: call SaveReal(udg_H_RNG_SearingArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("damage"),2)
-




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





If - Conditions
-






(GDD_DamagedUnit is in G_RNG_SearingArrow) Equal to False
-
-





Then - Actions
-






Unit Group - Add GDD_DamagedUnit to G_RNG_SearingArrow
-






Unit - Add RNG-D1 Searing Arrow to GDD_DamagedUnit
-






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







If - Conditions
-








(Searing Arrow 002 <gen> is on) Equal to False
-
-







Then - Actions
-








Trigger - Turn on Searing Arrow 002 <gen>
-
-







Else - Actions
-
-
-





Else - Actions
-
-




Custom script: call SaveUnitHandle(udg_H_RNG_SearingArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("source"),GetLastCreatedUnit())
-




Custom script: call RemoveLocation(udg_temp_point)
-




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





If - Conditions
-






(Level of RNG-D5 Explosive Arrows for GDD_DamageSource) Greater than 0
-
-





Then - Actions
-






Set temp_point = (Position of GDD_DamagedUnit)
-






Special Effect - Create a special effect at temp_point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-






Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






Set temp_group = (Units within 250.00 of temp_point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of GDD_DamageSource)) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-






Set temp_unit = (Last created unit)
-






Unit Group - Pick every unit in temp_group and do (Actions)
-







Loop - Actions
-








Unit - Cause temp_unit to damage (Picked unit), dealing 15.00 damage of attack type Spells and damage type Magic
-








Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-








Special Effect - Destroy (Last created special effect)
-








Unit Group - Remove (Picked unit) from temp_group
-
-
-






Custom script: call DestroyGroup(udg_temp_group)
-






Custom script: call RemoveLocation(udg_temp_point)
-
-





Else - Actions
-
-




Set temp_timer_unit = GDD_DamageSource
-




Countdown Timer - Start T_RNG_ArrowRemove as a One-shot timer that will expire in 0.00 seconds
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of GDD_DamageSource) Equal to D.RNG-2 Venemous Arrow
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamagedUnit)
-




Set temp_real = ((0.10 x (Max life of GDD_DamagedUnit)) x R_FRAME_OVERTIME)
-




Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-




Custom script: call SaveReal(udg_H_RNG_VenemousArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("duration"),5)
-




Custom script: call SaveReal(udg_H_RNG_VenemousArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("damage"),udg_temp_real)
-




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





If - Conditions
-






(GDD_DamagedUnit is in G_RNG_VenemousArrow) Equal to False
-
-





Then - Actions
-






Unit Group - Add GDD_DamagedUnit to G_RNG_VenemousArrow
-






Unit - Add RNG-D2 Venemous Arrow to GDD_DamagedUnit
-






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







If - Conditions
-








(Venemous Arrow 002 <gen> is on) Equal to False
-
-







Then - Actions
-








Trigger - Turn on Venemous Arrow 002 <gen>
-
-







Else - Actions
-
-
-





Else - Actions
-
-




Custom script: call SaveUnitHandle(udg_H_RNG_VenemousArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("source"),GetLastCreatedUnit())
-




Custom script: call RemoveLocation(udg_temp_point)
-




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





If - Conditions
-






(Level of RNG-D5 Explosive Arrows for GDD_DamageSource) Greater than 0
-
-





Then - Actions
-






Set temp_point = (Position of GDD_DamagedUnit)
-






Special Effect - Create a special effect at temp_point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-






Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






Set temp_group = (Units within 250.00 of temp_point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of GDD_DamageSource)) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-






Set temp_unit = (Last created unit)
-






Unit Group - Pick every unit in temp_group and do (Actions)
-







Loop - Actions
-








Unit - Cause temp_unit to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
-








Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-








Special Effect - Destroy (Last created special effect)
-








Unit Group - Remove (Picked unit) from temp_group
-
-
-






Custom script: call DestroyGroup(udg_temp_group)
-






Custom script: call RemoveLocation(udg_temp_point)
-
-





Else - Actions
-
-




Set temp_timer_unit = GDD_DamageSource
-




Countdown Timer - Start T_RNG_ArrowRemove as a One-shot timer that will expire in 0.00 seconds
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of GDD_DamageSource) Equal to D.RNG-3 Obsidian Arrow
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamagedUnit)
-




Set temp_real = (0.50 x (Mana of GDD_DamagedUnit))
-




Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-




Unit - Cause (Last created unit) to damage GDD_DamagedUnit, dealing (0.50 x temp_real) damage of attack type Spells and damage type Magic
-




Unit - Set mana of GDD_DamagedUnit to temp_real
-




Custom script: call SaveReal(udg_H_RNG_ObsidianArrow,GetHandleId(udg_GDD_DamagedUnit),StringHash("duration"),10)
-




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





If - Conditions
-






(GDD_DamagedUnit is in G_RNG_ObsidianArrow) Equal to False
-
-





Then - Actions
-






Unit Group - Add GDD_DamagedUnit to G_RNG_ObsidianArrow
-






Unit - Add RNG-D3 Obsidian Arrow to GDD_DamagedUnit
-






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







If - Conditions
-








(Obsidian Arrow 002 <gen> is on) Equal to False
-
-







Then - Actions
-








Trigger - Turn on Obsidian Arrow 002 <gen>
-
-







Else - Actions
-
-
-





Else - Actions
-
-




Custom script: call RemoveLocation(udg_temp_point)
-




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





If - Conditions
-






(Level of RNG-D5 Explosive Arrows for GDD_DamageSource) Greater than 0
-
-





Then - Actions
-






Set temp_point = (Position of GDD_DamagedUnit)
-






Special Effect - Create a special effect at temp_point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-






Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






Set temp_group = (Units within 250.00 of temp_point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of GDD_DamageSource)) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-






Set temp_unit = (Last created unit)
-






Unit Group - Pick every unit in temp_group and do (Actions)
-







Loop - Actions
-








Unit - Cause temp_unit to damage (Picked unit), dealing 15.00 damage of attack type Spells and damage type Magic
-








Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-








Special Effect - Destroy (Last created special effect)
-








Unit Group - Remove (Picked unit) from temp_group
-
-
-






Custom script: call DestroyGroup(udg_temp_group)
-






Custom script: call RemoveLocation(udg_temp_point)
-
-





Else - Actions
-
-




Set temp_timer_unit = GDD_DamageSource
-




Countdown Timer - Start T_RNG_ArrowRemove as a One-shot timer that will expire in 0.00 seconds
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of GDD_DamageSource) Equal to D.RNG-4 Point-Blank Shot
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamagedUnit)
-




Set temp_point2 = (Position of GDD_DamageSource)
-




Set temp_real = (Angle from temp_point2 to temp_point)
-




Unit - Create 1 D.RNG-4 (Stun) Point-Blank Shot for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-




Unit - Order (Last created unit) to Neutral - Firebolt GDD_DamagedUnit
-




Custom script: call SaveReal(udg_H_RNG_PointBlankShot,GetHandleId(udg_GDD_DamagedUnit),StringHash("angle"),udg_temp_real)
-




Custom script: call SaveReal(udg_H_RNG_PointBlankShot,GetHandleId(udg_GDD_DamagedUnit),StringHash("duration"),1)
-




Custom script: call SaveReal(udg_H_RNG_PointBlankShot,GetHandleId(udg_GDD_DamagedUnit),StringHash("speed"),12.75)
-




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





If - Conditions
-






(GDD_DamagedUnit is in G_RNG_PointBlankShot) Equal to False
-
-





Then - Actions
-






Unit Group - Add GDD_DamagedUnit to G_RNG_PointBlankShot
-






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







If - Conditions
-








(Point Blank Shot 002 <gen> is on) Equal to False
-
-







Then - Actions
-








Trigger - Turn on Point Blank Shot 002 <gen>
-
-







Else - Actions
-
-
-





Else - Actions
-
-




Custom script: call RemoveLocation(udg_temp_point)
-




Custom script: call RemoveLocation(udg_temp_point2)
-




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





If - Conditions
-






(Level of RNG-D5 Explosive Arrows for GDD_DamageSource) Greater than 0
-
-





Then - Actions
-






Set temp_point = (Position of GDD_DamagedUnit)
-






Special Effect - Create a special effect at temp_point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-






Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






Set temp_group = (Units within 250.00 of temp_point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of GDD_DamageSource)) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-






Set temp_unit = (Last created unit)
-






Unit Group - Pick every unit in temp_group and do (Actions)
-







Loop - Actions
-








Unit - Cause temp_unit to damage (Picked unit), dealing 15.00 damage of attack type Spells and damage type Magic
-








Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-








Special Effect - Destroy (Last created special effect)
-








Unit Group - Remove (Picked unit) from temp_group
-
-
-






Custom script: call DestroyGroup(udg_temp_group)
-






Custom script: call RemoveLocation(udg_temp_point)
-
-





Else - Actions
-
-




Set temp_timer_unit = GDD_DamageSource
-




Countdown Timer - Start T_RNG_ArrowRemove as a One-shot timer that will expire in 0.00 seconds
-
-



Else - Actions
-
-


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



If - Conditions
-




GDD_Damage Greater than 0.00
-




(Level of RNG-D5 Explosive Arrows for GDD_DamageSource) Greater than 0
-




(GDD_DamageSource is A Hero) Equal to True
-




(GDD_DamageSource belongs to an ally of (Owner of GDD_DamagedUnit)) Equal to False
-
-



Then - Actions
-




Set temp_point = (Position of GDD_DamagedUnit)
-




Special Effect - Create a special effect at temp_point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
-




Special Effect - Destroy (Last created special effect)
-




Unit - Create 1 D.RNG Arrow Source for (Owner of GDD_DamageSource) at temp_point facing Default building facing degrees
-




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-




Set temp_group = (Units within 250.00 of temp_point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of GDD_DamageSource)) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-




Set temp_unit = (Last created unit)
-




Unit Group - Pick every unit in temp_group and do (Actions)
-





Loop - Actions
-






Unit - Cause temp_unit to damage (Picked unit), dealing 15.00 damage of attack type Spells and damage type Magic
-






Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit Group - Remove (Picked unit) from temp_group
-
-
-




Custom script: call DestroyGroup(udg_temp_group)
-




Custom script: call RemoveLocation(udg_temp_point)
-
-



Else - Actions
-
-
-
-
Berserker Damage
-

Events
-


Game - GDD_Event becomes Equal to 0.00
-
-

Conditions
-


(GDD_DamageSource has buff 0_BRS-3 Challenge ) Equal to True
-
-

Actions
-


Set temp_point = (Position of GDD_DamageSource)
-


Set temp_group = (Units within 1.00 of temp_point)
-


Unit Group - Remove all units of temp_group from temp_group
-


Unit Group - Add GDD_DamageSource to temp_group
-


Unit Group - Pick every unit in temp_group and do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






GDD_DamagedUnit Equal to (Load (Key caster) of (Key (Picked unit)) in H_BRS_Challenge)
-






(GDD_DamagedUnit has buff 0_PAL-3 Sanctified Bond ) Equal to False
-
-





Then - Actions
-






Hashtable - Save ((Load (Key damage) of (Key (Picked unit)) from H_BRS_Challenge) + GDD_Damage) as (Key damage) of (Key (Picked unit)) in H_BRS_Challenge
-
-





Else - Actions
-






Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + (0.50 x GDD_Damage))
-
-
-
-
-


Custom script: call DestroyGroup(udg_temp_group)
-
-




