• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] Help me fix my Spell

Status
Not open for further replies.
Level 3
Joined
May 9, 2011
Messages
37
Hello!
I try to study about mui spell making and i try to make one. plz help me fix this.
Triggers:

  • Holy Bash Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Bash
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HB_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Holy Bash Loop <gen>
        • Else - Actions
      • Set HB_Index[1] = (HB_Index[1] + 1)
      • Set HB_Index[2] = (HB_Index[2] + 1)
      • Set HB_Caster[HB_Index[2]] = (Triggering unit)
      • Set HB_Target[HB_Index[2]] = (Target unit of ability being cast)
      • Set HB_Interval[HB_Index[2]] = (0.50 x (Real((Level of Holy Bash for HB_Caster[HB_Index[2]]))))
      • Set HB_DPS[HB_Index[2]] = (Real((3 x (Level of Holy Bash for HB_Caster[HB_Index[2]]))))
      • Set HB_Initial_Damage[HB_Index[2]] = (Real(((Strength of HB_Caster[2] (Include bonuses)) x (Level of Holy Bash for HB_Caster[HB_Index[2]]))))
      • Set HB_Duration[HB_Index[2]] = (15.00 + (Real((Hero level of HB_Caster[HB_Index[2]]))))
      • Set HB_Interval_Check[HB_Index[2]] = 0.00
      • Set HB_Point[HB_Index[2]] = (Position of HB_Caster[HB_Index[2]])
      • Set HB_Counter[HB_Index[2]] = 0
      • Set HB_MaxCounter[HB_Index[2]] = 15
      • Set HB_Angle[HB_Index[2]] = (Facing of HB_Target[HB_Index[2]])
      • Animation - Play HB_Caster[HB_Index[2]]'s attack 1 animation
      • Unit - Cause HB_Caster[HB_Index[2]] to damage HB_Target[HB_Index[2]], dealing HB_Initial_Damage[HB_Index[2]] damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect attached to the origin of HB_Target[HB_Index[2]] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Animation - Reset HB_Caster[HB_Index[2]]'s animation
  • Holy Bash Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer HB_Counter[3]) from 1 to HB_Counter[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HB_Counter[HB_Index[3]] Less than HB_MaxCounter[HB_Index[3]]
            • Then - Actions
              • Set HB_Counter[HB_Index[3]] = (HB_Counter[HB_Index[3]] + 1)
              • Set HB_Point2[HB_Index[3]] = (HB_Point[HB_Index[3]] offset by 5.00 towards HB_Angle[HB_Index[3]] degrees)
              • Set HB_Point[HB_Index[3]] = (Position of HB_Target[HB_Index[3]])
              • Unit - Pause HB_Target[HB_Index[3]]
              • Unit - Turn collision for HB_Target[HB_Index[3]] Off
              • Unit - Move HB_Target[HB_Index[3]] instantly to HB_Point2[HB_Index[3]]
              • Destructible - Pick every destructible within 50.00 of HB_Point[HB_Index[3]] and do (Actions)
                • Loop - Actions
                  • Destructible - Kill (Picked destructible)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Point-value of HB_Target[HB_Index[3]]) Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HB_Duration[HB_Index[3]] Greater than 0.00
                • Then - Actions
                  • Set HB_Duration[HB_Index[3]] = (HB_Duration[HB_Index[3]] - 0.50)
                  • Set HB_Interval_Check[HB_Index[3]] = (HB_Interval_Check[HB_Index[3]] + 0.50)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HB_Interval_Check[HB_Index[3]] Greater than or equal to HB_Duration[HB_Index[3]]
                      • (HB_Target[HB_Index[3]] is alive) Equal to True
                    • Then - Actions
                      • Unit - Cause HB_Caster[HB_Index[3]] to damage HB_Target[HB_Index[3]], dealing HB_DPS[HB_Index[3]] damage of attack type Spells and damage type Divine
                      • Special Effect - Create a special effect attached to the chest of HB_Target[HB_Index[3]] using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • Set HB_Duration[HB_Index[3]] = 0.00
                • Else - Actions
            • Else - Actions
              • Set HB_Duration[HB_Index[3]] = 0.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HB_Duration[HB_Index[3]] Equal to 0.00
            • Then - Actions
              • Set HB_Index[1] = (HB_Index[1] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HB_Index[1] Equal to 0
                • Then - Actions
                  • Set HB_Index[2] = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


I want the spell to do something like this:
When caster casts holy bash, he smashes his hammer to the target and does knockback. If target is undead, he deals damage over time.

Sorry for my bad english...

- Tauren_009
 
Status
Not open for further replies.
Top