• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Damage Event Trigger

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
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.

  • 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)
 
Level 8
Joined
Apr 30, 2009
Messages
338
Could this be MUI then:

in trigger 1 -

set udg_real = 0.00



in trigger 2 -

Event: udg_real becomes 0.00
---do actions---
Set udg_real = 1.00
 
Level 8
Joined
Apr 30, 2009
Messages
338
Ok is this clean:

(have to use 0.01 second expiration because 0.00 makes it never die)

  • Divine Light 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Paladin
    • Actions
      • Set temp_point = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to PAL-6 Divine Light
        • Then - Actions
          • Set temp_integer = 1
          • Set temp_real = (135.00 + (Real(((Level of (Ability being cast) for (Triggering unit)) x 15))))
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + temp_real)
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + temp_real)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Set temp_integer = ((Level of PAL-P Healing Presence for (Triggering unit)) + 1)
      • Unit - Create 1 T-PAL-P Healing Presence for (Owner of (Triggering unit)) at temp_point facing Default building facing degrees
      • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_temp_point)
      • Hashtable - Save temp_integer as (Key level) of (Key (Last created unit)) in H__Passives
      • Hashtable - Save Handle Of(Triggering unit) as (Key unit) of (Key (Last created unit)) in H__Passives
  • Divine Light 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to T-PAL-P Healing Presence
    • Actions
      • Set temp_timer_integer = (Load (Key level) of (Key (Triggering unit)) from H__Passives)
      • Set temp_timer_unit = (Load (Key unit) of (Key (Triggering unit)) in H__Passives)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in H__Passives
      • Unit - Set level of PAL-6 Divine Light for temp_timer_unit to temp_timer_integer
      • Unit - Set level of PAL-P Healing Presence for temp_timer_unit to temp_timer_integer
      • Unit - Set level of 0-GEN-1 Passives for temp_timer_unit to temp_timer_integer
 
Status
Not open for further replies.
Top