• 🏆 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!

[SOLVED] Spell like immolation

Status
Not open for further replies.
Level 5
Joined
Jun 26, 2016
Messages
60
  • ImmolationDamage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Immolation berserk
    • Actions
      • Set VariableSet Immolation_Caster = (Triggering unit)
      • Set VariableSet Immolation_Caster_Loc = (Position of (Triggering unit))
      • Set VariableSet Immolation_Damage_Group = (Units within 300.00 of Immolation_Caster_Loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Immolation_Caster).) Equal to True) and (((Matching unit) is alive) Equal to True))).)
      • Unit - Create 1 Dummy Caster Immolation for (Owner of Immolation_Caster) at Immolation_Caster_Loc facing (Facing of Immolation_Caster) degrees
      • Unit - Set level of Advanced - Untargeted Dummyspell immolation thunderclap for (Last created unit) to (Level of Immolation berserk for Immolation_Caster)
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap.
      • Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect at Infernal_Strike_Location using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Special Effect - Destroy (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Immolation_Caster is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Immolation_Damage_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Immolation_Caster to damage (Picked unit), dealing (((0.05 x (Real((Level of Immolation berserk for Immolation_Caster)))) + 0.05) x (Real((Agility of Immolation_Caster (Include bonuses))))) damage of attack type Spells and damage type Fire
              • Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
              • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • Wait 0.90 game-time seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Immolation_Caster is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Immolation_Damage_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Immolation_Caster to damage (Picked unit), dealing (((0.05 x (Real((Level of Immolation berserk for Immolation_Caster)))) + 0.05) x (Real((Agility of Immolation_Caster (Include bonuses))))) damage of attack type Spells and damage type Fire
              • Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
              • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • Wait 0.90 game-time seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Immolation_Caster is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Immolation_Damage_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Immolation_Caster to damage (Picked unit), dealing (((0.05 x (Real((Level of Immolation berserk for Immolation_Caster)))) + 0.05) x (Real((Agility of Immolation_Caster (Include bonuses))))) damage of attack type Spells and damage type Fire
              • Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
              • Special Effect - Destroy (Last created special effect)
        • Else - Actions
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Waits are fickle as heck, use indexing.

(Enjoy this chicken image while I make the code)

Configuration
  • Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UhOh_C_Damage_AOE[1] = 450.00
      • Set UhOh_C_Damage_AOE[2] = 450.00
      • Set UhOh_C_Damage_AOE[3] = 450.00
      • Set UhOh_C_Damage_Base[1] = 230.00
      • Set UhOh_C_Damage_Base[2] = 280.00
      • Set UhOh_C_Damage_Base[3] = 330.00
      • Set UhOh_C_Damage_Max_Health_Perc[1] = 8.00
      • Set UhOh_C_Damage_Max_Health_Perc[2] = 11.00
      • Set UhOh_C_Damage_Max_Health_Perc[3] = 14.00
      • Set UhOh_C_Duration[1] = 10.00
      • Set UhOh_C_Duration[2] = 10.00
      • Set UhOh_C_Duration[3] = 10.00
      • Set UhOh_C_Duration_Tick[1] = 0.50
      • Set UhOh_C_Duration_Tick[2] = 0.50
      • Set UhOh_C_Duration_Tick[3] = 0.50
Cast
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Uh Oh, Stinky!
    • Actions
      • Set UhOh_A_Index = (UhOh_A_Index + 1)
      • Set UhOh_B_Caster[UhOh_A_Index] = (Triggering unit)
      • Set UhOh_B_Level[UhOh_A_Index] = (Level of (Ability being cast) for UhOh_B_Caster[UhOh_A_Index])
      • Set UhOh_B_Duration[UhOh_A_Index] = UhOh_C_Duration[UhOh_B_Level[UhOh_A_Index]]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UhOh_A_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
Periodic
  • Periodic
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer UhOh_A_Loop) from 1 to UhOh_A_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UhOh_B_Duration[UhOh_A_Loop] Greater than 0.00
              • (UhOh_B_Caster[UhOh_A_Loop] is dead) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (UhOh_B_Duration[UhOh_A_Loop] mod UhOh_C_Duration_Tick[UhOh_B_Level[UhOh_A_Loop]]) Less than or equal to 0.05
                • Then - Actions
                  • Set UhOh_A_Point[0] = (Position of UhOh_B_Caster[UhOh_A_Index])
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within UhOh_C_Damage_AOE[UhOh_B_Level[UhOh_A_Loop]] of UhOh_A_Point[0]) 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 UhOh_B_Caster[UhOh_A_Loop])) Equal to True
                        • Then - Actions
                          • Unit - Cause UhOh_B_Caster[UhOh_A_Loop] to damage (Picked unit), dealing ((UhOh_C_Damage_Base[UhOh_B_Level[UhOh_A_Loop]] + ((Max life of (Picked unit)) x (UhOh_C_Damage_Max_Health_Perc[UhOh_B_Level[UhOh_A_Loop]] / 100.00))) / (UhOh_C_Duration[UhOh_B_Level[UhOh_A_Loop]] / UhOh_C_Duration_Tick[UhOh_B_Level[UhOh_A_Loop]])) damage of attack type Spells and damage type Universal
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (UhOh_B_Duration[UhOh_A_Loop] mod 2.00) Less than or equal to 0.05
                            • Then - Actions
                              • -------- This is set up this way so the special effect doesn't spam every half second. --------
                              • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\NightElf\Immolation\ImmolationDamage.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_UhOh_A_Point[0])
                • Else - Actions
              • Set UhOh_B_Duration[UhOh_A_Loop] = (UhOh_B_Duration[UhOh_A_Loop] - 0.05)
            • Else - Actions
              • Set UhOh_B_Caster[UhOh_A_Loop] = UhOh_B_Caster[UhOh_A_Index]
              • Set UhOh_B_Level[UhOh_A_Loop] = UhOh_B_Level[UhOh_A_Index]
              • Set UhOh_B_Duration[UhOh_A_Loop] = UhOh_B_Duration[UhOh_A_Index]
              • Set UhOh_A_Index = (UhOh_A_Index - 1)
              • Set UhOh_A_Loop = (UhOh_A_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UhOh_A_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

And the test map.
 
Last edited:
Level 5
Joined
Jun 26, 2016
Messages
60
Waits are fickle as heck, use indexing.

(Enjoy this chicken image while I make the code)

Configuration
  • Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UhOh_C_Damage_AOE[1] = 450.00
      • Set UhOh_C_Damage_AOE[2] = 450.00
      • Set UhOh_C_Damage_AOE[3] = 450.00
      • Set UhOh_C_Damage_Base[1] = 230.00
      • Set UhOh_C_Damage_Base[2] = 280.00
      • Set UhOh_C_Damage_Base[3] = 330.00
      • Set UhOh_C_Damage_Max_Health_Perc[1] = 8.00
      • Set UhOh_C_Damage_Max_Health_Perc[2] = 11.00
      • Set UhOh_C_Damage_Max_Health_Perc[3] = 14.00
      • Set UhOh_C_Duration[1] = 10.00
      • Set UhOh_C_Duration[2] = 10.00
      • Set UhOh_C_Duration[3] = 10.00
      • Set UhOh_C_Duration_Tick[1] = 0.50
      • Set UhOh_C_Duration_Tick[2] = 0.50
      • Set UhOh_C_Duration_Tick[3] = 0.50
Cast
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Uh Oh, Stinky!
    • Actions
      • Set UhOh_A_Index = (UhOh_A_Index + 1)
      • Set UhOh_B_Caster[UhOh_A_Index] = (Triggering unit)
      • Set UhOh_B_Level[UhOh_A_Index] = (Level of (Ability being cast) for UhOh_B_Caster[UhOh_A_Index])
      • Set UhOh_B_Duration[UhOh_A_Index] = UhOh_C_Duration[UhOh_B_Level[UhOh_A_Index]]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UhOh_A_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
Periodic
  • Periodic
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer UhOh_A_Loop) from 1 to UhOh_A_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UhOh_B_Duration[UhOh_A_Loop] Greater than 0.00
              • (UhOh_B_Caster[UhOh_A_Loop] is dead) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (UhOh_B_Duration[UhOh_A_Loop] mod UhOh_C_Duration_Tick[UhOh_B_Level[UhOh_A_Loop]]) Less than or equal to 0.05
                • Then - Actions
                  • Set UhOh_A_Point[0] = (Position of UhOh_B_Caster[UhOh_A_Index])
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within UhOh_C_Damage_AOE[UhOh_B_Level[UhOh_A_Loop]] of UhOh_A_Point[0]) 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 UhOh_B_Caster[UhOh_A_Loop])) Equal to True
                        • Then - Actions
                          • Unit - Cause UhOh_B_Caster[UhOh_A_Loop] to damage (Picked unit), dealing ((UhOh_C_Damage_Base[UhOh_B_Level[UhOh_A_Loop]] + ((Max life of (Picked unit)) x (UhOh_C_Damage_Max_Health_Perc[UhOh_B_Level[UhOh_A_Loop]] / 100.00))) / (UhOh_C_Duration[UhOh_B_Level[UhOh_A_Loop]] / UhOh_C_Duration_Tick[UhOh_B_Level[UhOh_A_Loop]])) damage of attack type Spells and damage type Universal
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (UhOh_B_Duration[UhOh_A_Loop] mod 2.00) Less than or equal to 0.05
                            • Then - Actions
                              • -------- This is set up this way so the special effect doesn't spam every half second. --------
                              • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\NightElf\Immolation\ImmolationDamage.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_UhOh_A_Point[0])
                • Else - Actions
              • Set UhOh_B_Duration[UhOh_A_Loop] = (UhOh_B_Duration[UhOh_A_Loop] - 0.05)
            • Else - Actions
              • Set UhOh_B_Caster[UhOh_A_Loop] = UhOh_B_Caster[UhOh_A_Index]
              • Set UhOh_B_Level[UhOh_A_Loop] = UhOh_B_Level[UhOh_A_Index]
              • Set UhOh_B_Duration[UhOh_A_Loop] = UhOh_B_Duration[UhOh_A_Index]
              • Set UhOh_A_Index = (UhOh_A_Index - 1)
              • Set UhOh_A_Loop = (UhOh_A_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UhOh_A_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

And the test map.
thank you very much :) <3 you
 
Status
Not open for further replies.
Top