• 🏆 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] Not sure if i did MUIing it right...

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hi there! I have a spell with Hanky's Indexing System with THREE triggers (the loop one, the config one and another one that is activated when a unit attacks). I am not sure if i did the things with the attack trigger right. Because... i don't know... it's my first spell with indexing system AND three, instead of two triggers. I will explain what i want, so that you can check if it's right.

SO, a hero activates his ability that gives him a HUGE attack speed buff. The config trigger runs. A delay variable was set to be equal to the buff duration, so that when the buff simply expires, the instance ends. BUT if the caster attacks, the attack trigger runs and the delay is reduced to 0.30 (the attack event occurs when the attacker STARTS his attack animation, not when he actually deals damage, that's why i reduce the delay to 0.30, not to 0, this way the hero will play his animation for those 0.30 seconds and everything will be OK). When the delay is 0, the hero deals damage. I use MY system as a part of the damage, but it can't be a problem because it affects only the damage variable. ADDITIONALY, if THIS hero has A LOT of attack speed from other buffs that he manages to make two attacks in those 0.30 seconds, then the second attack will immediately reduce the delay to 0, so that the instance ends without increasing the delay to 0.30 with each attack, and eventually, make the effect endless.
The attack speed thingy should only create an awesome effect of a quick strike, nothing more.

Please, check it and tell me if it has something buggy. I will upload a test map if you want.


  • Rageful Blow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rageful Blow [Battler]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RagBlowID2 Equal to 0
        • Then - Actions
          • Trigger - Turn on Rageful Blow Loop <gen>
          • Trigger - Turn on Rageful Blow Loop 2 <gen>
        • Else - Actions
      • Set RagBlowID2 = (RagBlowID2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RagBlowID2 Greater than RagBlowIDMax
        • Then - Actions
          • Set RagBlowID[RagBlowID2] = RagBlowID2
          • Set RagBlowIDMax = RagBlowID2
        • Else - Actions
      • Set RagBlowArray = RagBlowID[RagBlowID2]
      • Set RagBlowCaster[RagBlowArray] = (Triggering unit)
      • Set RagBlowLevel[RagBlowArray] = (Level of Rageful Blow [Battler] for (Triggering unit))
      • Set RagBlowDamage[RagBlowArray] = (30.00 + (10.00 x (Real(RagBlowLevel[RagBlowArray]))))
      • Set RagBlowAttDmgPercent[RagBlowArray] = (0.35 + (0.05 x (Real(RagBlowLevel[RagBlowArray]))))
      • Set RagBlowCasterAttacked[RagBlowArray] = False
      • Set RagBlowSpellEnd[RagBlowArray] = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Rageful Blow [Battler] for (Triggering unit)) Equal to 6
        • Then - Actions
          • Set RagBlowAttDmgPercent[RagBlowArray] = (RagBlowAttDmgPercent[RagBlowArray] + 0.05)
        • Else - Actions
      • Set RagBlowDelay[RagBlowArray] = 10.00
  • Rageful Blow Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RagBlowLoop) from 1 to RagBlowID2, do (Actions)
        • Loop - Actions
          • Set RagBlowArray = RagBlowID[RagBlowLoop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RagBlowDelay[RagBlowArray] Less than or equal to 0.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RagBlowCasterAttacked[RagBlowArray] Equal to True
                • Then - Actions
                  • -------- ------ DCS ------ --------
                  • Set DCS_IncludeAttributeBonus = True
                  • Set DCS_IncludeItemBonus = True
                  • Set DCS_Unit = RagBlowCaster[RagBlowArray]
                  • Trigger - Run DCS Core <gen> (ignoring conditions)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DCS_IncludeItemBonus Equal to True
                    • Then - Actions
                      • Set DCS_Damage = (DCS_Damage + DCS_AllItemDamage)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DCS_IncludeAttributeBonus Equal to True
                    • Then - Actions
                      • Set DCS_Damage = (DCS_Damage + ((Real(DCS_AllAttributeBonus)) x DCS_AttackBounsFromAttribute))
                    • Else - Actions
                  • Trigger - Run DCS Other Damage Sources <gen> (ignoring conditions)
                  • Game - Display to (All players) the text: (((Name of (Triggering unit)) + 's) + ( damage : + (String((Integer(DCS_Damage))))))
                  • -------- ------ DCS ------ --------
                  • Set RagBlowDamage[RagBlowArray] = (RagBlowDamage[RagBlowArray] + (DCS_Damage x RagBlowAttDmgPercent[RagBlowArray]))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (RagBlowCaster[RagBlowArray] has buff Enrage ) Equal to True
                    • Then - Actions
                      • Set RagBlowDamage[RagBlowArray] = (RagBlowDamage[RagBlowArray] + (RagBlowDamage[RagBlowArray] x 0.10))
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (RagBlowAtteckedUnit[RagBlowArray] has buff Bleed ) Equal to True
                    • Then - Actions
                      • Set RagBlowDamage[RagBlowArray] = (RagBlowDamage[RagBlowArray] + (RagBlowDamage[RagBlowArray] x 0.10))
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (RagBlowAtteckedUnit[RagBlowArray] has buff Devastating Bleed ) Equal to True
                    • Then - Actions
                      • Set RagBlowDamage[RagBlowArray] = (RagBlowDamage[RagBlowArray] + (RagBlowDamage[RagBlowArray] x 0.15))
                    • Else - Actions
                  • Unit - Cause RagBlowCaster[RagBlowArray] to damage RagBlowAtteckedUnit[RagBlowArray], dealing RagBlowDamage[RagBlowArray] damage of attack type Chaos and damage type Normal
                • Else - Actions
              • Unit - Remove Rageful Blow buff from RagBlowCaster[RagBlowArray]
              • Set RagBlowSpellEnd[RagBlowArray] = True
              • Trigger - Run Rageful Blow Loop 2 <gen> (ignoring conditions)
              • Set RagBlowID[RagBlowLoop] = RagBlowID[RagBlowID2]
              • Set RagBlowID[RagBlowID2] = RagBlowArray
              • Set RagBlowID2 = (RagBlowID2 - 1)
              • Set RagBlowLoop = (RagBlowLoop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RagBlowID2 Equal to 0
                • Then - Actions
                  • Game - Display to (All players) the text: Recycled!
                  • Game - Display to (All players) the text: (Loop 1 : + (String(RagBlowLoop)))
                  • Game - Display to (All players) the text: (Loop 2 : + (String(RagBlowLoop2)))
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
              • Set RagBlowDelay[RagBlowArray] = (RagBlowDelay[RagBlowArray] - 0.03)
  • Rageful Blow Loop 2
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Rageful Blow ) Equal to True
    • Actions
      • For each (Integer RagBlowLoop2) from 1 to RagBlowID2, do (Actions)
        • Loop - Actions
          • Set RagBlowArray = RagBlowID[RagBlowLoop2]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RagBlowSpellEnd[RagBlowArray] Equal to True
            • Then - Actions
              • Set RagBlowLoop2 = (RagBlowLoop2 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RagBlowID2 Equal to 0
                • Then - Actions
                  • Game - Display to (All players) the text: Recycled!
                  • Game - Display to (All players) the text: (Loop 1 : + (String(RagBlowLoop)))
                  • Game - Display to (All players) the text: (Loop 2 : + (String(RagBlowLoop2)))
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RagBlowCasterAttacked[RagBlowArray] Equal to False
                • Then - Actions
                  • Set RagBlowDelay[RagBlowArray] = 0.30
                  • Set RagBlowAtteckedUnit[RagBlowArray] = (Attacked unit)
                  • Set RagBlowCasterAttacked[RagBlowArray] = True
                • Else - Actions
                  • Set RagBlowDelay[RagBlowArray] = 0.00

I even created a game text when the spell recycles, so that i can see if it's recycled correctly, as it does. The spell deals exactly what i want. I can't find any mistakes. But i want to see if YOU find any mistakes. I just wanna be sure that my spell works right.

THANKS IN ADVANCE, MATES! +REP WILL BE GIVEN TO YOU, HEROES!
 
Status
Not open for further replies.
Top